context_exposer 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +13 -1
  3. data/README.md +186 -16
  4. data/lib/context_exposer.rb +15 -0
  5. data/lib/context_exposer/base_controller.rb +67 -47
  6. data/lib/context_exposer/cached_resource_controller.rb +10 -0
  7. data/lib/context_exposer/integrations.rb +8 -0
  8. data/lib/context_exposer/integrations/base.rb +15 -0
  9. data/lib/context_exposer/integrations/key_filter.rb +30 -0
  10. data/lib/context_exposer/integrations/with_decent_exposure.rb +19 -0
  11. data/lib/context_exposer/integrations/with_decorates_before.rb +31 -0
  12. data/lib/context_exposer/integrations/with_instance_vars.rb +19 -0
  13. data/lib/context_exposer/macros.rb +17 -0
  14. data/lib/context_exposer/patch/decorates_before_rendering.rb +179 -0
  15. data/lib/context_exposer/rails_config.rb +3 -0
  16. data/lib/context_exposer/resource_controller.rb +30 -8
  17. data/lib/context_exposer/version.rb +1 -1
  18. data/lib/context_exposer/view_context.rb +1 -1
  19. data/spec/app/items_spec.rb +36 -0
  20. data/spec/app/posts_spec.rb +29 -1
  21. data/spec/context_exposer/expose_resource_spec.rb +51 -38
  22. data/spec/context_exposer/expose_spec.rb +11 -10
  23. data/spec/dummy/app/controllers/items_controller.rb +12 -0
  24. data/spec/dummy/app/controllers/posts_controller.rb +3 -4
  25. data/spec/dummy/app/views/items/index.html.erb +2 -0
  26. data/spec/dummy/app/views/items/show.html.erb +2 -0
  27. data/spec/dummy/app/views/posts/index.html.erb +2 -1
  28. data/spec/dummy/app/views/posts/show.html.erb +2 -1
  29. data/spec/dummy/config/initializers/context_exposer.rb +1 -0
  30. data/spec/dummy/config/routes.rb +1 -57
  31. data/spec/dummy/log/test.log +483 -0
  32. data/spec/dummy_spec_helper.rb +82 -0
  33. data/spec/spec_helper.rb +13 -1
  34. data/spec/support/decorators/base_decorator.rb +22 -0
  35. data/spec/support/decorators/item_decorator.rb +11 -0
  36. data/spec/support/decorators/post_decorator.rb +5 -0
  37. data/spec/support/models/base.rb +18 -0
  38. data/spec/support/models/base/clazz_methods.rb +29 -0
  39. data/spec/support/models/item.rb +9 -0
  40. data/spec/support/models/post.rb +5 -0
  41. metadata +38 -2
@@ -1 +1,29 @@
1
- # Run Capybara Spec on Dummy app PostsController
1
+ # Run Capybara Spec on Dummy app PostsController
2
+
3
+ require 'dummy_spec_helper'
4
+
5
+ feature 'show list of posts' do
6
+ before do
7
+ Post.new 'Post 1'
8
+ Post.new 'Post 2'
9
+ end
10
+
11
+ scenario '2 posts' do
12
+ visit posts_path
13
+
14
+ page.should have_content 'Post 1'
15
+ page.should have_content 'Post 2'
16
+ end
17
+ end
18
+
19
+ feature 'show post' do
20
+ before do
21
+ Post.new 'Post 1'
22
+ end
23
+
24
+ scenario 'one post' do
25
+ visit post_path(1)
26
+
27
+ page.should have_content 'Post 1'
28
+ end
29
+ end
@@ -1,39 +1,16 @@
1
- require 'context_exposer'
2
- # require 'rails'
3
- require 'action_controller'
1
+ require 'spec_helper'
4
2
 
5
- class Post
6
- attr_accessor :name
7
-
8
- def initialize name
9
- @name = name
10
- Post.add self
11
- end
12
-
13
- def self.find id
14
- list.first
15
- end
16
-
17
- def self.all
18
- Post.list
19
- end
20
-
21
- protected
22
-
23
- def self.add post
24
- list << post
25
- end
26
-
27
- def self.list
28
- @list ||= []
29
- end
30
- end
3
+ ContextExposer.patch :decorates_before_rendering
31
4
 
32
5
  class PostsController < ActionController::Base
33
- include ContextExposer::ResourceController
6
+ context_exposer :cached_resource
7
+ decorates_before_render
8
+
9
+ expose_resources :all
34
10
 
35
11
  def show
36
12
  configure_exposed_context
13
+ render
37
14
  end
38
15
 
39
16
  def index
@@ -41,6 +18,10 @@ class PostsController < ActionController::Base
41
18
 
42
19
  protected
43
20
 
21
+ def render *args
22
+ __auto_decorate_exposed_ones_
23
+ end
24
+
44
25
  def params
45
26
  {id: 1}
46
27
  end
@@ -68,15 +49,16 @@ describe ContextExposer::ResourceController do
68
49
  end
69
50
 
70
51
  it "defines a method context" do
71
- expect(subject).to respond_to(:context)
52
+ expect(subject).to respond_to(:ctx)
72
53
  end
73
54
 
