entangled 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/README.md +92 -4
  4. data/entangled.gemspec +2 -1
  5. data/lib/entangled/version.rb +1 -1
  6. data/spec/dummy/app/controllers/messages_controller.rb +36 -0
  7. data/spec/dummy/db/development.sqlite3 +0 -0
  8. data/spec/dummy/db/test.sqlite3 +0 -0
  9. data/spec/dummy/log/development.log +307 -0
  10. data/spec/dummy/public/bower_components/angular-route/.bower.json +20 -0
  11. data/spec/dummy/public/bower_components/angular-route/README.md +77 -0
  12. data/spec/dummy/public/bower_components/angular-route/angular-route.js +989 -0
  13. data/spec/dummy/public/bower_components/angular-route/angular-route.min.js +15 -0
  14. data/spec/dummy/public/bower_components/angular-route/angular-route.min.js.map +8 -0
  15. data/spec/dummy/public/bower_components/angular-route/bower.json +9 -0
  16. data/spec/dummy/public/bower_components/angular-route/package.json +26 -0
  17. data/spec/dummy/public/bower_components/angular/.bower.json +18 -0
  18. data/spec/dummy/public/bower_components/angular/README.md +67 -0
  19. data/spec/dummy/public/bower_components/angular/angular-csp.css +13 -0
  20. data/spec/dummy/public/bower_components/angular/angular.js +26130 -0
  21. data/spec/dummy/public/bower_components/angular/angular.min.js +250 -0
  22. data/spec/dummy/public/bower_components/angular/angular.min.js.gzip +0 -0
  23. data/spec/dummy/public/bower_components/angular/angular.min.js.map +8 -0
  24. data/spec/dummy/public/bower_components/angular/bower.json +8 -0
  25. data/spec/dummy/public/bower_components/angular/package.json +25 -0
  26. data/spec/dummy/public/index.html +13 -0
  27. data/spec/dummy/public/js/app.js +70 -0
  28. data/spec/dummy/public/js/bower.json +12 -0
  29. data/spec/dummy/public/js/entangled.js +204 -0
  30. data/spec/dummy/public/views/messages/index.html +13 -0
  31. data/spec/dummy/public/views/messages/show.html +8 -0
  32. data/spec/models/inclusion_exclusion_spec.rb +1 -1
  33. metadata +59 -21
  34. data/dump.rdb +0 -0
  35. data/spec/dummy/app/assets/images/.keep +0 -0
  36. data/spec/dummy/app/assets/javascripts/application.js +0 -13
  37. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  38. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  39. data/spec/dummy/app/mailers/.keep +0 -0
  40. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  41. data/spec/dummy/lib/assets/.keep +0 -0
  42. data/spec/dummy/public/404.html +0 -67
  43. data/spec/dummy/public/422.html +0 -67
  44. data/spec/dummy/public/500.html +0 -66
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c3deced392adea9707d51cd90ed1b8d528ffa7d
4
- data.tar.gz: 6241ff4a346fa121fc87d2e19eaf15273f39ea31
3
+ metadata.gz: bb42b2ad3c0848e50d2055aa36aa401fc020b184
4
+ data.tar.gz: 316a6a2caa31996beb9cacba6c30a0c07803b5a2
5
5
  SHA512:
6
- metadata.gz: 37d5765d158a961317ed4b0a875ea2aff233b735d041cfe9935c248865c2b320f8f6c64b22532e5529e4b0b84ad8a184da90b83d1770e5c205eb308f0a4e605e
7
- data.tar.gz: ee7755583e9e638fc1fe06e8cfdf0db4b49eec76145a72215c24f4ff33f5f6e7f9c29ce52246364b08e4f205c7817cabd47aed59143487b8b910fa6463c305b2
6
+ metadata.gz: 081a7924b84a124210b4562c057697dd306ec2f332337f12cbfeb7a05e7586c15373ad1b8f8499e0698392359181d69b19143360248958f9097dc24d078a0437
7
+ data.tar.gz: 5328ff48cb1d0fb76731f649b1fdc1ec23a90f2c247d5d04cc89f71ed6ed684d55d5ea66522a4f6933fd12d0a28db48489962e26e786b25e87248d6b5ca159f0
data/.gitignore CHANGED
@@ -14,3 +14,5 @@
14
14
  *.gem
