Commit Graph

493 Commits

Author SHA1 Message Date
David Heinemeier Hansson
eb5ca8e16d Stray line 2015-12-18 13:16:01 +01:00
David Heinemeier Hansson
ed33d1d641 Simplify 2015-12-18 13:15:56 +01:00
David Heinemeier Hansson
21efa5218b Now available in action_cable 2015-12-18 13:15:52 +01:00
yuuji.yaginuma
4a7bd88eaf add line break between method of generated channel js
```
# before
App.appearance = App.cable.subscriptions.create "AppearanceChannel",
  connected: ->
    # Called when the subscription is ready for use on the server

  disconnected: ->
    # Called when the subscription has been terminated by the server

  received: (data) ->
    # Called when there's incoming data on the websocket for this channel

  appear: ->
    @perform 'appear'
  away: ->
    @perform 'away'
```

```
# after
App.appearance = App.cable.subscriptions.create "AppearanceChannel",
  connected: ->
    # Called when the subscription is ready for use on the server

  disconnected: ->
    # Called when the subscription has been terminated by the server

  received: (data) ->
    # Called when there's incoming data on the websocket for this channel

  appear: ->
    @perform 'appear'

  away: ->
    @perform 'away'
```
2015-12-18 20:19:04 +09:00
Akshay Vishnoi
ebad5c72d3 [ci skip] Fix grammar 2015-12-18 16:30:18 +05:30
Akshay Vishnoi
2728377d0f [ci skip] Fix typo 2015-12-18 12:12:52 +05:30
Guillermo Iguaran
80e00ac84a Merge pull request #22639 from arunagw/aa-remove-few-warnings-actioncable
Remove warnings from actioncable test
2015-12-17 17:47:39 -05:00
David Heinemeier Hansson
e16d7c6808 Should also stub the received callback 2015-12-17 21:53:05 +01:00
eileencodes
19e7f65dd1 Don't log Action Cable to STDOUT in development
Logging Action Cable to STDOUT caused the development log to see double
messages like this:

```
Started GET "/" for ::1 at 2015-12-17 15:21:34 -0500
Started GET "/" for ::1 at 2015-12-17 15:21:34 -0500
Processing by Rails::WelcomeController#index as HTML
Processing by Rails::WelcomeController#index as HTML
Rendered /welcome/index.html.erb (0.0ms)
Rendered /welcome/index.html.erb (0.0ms)
Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.0ms)
Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.0ms)
```

Now that Action Cable is part of Rails it doesn't need it's own logger
and will log to STDOUT via the local dev server here:
https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server.rb
2015-12-17 15:30:40 -05:00
Gaurav Sharma
c9b750f951 traditional make sense with <tt>ActiveSupport::TaggedLogging</tt> 2015-12-18 00:30:36 +05:30
Arun Agrawal
e1459c7c86 Remove warnings from actioncable
Warnings coming from code and test are removed
2015-12-17 16:42:34 +01:00
Paul Montero
96a63787bc Update USAGE
Fix typo
2015-12-17 10:17:52 -05:00
Xavier Noria
7daad3a401 Update README.md
ActiveRecord -> Active Record [ci skip]
2015-12-17 15:00:19 +01:00
David Heinemeier Hansson
3a83097ee6 Quiet warnings 2015-12-16 22:02:30 +01:00
David Heinemeier Hansson
a22074749a Clarify 2015-12-16 21:05:19 +01:00
David Heinemeier Hansson
28035db109 Generate all the ApplicationCable stubs by default, like all other Application* stubs 2015-12-16 21:05:13 +01:00
David Heinemeier Hansson
bf16ec25b3 Comment out the user handling so default setup connects directly 2015-12-16 20:36:11 +01:00
David Heinemeier Hansson
59db9ebc0c Cargo cult fix to make Celluloid behave 2015-12-16 20:36:11 +01:00
David Heinemeier Hansson
0036cb35b8 Require tree 2015-12-16 18:58:50 +01:00
David Heinemeier Hansson
70be2486f3 Simpler directory structure 2015-12-16 18:58:43 +01:00
David Heinemeier Hansson
0625d77784 Note that changes to the cable setup requires restarting the server 2015-12-16 18:23:11 +01:00
David Heinemeier Hansson
8e9b7c0405 @App could have been set elsewhere 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
910572fffe Another stab at only mounting redis if the config is there 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
7eb12796ca Assume that the cable server is running in-process by default, offer option to change that in config/environments/production.rb 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
aae14ab3ac Fix parent class 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
51ad57989d Doh, should have read ff370ee61754b00f864f3ddd0af62be4dfa0de67
Indeed we need this to be an engine for the internal assets to work
2015-12-16 15:52:46 +01:00
David Heinemeier Hansson
6bfd191c0f Only initialize redis if the config file is there 2015-12-16 15:42:35 +01:00
David Heinemeier Hansson
deac988756 Include changes made to the engine 2015-12-16 15:31:25 +01:00
David Heinemeier Hansson
26bcf81a01 Move Cable to ActionCable for client-side constant to avoid conflicts 2015-12-16 15:29:21 +01:00
David Heinemeier Hansson
346a7528ef We are using railtie, not engine 2015-12-16 15:28:50 +01:00
David Heinemeier Hansson
40cc72548f Basic channel generator 2015-12-15 21:39:22 +01:00
Rafael Mendonça França
649b9d9321 Move the require to the right place 2015-12-15 16:05:42 -02:00
Rafael Mendonça França
23faa711c9 Remove the default logger
It should be configured through the railtie
2015-12-15 16:02:47 -02:00
Rafael Mendonça França
96455349ff Configure the Action Cable's redis in the engine
This will decouple Action Cable from Rails.
2015-12-15 15:59:00 -02:00
claudiob
70e593d998 Remove rails/actioncable Travis badge
[ci skip]

Since Action Cable is getting integrated into rails/rails, the Travis
badge for rails/actioncable is not needed anymore.

Also following the standard of every other README to have `--` rather
than `-` to separating the name of the library from its description.
2015-12-15 09:25:15 -08:00
Rafael Mendonça França
ff370ee617 Action Cable need to be a engine
Otherwise assets will not work
2015-12-15 15:21:36 -02:00
Javan Makhmali
8625518725 Bring latest changes over from actioncable/master 2015-12-15 10:35:02 -05:00
David Heinemeier Hansson
a8db0328a5 Switch from engine to railtie 2015-12-15 13:10:27 +01:00
Rafael Mendonça França
3d4a423cdc Hook in ActionView::Base, not in ApplicationController
The application can have more than one ApplicationController and we
want Action Cable helpers in all controllers and their views so we
should hook in the same place that others helpers.
2015-12-14 15:54:08 -02:00
Rafael Mendonça França
f8058a6aeb Require the top level file in the engine 2015-12-14 15:53:43 -02:00
claudiob
f6fb71af8b Remove Alpha disclaimer from ActionCable
[ci skip] Getting to ready to merge into rails/rails
2015-12-14 08:24:06 -08:00
David Heinemeier Hansson
760de782f7 Initial stab at adding Action Cable to rails/master 2015-12-14 16:38:37 +01:00
David Heinemeier Hansson
bf40bddfce Get ready to merge into Rails 2015-12-14 15:48:54 +01:00