74
55
  it "exposes the context to the view layer as a helper" do
75
- expect(subject._helper_methods).to include(:context)
56
+ expect(subject._helper_methods).to include(:ctx)
76
57
  end
77
58
 
78
59
  context 'context' do
79
- subject { controller.context }
60
+ subject { ctx }
61
+ let(:ctx) { controller.ctx }
80
62
 
81
63
  it "is an instance of ContextExposer::ViewContext" do
82
64
  expect(subject).to be_a ContextExposer::ViewContext
@@ -90,13 +72,44 @@ describe ContextExposer::ResourceController do
90
72
  expect(subject).to respond_to(:posts)
91
73
  end
92
74
 
93
- it "calling method :post returns 'My 1st post' " do
94
- expect(subject.post.name).to eq @post1.name
75
+ it "defines a method :posts_list" do
76
+ expect(subject).to respond_to(:posts_list)
95
77
  end
96
78
 
97
- it "calling method :posts returns all posts " do
98
- expect(subject.posts).to eq [@post1, @post2]
99
- end
79
+ context 'post' do
80
+ subject { post }
81
+ let(:post) { ctx.post }
82
+
83
+ it "calling method :post returns 'My 1st post' " do
84
+ expect(subject).to be_a PostDecorator
85
+ end
86
+
87
+ it "calling method :post returns 'My 1st post' " do
88
+ expect(subject.name).to eq @post1.name
89
+ end
90
+ end
91
+
92
+ context 'posts' do
93
+ subject { posts }
94
+ let(:posts) { ctx.posts }
95
+
96
+ it "calling method :posts returns all posts " do
97
+ expect(subject).to eq [@post1, @post2]
98
+ end
99
+ end
100
+
101
+ context 'posts_list' do
102
+ subject { posts_list }
103
+ let(:posts_list) { ctx.posts_list }
104
+
105
+ it "calling method :posts_list returns all posts " do
106
+ expect(subject).to eq [@post1, @post2]
107
+ end
108
+
109
+ it "first posts is a PostDecorator " do
110
+ expect(subject.first).to be_a PostDecorator
111
+ end
112
+ end
100
113
  end
101
114
  end
102
115
  end
@@ -1,5 +1,4 @@
1
- require 'context_exposer'
2
- require 'action_controller'
1
+ require 'spec_helper'
3
2
 
4
3
  class MyController < ActionController::Base
5
4
  include ContextExposer::BaseController
@@ -11,7 +10,9 @@ class MyController < ActionController::Base
11
10
  {decent: 'hi', hello: 'yo!'}
12
11
  end
13
12
 
14
- expose_decently except: %w{hello}
13
+ integrate_with :decent_exposure
14
+
15
+ context_expose :decently, except: %w{hello}
15
16
 
16
17
  def show
17
18
  configure_exposed_context
@@ -21,11 +22,11 @@ class MyController < ActionController::Base
21
22
  end
22
23
 
23
24
  class MyCoolController < ActionController::Base
24
- include ContextExposer::BaseController
25
+ context_exposer :base
25
26
 
26
27
  exposed(:coolness) { "MegaCool" }
27
28
 
28
- view_context_class :mega_cool_view_context
29
+ view_ctx_class :mega_cool_view_context
29
30
 
30
31
  def show
31
32
  configure_exposed_context
@@ -63,15 +64,15 @@ describe ContextExposer::BaseController do
63
64
  end
64
65
 
65
66
  it "defines a method context" do
66
- expect(subject).to respond_to(:context)
67
+ expect(subject).to respond_to(:ctx)
67
68
  end
68
69
 
69
70
  it "exposes the context to the view layer as a helper" do
70
- expect(subject._helper_methods).to include(:context)
71
+ expect(subject._helper_methods).to include(:ctx)
71
72
  end
72
73
 
73
74
  it "prevents the context method from being routable" do
74
- expect(subject.hidden_actions).to include("context")
75
+ expect(subject.hidden_actions).to include("ctx")
75
76
  end
76
77
 
77
78
  it 'configured exposed context' do
@@ -79,7 +80,7 @@ describe ContextExposer::BaseController do
79
80
  end
80
81
 
81
82
  context 'context' do
82
- subject { controller.context }
83
+ subject { controller.ctx }
83
84
 
84
85
  it "is an instance of ContextExposer::ViewContext" do
85
86
  expect(subject).to be_a ContextExposer::ViewContext
@@ -114,7 +115,7 @@ describe ContextExposer::BaseController do
114
115
  end
115
116
 
116
117
  context 'context' do
117
- subject { controller.context }
118
+ subject { controller.ctx }
118
119
 
119
120
  it "inherits from ContextExposer::ViewContext" do
120
121
  expect(subject).to be_a ContextExposer::ViewContext
@@ -0,0 +1,12 @@
1
+ class ItemsController < ApplicationController
2
+ decorates_before_render
3
+ context_exposer :cached_resource
4
+
5
+ expose_resources :all
6
+
7
+ def show
8
+ end
9
+
10
+ def index
11
+ end
12
+ end
@@ -1,11 +1,10 @@
1
1
  class PostsController < ApplicationController
2
2
  include ContextExposer::BaseController
3
3
 