15
15
  mkmf.log
16
16
  /spec/dummy/log/test.log
17
+ dump.rdb
18
+ *.sqlite
data/README.md CHANGED
@@ -14,7 +14,7 @@ gem 'entangled'
14
14
 
15
15
  Note that Redis and Puma are required as well. Redis is needed to build the channels clients subscribe to, Puma is needed to handle websockets concurrently.
16
16
 
17
- Redis comes with Entangled, but you need to add Puma to your Gemfile:
17
+ Entangled comes with Redis, but you need to add Puma to your Gemfile:
18
18
 
19
19
  ```ruby
20
20
  gem 'puma'
@@ -68,6 +68,18 @@ end
68
68
 
69
69
  This will create the callbacks needed to push changes to data to all clients who are subscribed. This is essentially where the data binding is set up.
70
70
 
71
+ By default, the following callbacks will be added:
72
+
73
+ - `after_create`
74
+ - `after_update`
75
+ - `after_destroy`
76
+
77
+ You can limit this behavior by specifying `:only` or `:except` options. For example, if you don't want to propagate the destruction or update of an object to all connected clients, you can do the following:
78
+
79
+ ```ruby
80
+ entangle only: :create # or use an array
81
+ ```
82
+
71
83
  ### Controllers
72
84
  Your controllers will be a little more lightweight than in a standard restful Rails app. A restful-style controller is expected and should look like this:
73
85
 
@@ -121,7 +133,8 @@ Note the following:
121
133
  - Data sent to clients arrives as stringified JSON
122
134
  - Strong parameters are expected
123
135
 
124
- ## Server
136
+ ### Server
137
+
125
138
  Remember to run Redis whenever you run your server:
126
139
 
127
140
  ```shell
@@ -133,8 +146,83 @@ Otherwise the channels won't work.
133
146
  ### Database
134
147
  Depending on your app's settings, you might have to increase the pool size in your database.yml configuration file, since every new socket will open a new connection to your database.
135
148
 