4
- exposed(:post) { 'A post '}
4
+ exposed(:post) { Post.find 1 }
5
+ exposed(:posts) { Post.all }
5
6
 
6
- exposed(:posts) { ['A post ', 'Another post'] }
7
-
8
- def show
7
+ def show
9
8
  end
10
9
 
11
10
  def index
@@ -0,0 +1,2 @@
1
+ <h1>Items</h1>
2
+ <%= ctx.items_list.map {|i| i.nice_name }.inspect %>
@@ -0,0 +1,2 @@
1
+ <h2>Item</h2>
2
+ <%= ctx.item.nice_name %>
@@ -1 +1,2 @@
1
- <%= context.posts.inspect %>
1
+ <h1>Posts</h1>
2
+ <%= ctx.posts.join(',') %>
@@ -1 +1,2 @@
1
- <%= context.post.inspect %>
1
+ <h2>Post</h2>
2
+ <%= ctx.post.name %>
@@ -0,0 +1 @@
1
+ ContextExposer.patch :decorates_before_rendering
@@ -1,60 +1,4 @@
1
1
  Dummy::Application.routes.draw do
2
2
  resources :posts, only: [:show, :index]
3
-
4
- # The priority is based upon order of creation:
5
- # first created -> highest priority.
6
-
7
- # Sample of regular route:
8
- # match 'products/:id' => 'catalog#view'
9
- # Keep in mind you can assign values other than :controller and :action
10
-
11
- # Sample of named route:
12
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
13
- # This route can be invoked with purchase_url(:id => product.id)
14
-
15
- # Sample resource route (maps HTTP verbs to controller actions automatically):
16
- # resources :products
17
-
18
- # Sample resource route with options:
19
- # resources :products do
20
- # member do
21
- # get 'short'
22
- # post 'toggle'
23
- # end
24
- #
25
- # collection do
26
- # get 'sold'
27
- # end
28
- # end
29
-
30
- # Sample resource route with sub-resources:
31
- # resources :products do
32
- # resources :comments, :sales
33
- # resource :seller
34
- # end
35
-
36
- # Sample resource route with more complex sub-resources
37
- # resources :products do
38
- # resources :comments
39
- # resources :sales do
40
- # get 'recent', :on => :collection
41
- # end
42
- # end
43
-
44
- # Sample resource route within a namespace:
45
- # namespace :admin do
46
- # # Directs /admin/products/* to Admin::ProductsController
47
- # # (app/controllers/admin/products_controller.rb)
48
- # resources :products
49
- # end
50
-
51
- # You can have the root of your site routed with "root"
52
- # just remember to delete public/index.html.
53
- # root :to => 'welcome#index'
54
-
55
- # See how all your routes lay out with "rake routes"
56
-
57
- # This is a legacy wild controller route that's not recommended for RESTful applications.
58
- # Note: This route will make all actions in every controller accessible via GET requests.
59
- # match ':controller(/:action(/:id))(.:format)'
3
+ resources :items, only: [:show, :index]
60
4
  end
@@ -2161,3 +2161,486 @@ Creating scope :near. Overwriting existing method Property.near.
2161
2161
  MOPED: 127.0.0.1:27017 UPDATE database=fr_test collection=properties selector={"_id"=>"513dc72eff0961e88d000003", "address._id"=>"513dc72eff0961e88d000004"} update={"$set"=>{"address.street"=>"Griffenfeldsgade 11b", "address.full"=>"Griffenfeldsgade 11b, Copenhagen, Capital Region of Denmark, Capital Region of Denmark, Capital Region of Denmark, Capital Region of Denmark, Denmark, DK"}} flags=[] (0.1490ms)
2162
2162
  MOPED: 127.0.0.1:27017 UPDATE database=fr_test collection=properties selector={"_id"=>"513dc72eff0961e88d000003", "address._id"=>"513dc72eff0961e88d000004"} update={"$set"=>{"address.postal_code"=>"2200", "address.full"=>"Griffenfeldsgade 11b, Copenhagen, Capital Region of Denmark, Capital Region of Denmark, Capital Region of Denmark, Capital Region of Denmark, 2200, Denmark, DK"}} flags=[] (0.1228ms)
2163
2163
  MOPED: 127.0.0.1:27017 UPDATE database=fr_test collection=properties selector={"_id"=>"513dc72eff0961e88d000003"} update={"$set"=>{"position"=>[12.5549331, 55.68856839999999], "geocoded"=>true}} flags=[] (0.2398ms)
2164
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:46:55 +0100
2165
+ Processing by PostsController#index as HTML
2166
+ Rendered posts/index.html.erb within layouts/application (8.9ms)
2167
+ Completed 500 Internal Server Error in 19ms
2168
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:46:55 +0100
2169
+ Processing by PostsController#index as HTML
2170
+ Completed 500 Internal Server Error in 7ms
2171
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:49:01 +0100
2172
+ Processing by PostsController#index as HTML
2173
+ Rendered posts/index.html.erb within layouts/application (13.0ms)
2174
+ Completed 500 Internal Server Error in 21ms
2175
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:49:01 +0100
2176
+ Processing by PostsController#index as HTML
2177
+ Completed 500 Internal Server Error in 51ms
2178
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:52:08 +0100
2179
+ Processing by PostsController#index as HTML
2180
+ Rendered posts/index.html.erb within layouts/application (14.4ms)
2181
+ Completed 500 Internal Server Error in 253ms
2182
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:52:08 +0100
2183
+ Processing by PostsController#index as HTML
2184
+ Completed 500 Internal Server Error in 6ms
2185
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:52:35 +0100
2186
+ Processing by PostsController#index as HTML
2187
+ Rendered posts/index.html.erb within layouts/application (1.4ms)
2188
+ Completed 500 Internal Server Error in 13ms
2189
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:52:35 +0100
2190
+ Processing by PostsController#index as HTML
2191
+ Completed 500 Internal Server Error in 7ms
2192
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:53:37 +0100
2193
+ Processing by PostsController#index as HTML
2194
+ Rendered posts/index.html.erb within layouts/application (1.4ms)
2195
+ Completed 500 Internal Server Error in 10ms
2196
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:53:37 +0100
2197
+ Processing by PostsController#index as HTML
2198
+ Completed 500 Internal Server Error in 51ms
2199
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:54:34 +0100
2200
+ Processing by PostsController#index as HTML
2201
+ Rendered posts/index.html.erb within layouts/application (1.8ms)
2202
+ Completed 500 Internal Server Error in 13ms
2203
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:54:34 +0100
2204
+ Processing by PostsController#index as HTML
2205
+ Completed 500 Internal Server Error in 51ms
2206
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:54:51 +0100
2207
+ Processing by PostsController#index as HTML
2208
+ Rendered posts/index.html.erb within layouts/application (2.4ms)
2209
+ Completed 200 OK in 15ms (Views: 14.2ms)
2210
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:54:51 +0100
2211
+ Processing by PostsController#index as HTML
2212
+ Completed 200 OK in 2ms (Views: 1.6ms)
2213
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:55:06 +0100
2214
+ Processing by PostsController#index as HTML
2215
+ Rendered posts/index.html.erb within layouts/application (1.8ms)
2216
+ Completed 500 Internal Server Error in 13ms
2217
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:55:06 +0100
2218
+ Processing by PostsController#index as HTML
2219
+ Completed 500 Internal Server Error in 51ms
2220
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:55:42 +0100
2221
+ Processing by PostsController#index as HTML
2222
+ Completed 500 Internal Server Error in 2ms
2223
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 10:55:42 +0100
2224
+ Processing by PostsController#index as HTML
2225
+ Completed 500 Internal Server Error in 1ms
2226
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:04 +0100
2227
+ Processing by PostsController#index as HTML
2228
+ Rendered posts/index.html.erb within layouts/application (1.7ms)
2229
+ Completed 200 OK in 14ms (Views: 13.8ms)
2230
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:04 +0100
2231
+ Processing by PostsController#index as HTML
2232
+ Completed 200 OK in 2ms (Views: 1.8ms)
2233
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:20 +0100
2234
+ Processing by PostsController#index as HTML
2235
+ Rendered posts/index.html.erb within layouts/application (62.7ms)
2236
+ Completed 500 Internal Server Error in 70ms
2237
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:20 +0100
2238
+ Processing by PostsController#index as HTML
2239
+ Completed 500 Internal Server Error in 11ms
2240
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:30 +0100
2241
+ Processing by PostsController#index as HTML
2242
+ Rendered posts/index.html.erb within layouts/application (15.3ms)
2243
+ Completed 500 Internal Server Error in 23ms
2244
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:30 +0100
2245
+ Processing by PostsController#index as HTML
2246
+ Completed 500 Internal Server Error in 12ms
2247
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:50 +0100
2248
+ Processing by PostsController#index as HTML
2249
+ Rendered posts/index.html.erb within layouts/application (6.6ms)
2250
+ Completed 200 OK in 17ms (Views: 16.2ms)
2251
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:00:50 +0100
2252
+ Processing by PostsController#index as HTML
2253
+ Completed 200 OK in 7ms (Views: 6.7ms)
2254
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:01:45 +0100
2255
+ Processing by PostsController#index as HTML
2256
+ Rendered posts/index.html.erb within layouts/application (1.5ms)
2257
+ Completed 200 OK in 11ms (Views: 10.9ms)
2258
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:01:45 +0100
2259
+ Processing by PostsController#index as HTML
2260
+ Completed 200 OK in 2ms (Views: 1.8ms)
2261
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:02:09 +0100
2262
+ Processing by PostsController#index as HTML
2263
+ Rendered posts/index.html.erb within layouts/application (1.8ms)
2264
+ Completed 200 OK in 14ms (Views: 13.9ms)
2265
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 11:02:09 +0100
2266
+ Processing by PostsController#index as HTML
2267
+ Completed 200 OK in 2ms (Views: 1.8ms)
2268
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:09:07 +0100
2269
+ Processing by PostsController#index as HTML
2270
+ Rendered posts/index.html.erb within layouts/application (2.0ms)
2271
+ Completed 200 OK in 15ms (Views: 14.7ms)
2272
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:09:07 +0100
2273
+ Processing by PostsController#index as HTML
2274
+ Completed 200 OK in 3ms (Views: 3.0ms)
2275
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:19:41 +0100
2276
+ Processing by PostsController#index as HTML
2277
+ Completed 500 Internal Server Error in 1ms
2278
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:19:41 +0100
2279
+ Processing by PostsController#index as HTML
2280
+ Completed 500 Internal Server Error in 0ms
2281
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:19:55 +0100
2282
+ Processing by PostsController#index as HTML
2283
+ Rendered posts/index.html.erb within layouts/application (1.9ms)
2284
+ Completed 200 OK in 16ms (Views: 15.4ms)
2285
+ Started GET "/posts" for 127.0.0.1 at 2013-03-16 12:19:55 +0100
2286
+ Processing by PostsController#index as HTML
2287
+ Completed 200 OK in 2ms (Views: 1.8ms)
2288
+ Started GET "/posts" for 127.0.0.1 at 2013-03-17 12:27:42 +0100
2289
+ Processing by PostsController#index as HTML
2290
+ Rendered posts/index.html.erb within layouts/application (3.3ms)
2291
+ Completed 200 OK in 17ms (Views: 16.1ms)
2292
+ Started GET "/posts" for 127.0.0.1 at 2013-03-17 12:28:06 +0100
2293
+ Processing by PostsController#index as HTML
2294
+ Rendered posts/index.html.erb within layouts/application (1.5ms)
2295
+ Completed 200 OK in 12ms (Views: 11.1ms)
2296
+ Started GET "/posts" for 127.0.0.1 at 2013-03-17 12:28:41 +0100
2297
+ Processing by PostsController#index as HTML
2298
+ Rendered posts/index.html.erb within layouts/application (1.5ms)
2299
+ Completed 200 OK in 11ms (Views: 11.0ms)
2300
+ Started GET "/posts" for 127.0.0.1 at 2013-03-17 12:29:32 +0100
2301
+ Processing by PostsController#index as HTML
2302
+ Rendered posts/index.html.erb within layouts/application (1.5ms)
2303
+ Completed 200 OK in 12ms (Views: 11.1ms)
2304
+ Started GET "/posts/1" for 127.0.0.1 at 2013-03-17 12:29:32 +0100
2305
+ Processing by PostsController#show as HTML
2306
+ Parameters: {"id"=>"1"}
2307
+ Completed 200 OK in 6ms (Views: 5.0ms)
2308
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:29:53 +0100
2309
+ Processing by ItemsController#index as HTML
2310
+ Rendered items/index.html.erb within layouts/application (70.3ms)
2311
+ Completed 500 Internal Server Error in 81ms
2312
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:29:53 +0100
2313
+ Processing by ItemsController#show as HTML
2314
+ Parameters: {"id"=>"1"}
2315
+ Completed 500 Internal Server Error in 11ms
2316
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:42:56 +0100
2317
+ Processing by ItemsController#index as HTML
2318
+ Rendered items/index.html.erb within layouts/application (11.7ms)
2319
+ Completed 500 Internal Server Error in 21ms
2320
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:42:56 +0100
2321
+ Processing by ItemsController#show as HTML
2322
+ Parameters: {"id"=>"1"}
2323
+ Completed 500 Internal Server Error in 10ms
2324
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:44:17 +0100
2325
+ Processing by ItemsController#index as HTML
2326
+ Rendered items/index.html.erb within layouts/application (13.8ms)
2327
+ Completed 500 Internal Server Error in 23ms
2328
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:44:17 +0100
2329
+ Processing by ItemsController#show as HTML
2330
+ Parameters: {"id"=>"1"}
2331
+ Completed 500 Internal Server Error in 10ms
2332
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:45:00 +0100
2333
+ Processing by ItemsController#index as HTML
2334
+ Rendered items/index.html.erb within layouts/application (11.2ms)
2335
+ Completed 500 Internal Server Error in 61ms
2336
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:45:00 +0100
2337
+ Processing by ItemsController#show as HTML
2338
+ Parameters: {"id"=>"1"}
2339
+ Completed 500 Internal Server Error in 27ms
2340
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:45:17 +0100
2341
+ Processing by ItemsController#index as HTML
2342
+ Rendered items/index.html.erb within layouts/application (4.3ms)
2343
+ Completed 500 Internal Server Error in 56ms
2344
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:45:17 +0100
2345
+ Processing by ItemsController#show as HTML
2346
+ Parameters: {"id"=>"1"}
2347
+ Completed 500 Internal Server Error in 10ms
2348
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:45:30 +0100
2349
+ Processing by ItemsController#index as HTML
2350
+ Rendered items/index.html.erb within layouts/application (4.6ms)
2351
+ Completed 500 Internal Server Error in 55ms
2352
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:45:30 +0100
2353
+ Processing by ItemsController#show as HTML
2354
+ Parameters: {"id"=>"1"}
2355
+ Completed 500 Internal Server Error in 9ms
2356
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:47:05 +0100
2357
+ Processing by ItemsController#index as HTML
2358
+ Rendered items/index.html.erb within layouts/application (4.5ms)
2359
+ Completed 500 Internal Server Error in 12ms
2360
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:47:05 +0100
2361
+ Processing by ItemsController#show as HTML
2362
+ Parameters: {"id"=>"1"}
2363
+ Completed 200 OK in 5ms (Views: 4.6ms)
2364
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 12:47:28 +0100
2365
+ Processing by ItemsController#index as HTML
2366
+ Rendered items/index.html.erb within layouts/application (1.9ms)
2367
+ Completed 200 OK in 54ms (Views: 53.9ms)
2368
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 12:47:28 +0100
2369
+ Processing by ItemsController#show as HTML
2370
+ Parameters: {"id"=>"1"}
2371
+ Completed 200 OK in 3ms (Views: 2.9ms)
2372
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 13:43:18 +0100
2373
+ Processing by ItemsController#index as HTML
2374
+ Completed 500 Internal Server Error in 1ms
2375
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 13:43:18 +0100
2376
+ Processing by ItemsController#show as HTML
2377
+ Parameters: {"id"=>"1"}
2378
+ Completed 500 Internal Server Error in 1ms
2379
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 13:43:38 +0100
2380
+ Processing by ItemsController#index as HTML
2381
+ decorates_before_render: auto_decorate error: #{e}
2382
+ Rendered items/index.html.erb within layouts/application (2.3ms)
2383
+ Completed 200 OK in 16ms (Views: 15.1ms)
2384
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 13:43:39 +0100
2385
+ Processing by ItemsController#show as HTML
2386
+ Parameters: {"id"=>"1"}
2387
+ decorates_before_render: auto_decorate error: #{e}
2388
+ Completed 200 OK in 4ms (Views: 3.5ms)
2389
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 14:17:43 +0100
2390
+ Processing by ItemsController#index as HTML
2391
+ decorates_before_render: auto_decorate error: #{e}
2392
+ Rendered items/index.html.erb within layouts/application (2.3ms)
2393
+ Completed 200 OK in 61ms (Views: 60.1ms)
2394
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 14:21:35 +0100
2395
+ Processing by ItemsController#index as HTML
2396
+ Rendered items/index.html.erb within layouts/application (2.1ms)
2397
+ Completed 200 OK in 14ms (Views: 14.0ms)
2398
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 14:22:05 +0100
2399
+ Processing by ItemsController#index as HTML
2400
+ Rendered items/index.html.erb within layouts/application (2.1ms)
2401
+ Completed 200 OK in 15ms (Views: 14.9ms)
2402
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 14:22:05 +0100
2403
+ Processing by ItemsController#show as HTML
2404
+ Parameters: {"id"=>"1"}
2405
+ Completed 500 Internal Server Error in 6ms
2406
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:16:02 +0100
2407
+ Processing by ItemsController#index as HTML
2408
+ Rendered items/index.html.erb within layouts/application (2.0ms)
2409
+ Completed 200 OK in 15ms (Views: 14.2ms)
2410
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:16:02 +0100
2411
+ Processing by ItemsController#show as HTML
2412
+ Parameters: {"id"=>"1"}
2413
+ decorates_before_render: auto_decorate error: #{e}
2414
+ Completed 500 Internal Server Error in 8ms
2415
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:16:44 +0100
2416
+ Processing by ItemsController#index as HTML
2417
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2418
+ Completed 200 OK in 12ms (Views: 11.1ms)
2419
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:16:44 +0100
2420
+ Processing by ItemsController#show as HTML
2421
+ Parameters: {"id"=>"1"}
2422
+ decorates_before_render: auto_decorate error: #{e}
2423
+ Completed 500 Internal Server Error in 8ms
2424
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:18:35 +0100
2425
+ Processing by ItemsController#index as HTML
2426
+ Rendered items/index.html.erb within layouts/application (7.7ms)
2427
+ Completed 500 Internal Server Error in 16ms
2428
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:18:35 +0100
2429
+ Processing by ItemsController#show as HTML
2430
+ Parameters: {"id"=>"1"}
2431
+ decorates_before_render: auto_decorate error: #{e}
2432
+ Completed 500 Internal Server Error in 6ms
2433
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:19:13 +0100
2434
+ Processing by ItemsController#index as HTML
2435
+ Rendered items/index.html.erb within layouts/application (3.8ms)
2436
+ Completed 500 Internal Server Error in 13ms
2437
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:19:13 +0100
2438
+ Processing by ItemsController#show as HTML
2439
+ Parameters: {"id"=>"1"}
2440
+ decorates_before_render: auto_decorate error: #{e}
2441
+ Completed 500 Internal Server Error in 6ms
2442
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:20:21 +0100
2443
+ Processing by ItemsController#index as HTML
2444
+ Rendered items/index.html.erb within layouts/application (3.8ms)
2445
+ Completed 500 Internal Server Error in 12ms
2446
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:20:21 +0100
2447
+ Processing by ItemsController#show as HTML
2448
+ Parameters: {"id"=>"1"}
2449
+ Completed 200 OK in 7ms (Views: 4.7ms)
2450
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:20:35 +0100
2451
+ Processing by ItemsController#index as HTML
2452
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2453
+ Completed 200 OK in 13ms (Views: 11.5ms)
2454
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:20:35 +0100
2455
+ Processing by ItemsController#show as HTML
2456
+ Parameters: {"id"=>"1"}
2457
+ Completed 200 OK in 4ms (Views: 2.7ms)
2458
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:21:31 +0100
2459
+ Processing by ItemsController#index as HTML
2460
+ Rendered items/index.html.erb within layouts/application (1.8ms)
2461
+ Completed 200 OK in 14ms (Views: 12.8ms)
2462
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:21:31 +0100
2463
+ Processing by ItemsController#index as HTML
2464
+ Completed 200 OK in 3ms (Views: 1.8ms)
2465
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:21:31 +0100
2466
+ Processing by ItemsController#show as HTML
2467
+ Parameters: {"id"=>"1"}
2468
+ Completed 200 OK in 4ms (Views: 2.8ms)
2469
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:22:39 +0100
2470
+ Processing by ItemsController#index as HTML
2471
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2472
+ Completed 200 OK in 12ms (Views: 11.0ms)
2473
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:22:39 +0100
2474
+ Processing by ItemsController#index as HTML
2475
+ Completed 200 OK in 3ms (Views: 1.7ms)
2476
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:22:39 +0100
2477
+ Processing by ItemsController#show as HTML
2478
+ Parameters: {"id"=>"1"}
2479
+ Completed 200 OK in 4ms (Views: 2.8ms)
2480
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:23:42 +0100
2481
+ Processing by ItemsController#index as HTML
2482
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2483
+ Completed 200 OK in 12ms (Views: 11.0ms)
2484
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:23:42 +0100
2485
+ Processing by ItemsController#index as HTML
2486
+ Completed 200 OK in 3ms (Views: 1.7ms)
2487
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:23:42 +0100
2488
+ Processing by ItemsController#show as HTML
2489
+ Parameters: {"id"=>"1"}
2490
+ Completed 200 OK in 4ms (Views: 2.6ms)
2491
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:24:05 +0100
2492
+ Processing by ItemsController#index as HTML
2493
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2494
+ Completed 200 OK in 12ms (Views: 11.2ms)
2495
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:24:05 +0100
2496
+ Processing by ItemsController#index as HTML
2497
+ Completed 200 OK in 4ms (Views: 2.7ms)
2498
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:24:05 +0100
2499
+ Processing by ItemsController#show as HTML
2500
+ Parameters: {"id"=>"1"}
2501
+ Completed 200 OK in 4ms (Views: 2.8ms)
2502
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:24:50 +0100
2503
+ Processing by ItemsController#index as HTML
2504
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2505
+ Completed 200 OK in 24ms (Views: 23.2ms)
2506
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:24:50 +0100
2507
+ Processing by ItemsController#index as HTML
2508
+ Completed 200 OK in 3ms (Views: 1.8ms)
2509
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:24:50 +0100
2510
+ Processing by ItemsController#show as HTML
2511
+ Parameters: {"id"=>"1"}
2512
+ Completed 200 OK in 4ms (Views: 2.8ms)
2513
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:27:32 +0100
2514
+ Processing by ItemsController#index as HTML
2515
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2516
+ Completed 200 OK in 13ms (Views: 11.7ms)
2517
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:27:32 +0100
2518
+ Processing by ItemsController#index as HTML
2519
+ Completed 200 OK in 3ms (Views: 1.8ms)
2520
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:27:32 +0100
2521
+ Processing by ItemsController#show as HTML
2522
+ Parameters: {"id"=>"1"}
2523
+ Completed 200 OK in 4ms (Views: 2.7ms)
2524
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:28:08 +0100
2525
+ Processing by ItemsController#index as HTML
2526
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2527
+ Completed 200 OK in 12ms (Views: 11.2ms)
2528
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:28:08 +0100
2529
+ Processing by ItemsController#index as HTML
2530
+ Completed 200 OK in 3ms (Views: 1.7ms)
2531
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:28:08 +0100
2532
+ Processing by ItemsController#show as HTML
2533
+ Parameters: {"id"=>"1"}
2534
+ Completed 200 OK in 5ms (Views: 3.8ms)
2535
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:30:33 +0100
2536
+ Processing by ItemsController#index as HTML
2537
+ Rendered items/index.html.erb within layouts/application (1.9ms)
2538
+ Completed 200 OK in 15ms (Views: 14.0ms)
2539
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:30:33 +0100
2540
+ Processing by ItemsController#index as HTML
2541
+ Completed 200 OK in 3ms (Views: 1.9ms)
2542
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:30:33 +0100
2543
+ Processing by ItemsController#show as HTML
2544
+ Parameters: {"id"=>"1"}
2545
+ Completed 200 OK in 6ms (Views: 4.4ms)
2546
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:31:14 +0100
2547
+ Processing by ItemsController#index as HTML
2548
+ Rendered items/index.html.erb within layouts/application (1.9ms)
2549
+ Completed 200 OK in 15ms (Views: 14.1ms)
2550
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:31:14 +0100
2551
+ Processing by ItemsController#index as HTML
2552
+ Completed 200 OK in 4ms (Views: 2.5ms)
2553
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:31:14 +0100
2554
+ Processing by ItemsController#show as HTML
2555
+ Parameters: {"id"=>"1"}
2556
+ Completed 200 OK in 6ms (Views: 4.0ms)
2557
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:33:52 +0100
2558
+ Processing by ItemsController#index as HTML
2559
+ Rendered items/index.html.erb within layouts/application (3.5ms)
2560
+ Completed 200 OK in 22ms (Views: 20.9ms)
2561
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:33:52 +0100
2562
+ Processing by ItemsController#index as HTML
2563
+ Completed 200 OK in 4ms (Views: 1.9ms)
2564
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:33:52 +0100
2565
+ Processing by ItemsController#show as HTML
2566
+ Parameters: {"id"=>"1"}
2567
+ Completed 200 OK in 6ms (Views: 3.4ms)
2568
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:35:01 +0100
2569
+ Processing by ItemsController#index as HTML
2570
+ Rendered items/index.html.erb within layouts/application (1.9ms)
2571
+ Completed 200 OK in 16ms (Views: 14.0ms)
2572
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:35:02 +0100
2573
+ Processing by ItemsController#index as HTML
2574
+ Completed 500 Internal Server Error in 6ms
2575
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:35:02 +0100
2576
+ Processing by ItemsController#show as HTML
2577
+ Parameters: {"id"=>"1"}
2578
+ Completed 200 OK in 5ms (Views: 3.1ms)
2579
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:35:47 +0100
2580
+ Processing by ItemsController#index as HTML
2581
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2582
+ Completed 200 OK in 13ms (Views: 11.2ms)
2583
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:35:47 +0100
2584
+ Processing by ItemsController#index as HTML
2585
+ Completed 500 Internal Server Error in 6ms
2586
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:35:47 +0100
2587
+ Processing by ItemsController#show as HTML
2588
+ Parameters: {"id"=>"1"}
2589
+ Completed 200 OK in 5ms (Views: 3.1ms)
2590
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:36:18 +0100
2591
+ Processing by ItemsController#index as HTML
2592
+ Rendered items/index.html.erb within layouts/application (1.5ms)
2593
+ Completed 200 OK in 13ms (Views: 11.2ms)
2594
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:36:18 +0100
2595
+ Processing by ItemsController#index as HTML
2596
+ Completed 200 OK in 3ms (Views: 1.9ms)
2597
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:36:18 +0100
2598
+ Processing by ItemsController#show as HTML
2599
+ Parameters: {"id"=>"1"}
2600
+ Completed 200 OK in 5ms (Views: 2.8ms)
2601
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:36:35 +0100
2602
+ Processing by ItemsController#index as HTML
2603
+ Rendered items/index.html.erb within layouts/application (1.8ms)
2604
+ Completed 200 OK in 16ms (Views: 14.5ms)
2605
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:36:35 +0100
2606
+ Processing by ItemsController#index as HTML
2607
+ Completed 200 OK in 3ms (Views: 1.7ms)
2608
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:36:35 +0100
2609
+ Processing by ItemsController#show as HTML
2610
+ Parameters: {"id"=>"1"}
2611
+ Completed 200 OK in 5ms (Views: 3.1ms)
2612
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:37:04 +0100
2613
+ Processing by ItemsController#index as HTML
2614
+ Rendered items/index.html.erb within layouts/application (2.0ms)
2615
+ Completed 200 OK in 16ms (Views: 14.8ms)
2616
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:37:04 +0100
2617
+ Processing by ItemsController#index as HTML
2618
+ Completed 200 OK in 3ms (Views: 1.8ms)
2619
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:37:04 +0100
2620
+ Processing by ItemsController#show as HTML
2621
+ Parameters: {"id"=>"1"}
2622
+ Completed 200 OK in 6ms (Views: 3.2ms)
2623
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:38:08 +0100
2624
+ Processing by ItemsController#index as HTML
2625
+ Rendered items/index.html.erb within layouts/application (1.9ms)
2626
+ Completed 200 OK in 16ms (Views: 14.3ms)
2627
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:38:08 +0100
2628
+ Processing by ItemsController#show as HTML
2629
+ Parameters: {"id"=>"1"}
2630
+ Completed 200 OK in 5ms (Views: 3.2ms)
2631
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:38:27 +0100
2632
+ Processing by ItemsController#index as HTML
2633
+ Rendered items/index.html.erb within layouts/application (2.0ms)
2634
+ Completed 200 OK in 16ms (Views: 14.5ms)
2635
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:38:27 +0100
2636
+ Processing by ItemsController#show as HTML
2637
+ Parameters: {"id"=>"1"}
2638
+ Completed 200 OK in 5ms (Views: 3.2ms)
2639
+ Started GET "/items" for 127.0.0.1 at 2013-03-17 16:40:10 +0100
2640
+ Processing by ItemsController#index as HTML
2641
+ Rendered items/index.html.erb within layouts/application (2.0ms)
2642
+ Completed 200 OK in 16ms (Views: 14.6ms)
2643
+ Started GET "/items/1" for 127.0.0.1 at 2013-03-17 16:40:10 +0100
2644
+ Processing by ItemsController#show as HTML
2645
+ Parameters: {"id"=>"1"}
2646
+ Completed 200 OK in 4ms (Views: 3.2ms)