136
- ### The Client
137
- You will need to configure your client to create Websockets and understand incoming requests on those sockets. If you use Angular for your frontend, you can use [this library](https://github.com/so-entangled/angular). The use of Angular as counterpart of this gem is highly recommended, since its inherent two way data binding complements the real time functionality of this gem nicely.
149
+ ## The Client
150
+ You will need to configure your client to create Websockets and understand incoming requests on those sockets. If you use Angular for your frontend, you can use the Angular library from this repository. The use of Angular as counterpart of this gem is highly recommended, since its inherent two way data binding complements the real time functionality of this gem nicely.
151
+
152
+ ### Installation
153
+ You can either download or reference the file `entangled.js` from this repository, or simply install it with Bower:
154
+
155
+ ```shell
156
+ $ bower install entangled
157
+ ```
158
+
159
+ Then include it in your HTML.
160
+
161
+ Lastly, add the Entangled module as a dependency to your Angular app:
162
+
163
+ ```javascript
164
+ angular.module('appName', ['entangled']);
165
+ ```
166
+
167
+ ### Usage
168
+ Entangled is best used within Angular services. For example, consider a `Message` service for a chat app:
169
+
170
+ ```javascript
171
+ app.factory('Message', function(Entangled) {
172
+ var entangled = new Entangled('ws://localhost:3000/messages');
173
+
174
+ var Message = {
175
+ new: function(params) {
176
+ return entangled.new(params);
177
+ },
178
+ all: function(callback) {
179
+ return entangled.all(callback);
180
+ },
181
+ find: function(id, callback) {
182
+ return entangled.find(id, callback);
183
+ }
184
+ };
185
+
186
+ return Message;
187
+ });
188
+ ```
189
+
190
+ In the above example, first you inject Entangled into your service, then instantiate a new Entangled service passing it the socket to the index action of that resource in your backend (in this case, `/messages`), and then add helper methods to your service.
191
+
192
+ In your controller, you could then inject that `Message` service and use it like so:
193
+
194
+ ```javascript
195
+ // To instantiate a blank message, e.g. for a form;
196
+ // You can optionally pass in an object to new() to
197
+ // set some default values
198
+ $scope.message = Message.new();
199
+
200
+ // To retrieve a specific message from the server
201
+ // with id 1 and subscribe to its channel
202
+ Message.find(1, function() {
203
+ $scope.$apply(function() {
204
+ $scope.message = message;
205
+ });
206
+ });
207
+
208
+ // To create a new or update an existing message
209
+ $scope.message.$save();
210
+
211
+ // To destroy a message
212
+ $scope.message.$destroy();
213
+
214
+ // To retrieve all messages from the server and
215
+ // subscribe to the collection's channel
216
+ Message.all(function(messages) {
217
+ $scope.$apply(function() {
218
+ $scope.messages = messages;
219
+ });
220
+ });
221
+ ```
222
+
223
+ `$save()`, `$destroy()`, `find()` and `all()` will interact with your server's controllers in real time.
224
+
225
+ If data in your server's database changes, so will your scope variables - in real time, for all connected clients.
138
226
 
139
227
  ## Planning Your Infrastructure
140
228
  This gem is best used for Rails apps that serve as APIs only and are not concerned with rendering views. A frontend separate from your Rails app, such as Angular with Grunt, is recommended.
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["dennis.hackethal@gmail.com"]
11
11
  s.summary = %q{Makes Rails real time through websockets.}
12
12
  s.description = %q{Makes Rails real time through websockets. Check out the JavaScript counterpart for the front end.}
13
- s.homepage = "https://github.com/so-entangled/rails"
13
+ s.homepage = "https://github.com/dchacke/entangled"
14
14
  s.license = "MIT"
15
15
 
16
16
  s.files = `git ls-files -z`.split("\x0")
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.add_development_dependency 'sqlite3', '~> 1.3'
25
25
  s.add_development_dependency 'byebug', '~> 3.5'
26
26
  s.add_development_dependency 'bourne', '~> 1.6'
27
+ s.add_development_dependency 'puma', '~> 2.11'
27
28
  s.add_dependency 'tubesock', '~> 0.2'
28
29
  s.add_dependency 'rails', '~> 4.2'
29
30
  s.add_dependency 'redis', '~> 3.2'
@@ -1,3 +1,3 @@
1
1
  module Entangled
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -1,4 +1,40 @@
1
1
  # This controller serves as fully restful example
2
2
  # controller with all five actions
3
3
  class MessagesController < ApplicationController
4
+ include Entangled::Controller
5
+
6
+ def index
7
+ broadcast do
8
+ @messages = Message.all
9
+ end
10
+ end
11
+
12
+ def show
13
+ broadcast do
14
+ @message = Message.find(params[:id])
15
+ end
16
+ end
17
+
18
+ def create
19
+ broadcast do
20
+ Message.create(message_params)
21
+ end
22
+ end
23
+
24
+ def update
25
+ broadcast do
26
+ Message.find(params[:id]).update(message_params)
27
+ end
28
+ end
29
+
30
+ def destroy
31
+ broadcast do
32
+ Message.find(params[:id]).destroy
33
+ end
34
+ end
35
+
36
+ private
37
+ def message_params
38
+ params.require(:message).permit(:body)
39
+ end
4
40
  end
Binary file
@@ -38,3 +38,310 @@ Migrating to CreateBarfoos (20150223004852)
38
38
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150223004852"]]
39
39
   (1.1ms) commit transaction
40
40
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
41
+
42
+
43
+ Started GET "/bower_components/angular/angular-route.min.js" for ::1 at 2015-02-23 22:04:26 -0800
44
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
45
+
46
+ ActionController::RoutingError (No route matches [GET] "/bower_components/angular/angular-route.min.js"):
47
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
48
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
49
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
50
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
51
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
52
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
53
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
54
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
55
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
56
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
57
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
58
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
59
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
60
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
61
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
62
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
63
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
64
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
65
+ puma (2.11.1) lib/puma/server.rb:507:in `handle_request'
66
+ puma (2.11.1) lib/puma/server.rb:375:in `process_client'
67
+ puma (2.11.1) lib/puma/server.rb:262:in `block in run'
68
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `call'
69
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
70
+
71
+
72
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.8ms)
73
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.8ms)
74
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (9.9ms)
75
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (13.3ms)
76
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (60.2ms)
77
+
78
+
79
+ Started GET "/bower_components/angular/angular-route.min.js" for ::1 at 2015-02-23 22:04:44 -0800
80
+
81
+ ActionController::RoutingError (No route matches [GET] "/bower_components/angular/angular-route.min.js"):
82
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
83
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
84
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
85
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
86
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
87
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
88
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
89
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
90
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
91
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
92
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
93
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
94
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
95
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
96
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
97
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
98
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
99
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
100
+ puma (2.11.1) lib/puma/server.rb:507:in `handle_request'
101
+ puma (2.11.1) lib/puma/server.rb:375:in `process_client'
102
+ puma (2.11.1) lib/puma/server.rb:262:in `block in run'
103
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `call'
104
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
105
+
106
+
107
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.7ms)
108
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.7ms)
109
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (3.1ms)
110
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.5ms)
111
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (33.5ms)
112
+
113
+
114
+ Started GET "/bower_components/angular/angular-route.min.js" for ::1 at 2015-02-23 22:04:52 -0800
115
+
116
+ ActionController::RoutingError (No route matches [GET] "/bower_components/angular/angular-route.min.js"):
117
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
118
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
119
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
120
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
121
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
122
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
123
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
124
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
125
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
126
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
127
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
128
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
129
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
130
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
131
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
132
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
133
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
134
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
135
+ puma (2.11.1) lib/puma/server.rb:507:in `handle_request'
136
+ puma (2.11.1) lib/puma/server.rb:375:in `process_client'
137
+ puma (2.11.1) lib/puma/server.rb:262:in `block in run'
138
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `call'
139
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
140
+
141
+
142
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (4.5ms)
143
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.5ms)
144
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.4ms)
145
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.4ms)
146
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (35.5ms)
147
+
148
+
149
+ Started GET "/messages" for ::1 at 2015-02-23 22:09:41 -0800
150
+
151
+ AbstractController::ActionNotFound (The action 'index' could not be found for MessagesController):
152
+ actionpack (4.2.0) lib/abstract_controller/base.rb:132:in `process'
153
+ actionview (4.2.0) lib/action_view/rendering.rb:30:in `process'
154
+ actionpack (4.2.0) lib/action_controller/metal.rb:195:in `dispatch'
155
+ actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
156
+ actionpack (4.2.0) lib/action_controller/metal.rb:236:in `block in action'
157
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `call'
158
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
159
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in `serve'
160
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
161
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'
162
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
163
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
164
+ rack (1.6.0) lib/rack/etag.rb:24:in `call'
165
+ rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
166
+ rack (1.6.0) lib/rack/head.rb:13:in `call'
167
+ actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
168
+ actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'
169
+ rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
170
+ rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
171
+ actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
172
+ activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'
173
+ activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
174
+ activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'
175
+ actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
176
+ activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `call'
177
+ activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'
178
+ activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
179
+ activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
180
+ actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
181
+ actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
182
+ actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
183
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
184
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
185
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
186
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
187
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
188
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
189
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
190
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
191
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
192
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
193
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
194
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
195
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
196
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
197
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
198
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
199
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
200
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
201
+ puma (2.11.1) lib/puma/server.rb:507:in `handle_request'
202
+ puma (2.11.1) lib/puma/server.rb:375:in `process_client'
203
+ puma (2.11.1) lib/puma/server.rb:262:in `block in run'
204
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `call'
205
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
206
+
207
+
208
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb within rescues/layout (0.4ms)
209
+
210
+
211
+ Started GET "/messages" for ::1 at 2015-02-23 22:12:22 -0800
212
+
213
+ AbstractController::ActionNotFound (The action 'index' could not be found for MessagesController):
214
+ actionpack (4.2.0) lib/abstract_controller/base.rb:132:in `process'
215
+ actionview (4.2.0) lib/action_view/rendering.rb:30:in `process'
216
+ actionpack (4.2.0) lib/action_controller/metal.rb:195:in `dispatch'
217
+ actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
218
+ actionpack (4.2.0) lib/action_controller/metal.rb:236:in `block in action'
219
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `call'
220
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
221
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in `serve'
222
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
223
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'
224
+ actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
225
+ actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
226
+ rack (1.6.0) lib/rack/etag.rb:24:in `call'
227
+ rack (1.6.0) lib/rack/conditionalget.rb:25:in `call'
228
+ rack (1.6.0) lib/rack/head.rb:13:in `call'
229
+ actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
230
+ actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'
231
+ rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
232
+ rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
233
+ actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
234
+ activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'
235
+ activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
236
+ activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'
237
+ actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
238
+ activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `call'
239
+ activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'
240
+ activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
241
+ activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
242
+ actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
243
+ actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
244
+ actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
245
+ actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
246
+ actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
247
+ railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
248
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
249
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
250
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
251
+ activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
252
+ railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
253
+ actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
254
+ rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
255
+ rack (1.6.0) lib/rack/runtime.rb:18:in `call'
256
+ activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
257
+ rack (1.6.0) lib/rack/lock.rb:17:in `call'
258
+ actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
259
+ rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
260
+ railties (4.2.0) lib/rails/engine.rb:518:in `call'
261
+ railties (4.2.0) lib/rails/application.rb:164:in `call'
262
+ rack (1.6.0) lib/rack/content_length.rb:15:in `call'
263
+ puma (2.11.1) lib/puma/server.rb:507:in `handle_request'
264
+ puma (2.11.1) lib/puma/server.rb:375:in `process_client'
265
+ puma (2.11.1) lib/puma/server.rb:262:in `block in run'
266
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `call'
267
+ puma (2.11.1) lib/puma/thread_pool.rb:104:in `block in spawn_thread'
268
+
269
+
270
+ Rendered /Users/dennischarleshackethal/.rvm/gems/ruby-2.1.0/gems/actionpack-4.2.0/lib/action_dispatch/middleware/templates/rescues/unknown_action.html.erb within rescues/layout (0.5ms)
271
+
272
+
273
+ Started GET "/messages" for ::1 at 2015-02-23 22:14:16 -0800
274
+ Processing by MessagesController#index as HTML
275
+ Message Load (0.7ms) SELECT "messages".* FROM "messages"
276
+ Rendered text template (0.0ms)
277
+ Completed -1 in 26ms (Views: 10.6ms | ActiveRecord: 0.0ms)
278
+
279
+
280
+ Started GET "/messages/1/destroy" for ::1 at 2015-02-23 22:14:19 -0800
281
+ Processing by MessagesController#destroy as HTML
282
+ Parameters: {"id"=>"1"}
283
+ Rendered text template (0.0ms)
284
+ Completed -1 in 4ms (Views: 2.5ms | ActiveRecord: 0.0ms)
285
+ Message Load (1.8ms) SELECT "messages".* FROM "messages" WHERE "messages"."id" = ? LIMIT 1 [["id", 1]]
286
+  (0.1ms) begin transaction
287
+ SQL (0.5ms) DELETE FROM "messages" WHERE "messages"."id" = ? [["id", 1]]
288
+  (1.1ms) rollback transaction
289
+
290
+
291
+ Started GET "/messages" for ::1 at 2015-02-23 22:17:26 -0800
292
+ ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations"
293
+ Processing by MessagesController#index as HTML
294
+ Message Load (0.7ms) SELECT "messages".* FROM "messages"
295
+ Rendered text template (0.0ms)
296
+ Completed -1 in 88ms (Views: 20.3ms | ActiveRecord: 0.0ms)
297
+
298
+
299
+ Started GET "/messages/1/destroy" for ::1 at 2015-02-23 22:17:28 -0800
300
+ Processing by MessagesController#destroy as HTML
301
+ Parameters: {"id"=>"1"}
302
+ Rendered text template (0.0ms)
303
+ Completed -1 in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)
304
+ Message Load (0.5ms) SELECT "messages".* FROM "messages" WHERE "messages"."id" = ? LIMIT 1 [["id", 1]]
305
+  (0.1ms) begin transaction
306
+ SQL (0.4ms) DELETE FROM "messages" WHERE "messages"."id" = ? [["id", 1]]
307
+  (1.5ms) commit transaction
308
+
309
+
310
+ Started GET "/messages/2/destroy" for ::1 at 2015-02-23 22:17:29 -0800
311
+ Processing by MessagesController#destroy as HTML
312
+ Parameters: {"id"=>"2"}
313
+ Rendered text template (0.0ms)
314
+ Completed -1 in 2ms (Views: 0.7ms | ActiveRecord: 0.0ms)
315
+ Message Load (0.5ms) SELECT "messages".* FROM "messages" WHERE "messages"."id" = ? LIMIT 1 [["id", 2]]
316
+  (0.1ms) begin transaction
317
+ SQL (0.3ms) DELETE FROM "messages" WHERE "messages"."id" = ? [["id", 2]]
318
+  (3.8ms) commit transaction
319
+
320
+
321
+ Started GET "/messages/create" for ::1 at 2015-02-23 22:17:31 -0800
322
+ Processing by MessagesController#create as HTML
323
+ Rendered text template (0.0ms)
324
+ Completed -1 in 2ms (Views: 0.6ms | ActiveRecord: 0.0ms)
325
+ Unpermitted parameter: webSocketUrl
326
+  (0.1ms) begin transaction
327
+ SQL (1.5ms) INSERT INTO "messages" ("body", "created_at", "updated_at") VALUES (?, ?, ?) [["body", "Hello"], ["created_at", "2015-02-24 06:17:31.750855"], ["updated_at", "2015-02-24 06:17:31.750855"]]
328
+  (2.1ms) commit transaction
329
+
330
+
331
+ Started GET "/messages/3" for ::1 at 2015-02-23 22:17:34 -0800
332
+ Processing by MessagesController#show as HTML
333
+ Parameters: {"id"=>"3"}
334
+ Message Load (0.5ms) SELECT "messages".* FROM "messages" WHERE "messages"."id" = ? LIMIT 1 [["id", 3]]
335
+ Rendered text template (0.0ms)
336
+ Completed -1 in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)
337
+
338
+
339
+ Started GET "/messages/3/update" for ::1 at 2015-02-23 22:17:36 -0800
340
+ Processing by MessagesController#update as HTML
341
+ Parameters: {"id"=>"3"}
342
+ Rendered text template (0.0ms)
343
+ Completed -1 in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
344
+ Message Load (0.1ms) SELECT "messages".* FROM "messages" WHERE "messages"."id" = ? LIMIT 1 [["id", 3]]
345
+  (0.1ms) begin transaction
346
+ SQL (0.4ms) UPDATE "messages" SET "body" = ?, "updated_at" = ? WHERE "messages"."id" = ? [["body", "Hello!"], ["updated_at", "2015-02-24 06:17:36.510782"], ["id", 3]]
347
+  (1.7ms) commit transaction