disclaimer 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -87,6 +87,18 @@ Segments at /disclaimer/segments. If you wish to modify the controller behaviour
87
87
  to the same location in your application, and modify these copies. The versions
88
88
  in your application will take precedence over those in disclaimer.
89
89
 
90
+ == Routing
91
+
92
+ Disclaimer uses a redirect to send a user to the disclaimer document. So as to
93
+ determine the correct path irrespective of where the app is hosted, the redirect
94
+ uses the hosts apps root path to build the redirect url. For this to work, root
95
+ needs to be defined in the host apps routes.
96
+
97
+ Alternatively, you can over-ride the host root url used in the redirect by
98
+ setting host_app_root_path in an initializer:
99
+
100
+ Disclaimer.host_app_root_path= '/app1'
101
+
90
102
  == Managing views
91
103
 
92
104
  The default views are simple, and you will probably want to modify them.
@@ -106,4 +118,4 @@ the option used in test/dummy:
106
118
 
107
119
  disclaimer Disclaimer::Document.first.name.to_sym
108
120
 
109
- This will display the first disclaimer document in your database.
121
+ This will display the first disclaimer document in your database.
data/lib/disclaimer.rb CHANGED
@@ -11,4 +11,14 @@ module Disclaimer
11
11
  def self.enable_crud!
12
12
  @enable_crud = true
13
13
  end
14
+
15
+ def self.host_app_root_path
16
+ @host_app_root_path
17
+ end
18
+
19
+ def self.host_app_root_path=(path)
20
+ @host_app_root_path = path
21
+ end
22
+
23
+
14
24
  end
@@ -1,11 +1,17 @@
1
1
  module Disclaimer
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
4
4
 
5
5
  # History
6
6
  #
7
+ # 0.0.6 - Improves redirect mechanism
8
+ # -----------------------------------
9
+ # Uses host apps root path to determine redirect path. This allows modifications
10
+ # to the route caused by the app being mounted in a sub uri, to be taken account
11
+ # of in the redirect url.
12
+ #
7
13
  # 0.0.5 - Bug fix
8
- # -----------------------
14
+ # ---------------
9
15
  # Defaults to '/' if no previous route found
10
16
  #
11
17
  # 0.0.4 - Improvement
@@ -14,7 +14,7 @@ module ActionController
14
14
  unless disclaimer_has_been_accepted
15
15
  store_disclaimer_return_location
16
16
  document = Disclaimer::Document.find_by_name(@disclaimer_document_name)
17
- redirect_to disclaimer.document_path(document)
17
+ redirect_to host_app_root_path + disclaimer.document_path(document)
18
18
  end
19
19
  end
20
20
 
@@ -35,6 +35,10 @@ module ActionController
35
35
  return false
36
36
  end
37
37
  end
38
+
39
+ def host_app_root_path
40
+ (Disclaimer.host_app_root_path || main_app.root_path).gsub(/\/$/, "")
41
+ end
38
42
 
39
43
  end
40
44
  end
@@ -1,5 +1,7 @@
1
1
  Rails.application.routes.draw do
2
2
 
3
+ root :to => 'sample#index'
4
+
3
5
  resources :sample, :only => [:index] do
4
6
  collection do
5
7
  get :bypass_disclaimer
Binary file
@@ -15294,489 +15294,5 @@ Served asset /disclaimer/application.js - 304 Not Modified (0ms)
15294
15294
 
15295
15295
  Started GET "/assets/disclaimer/segments.js?body=1" for 127.0.0.1 at 2013-01-24 10:12:59 +0000
15296
15296
  Served asset /disclaimer/segments.js - 304 Not Modified (0ms)
15297
-
15298
-
15299
- Started GET "/" for 127.0.0.1 at 2013-04-17 16:26:51 +0100
15300
15297
  Connecting to database specified by database.yml
15301
-
15302
- ActionController::RoutingError (No route matches [GET] "/"):
15303
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15304
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15305
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15306
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15307
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15308
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15309
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15310
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15311
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15312
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15313
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15314
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15315
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15316
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15317
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15318
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15319
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15320
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15321
-
15322
-
15323
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (2.9ms)
15324
-
15325
-
15326
- Started GET "/disclaimer/documents" for 127.0.0.1 at 2013-04-17 16:27:01 +0100
15327
- Processing by Disclaimer::DocumentsController#index as HTML
15328
- Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" 
15329
- Disclaimer::Segment Load (0.5ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
15330
- Rendered /home/rob/web/disclaimer/app/views/disclaimer/documents/index.html.erb within layouts/disclaimer/application (182.4ms)
15331
- Completed 200 OK in 358ms (Views: 203.2ms | ActiveRecord: 15.7ms)
15332
-
15333
-
15334
- Started GET "/assets/disclaimer/application.css?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15335
- Served asset /disclaimer/application.css - 200 OK (15ms)
15336
-
15337
-
15338
- Started GET "/assets/disclaimer/documents.css?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15339
- Served asset /disclaimer/documents.css - 200 OK (11ms)
15340
-
15341
-
15342
- Started GET "/assets/disclaimer/segments.css?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15343
- Served asset /disclaimer/segments.css - 200 OK (19ms)
15344
-
15345
-
15346
- Started GET "/assets/disclaimer/documents.js?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15347
- Served asset /disclaimer/documents.js - 200 OK (20ms)
15348
-
15349
-
15350
- Started GET "/assets/disclaimer/segments.js?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15351
- Served asset /disclaimer/segments.js - 200 OK (8ms)
15352
-
15353
-
15354
- Started GET "/assets/disclaimer/application.js?body=1" for 127.0.0.1 at 2013-04-17 16:27:02 +0100
15355
- Served asset /disclaimer/application.js - 200 OK (23ms)
15356
-
15357
-
15358
- Started GET "/disclaimer/documents/main" for 127.0.0.1 at 2013-04-17 16:27:07 +0100
15359
- Processing by Disclaimer::DocumentsController#show as HTML
15360
- Parameters: {"id"=>"main"}
15361
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15362
- Disclaimer::Segment Load (0.4ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
15363
- Rendered /home/rob/web/disclaimer/app/views/disclaimer/documents/show.html.erb within layouts/disclaimer/application (12.3ms)
15364
- Completed 200 OK in 69ms (Views: 19.8ms | ActiveRecord: 0.7ms)
15365
-
15366
-
15367
- Started POST "/disclaimer/documents/main/accept" for 127.0.0.1 at 2013-04-17 16:27:16 +0100
15368
- Processing by Disclaimer::DocumentsController#accept as HTML
15369
- Parameters: {"utf8"=>"✓", "authenticity_token"=>"DMUnUN9nP4U5kzhGvioPxRnmHG2Q26A8qMyYMPYCTOE=", "commit"=>"Accept", "id"=>"main"}
15370
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15371
- Redirected to http://localhost:3000/
15372
- Completed 302 Found in 2ms (ActiveRecord: 0.3ms)
15373
-
15374
-
15375
- Started GET "/" for 127.0.0.1 at 2013-04-17 16:27:16 +0100
15376
-
15377
- ActionController::RoutingError (No route matches [GET] "/"):
15378
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15379
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15380
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15381
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15382
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15383
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15384
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15385
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15386
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15387
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15388
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15389
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15390
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15391
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15392
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15393
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15394
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15395
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15396
-
15397
-
15398
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.7ms)
15399
-
15400
-
15401
- Started GET "/samples" for 127.0.0.1 at 2013-04-17 16:27:27 +0100
15402
-
15403
- ActionController::RoutingError (No route matches [GET] "/samples"):
15404
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15405
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15406
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15407
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15408
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15409
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15410
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15411
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15412
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15413
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15414
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15415
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15416
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15417
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15418
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15419
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15420
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15421
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15422
-
15423
-
15424
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (0.8ms)
15425
-
15426
-
15427
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:27:35 +0100
15428
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
15429
- Processing by SampleController#index as HTML
15430
- Rendered sample/index.html.erb within layouts/application (0.5ms)
15431
- Completed 500 Internal Server Error in 181ms
15432
-
15433
- ActionView::Template::Error (couldn't find file 'jquery'
15434
- (in /home/rob/web/disclaimer/test/dummy/app/assets/javascripts/application.js:13)):
15435
- 3: <head>
15436
- 4: <title>Dummy</title>
15437
- 5: <%= stylesheet_link_tag "application", :media => "all" %>
15438
- 6: <%= javascript_include_tag "application" %>
15439
- 7: <%= csrf_meta_tags %>
15440
- 8: </head>
15441
- 9: <body>
15442
- app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___626912728_84566440'
15443
-
15444
-
15445
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (3.1ms)
15446
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.4ms)
15447
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (34.8ms)
15448
-
15449
-
15450
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:28:53 +0100
15451
- Processing by SampleController#index as HTML
15452
- Rendered sample/index.html.erb within layouts/application (0.1ms)
15453
- Completed 500 Internal Server Error in 48ms
15454
-
15455
- ActionView::Template::Error (couldn't find file 'jquery'
15456
- (in /home/rob/web/disclaimer/test/dummy/app/assets/javascripts/application.js:13)):
15457
- 3: <head>
15458
- 4: <title>Dummy</title>
15459
- 5: <%= stylesheet_link_tag "application", :media => "all" %>
15460
- 6: <%= javascript_include_tag "application" %>
15461
- 7: <%= csrf_meta_tags %>
15462
- 8: </head>
15463
- 9: <body>
15464
- app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___626912728_84566440'
15465
-
15466
-
15467
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (10.2ms)
15468
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (6.7ms)
15469
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (30.8ms)
15470
-
15471
-
15472
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:29:21 +0100
15473
- Processing by SampleController#index as HTML
15474
- Rendered sample/index.html.erb within layouts/application (0.1ms)
15475
- Completed 500 Internal Server Error in 44ms
15476
-
15477
- ActionView::Template::Error (couldn't find file 'jquery'
15478
- (in /home/rob/web/disclaimer/test/dummy/app/assets/javascripts/application.js:13)):
15479
- 3: <head>
15480
- 4: <title>Dummy</title>
15481
- 5: <%= stylesheet_link_tag "application", :media => "all" %>
15482
- 6: <%= javascript_include_tag "application" %>
15483
- 7: <%= csrf_meta_tags %>
15484
- 8: </head>
15485
- 9: <body>
15486
- app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___626912728_84566440'
15487
-
15488
-
15489
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
15490
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.3ms)
15491
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (11.9ms)
15492
-
15493
-
15494
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:29:34 +0100
15495
15298
  Connecting to database specified by database.yml
15496
- Disclaimer::Document Load (1.6ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
15497
- Processing by SampleController#index as HTML
15498
- Rendered sample/index.html.erb within layouts/application (42.8ms)
15499
- Completed 500 Internal Server Error in 92ms
15500
-
15501
- ActionView::Template::Error (couldn't find file 'jquery'
15502
- (in /home/rob/web/disclaimer/test/dummy/app/assets/javascripts/application.js:13)):
15503
- 3: <head>
15504
- 4: <title>Dummy</title>
15505
- 5: <%= stylesheet_link_tag "application", :media => "all" %>
15506
- 6: <%= javascript_include_tag "application" %>
15507
- 7: <%= csrf_meta_tags %>
15508
- 8: </head>
15509
- 9: <body>
15510
- app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__102100804_77081820'
15511
-
15512
-
15513
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (8.8ms)
15514
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.3ms)
15515
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (19.0ms)
15516
-
15517
-
15518
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:30:09 +0100
15519
- Processing by SampleController#index as HTML
15520
- Rendered sample/index.html.erb within layouts/application (0.1ms)
15521
- Completed 200 OK in 14ms (Views: 13.3ms | ActiveRecord: 0.0ms)
15522
-
15523
-
15524
- Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-04-17 16:30:09 +0100
15525
- Served asset /application.css - 200 OK (3ms)
15526
-
15527
-
15528
- Started GET "/assets/sample.css?body=1" for 127.0.0.1 at 2013-04-17 16:30:09 +0100
15529
- Served asset /sample.css - 200 OK (9ms)
15530
-
15531
-
15532
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:31:12 +0100
15533
- Processing by SampleController#index as HTML
15534
- Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15535
- Redirected to http://localhost:3000/disclaimer/documents/main
15536
- Filter chain halted as #<Proc:0xb6268a5c@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:6> rendered or redirected
15537
- Completed 302 Found in 76ms (ActiveRecord: 0.2ms)
15538
-
15539
-
15540
- Started GET "/disclaimer/documents/main" for 127.0.0.1 at 2013-04-17 16:31:12 +0100
15541
- Processing by Disclaimer::DocumentsController#show as HTML
15542
- Parameters: {"id"=>"main"}
15543
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15544
- Disclaimer::Segment Load (0.5ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
15545
- Rendered /home/rob/web/disclaimer/app/views/disclaimer/documents/show.html.erb within layouts/disclaimer/application (160.4ms)
15546
- Completed 200 OK in 177ms (Views: 174.0ms | ActiveRecord: 1.7ms)
15547
-
15548
-
15549
- Started POST "/disclaimer/documents/main/accept" for 127.0.0.1 at 2013-04-17 16:32:04 +0100
15550
- Processing by Disclaimer::DocumentsController#accept as HTML
15551
- Parameters: {"utf8"=>"✓", "authenticity_token"=>"c/JYEwov2fk6jVPQXwheFVb0r4fjtoGx998Xldh7cDU=", "commit"=>"Accept", "id"=>"main"}
15552
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15553
- Redirected to http://localhost:3000/
15554
- Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
15555
-
15556
-
15557
- Started GET "/" for 127.0.0.1 at 2013-04-17 16:32:04 +0100
15558
-
15559
- ActionController::RoutingError (No route matches [GET] "/"):
15560
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15561
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15562
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15563
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15564
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15565
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15566
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15567
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15568
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15569
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15570
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15571
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15572
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15573
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15574
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15575
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15576
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15577
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15578
-
15579
-
15580
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (5.8ms)
15581
-
15582
-
15583
- Started GET "/" for 127.0.0.1 at 2013-04-17 16:32:42 +0100
15584
-
15585
- ActionController::RoutingError (No route matches [GET] "/"):
15586
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15587
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15588
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15589
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15590
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15591
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15592
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15593
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15594
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15595
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15596
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15597
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15598
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15599
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15600
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15601
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15602
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15603
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15604
-
15605
-
15606
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (6.2ms)
15607
-
15608
-
15609
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:33:06 +0100
15610
- Disclaimer::Document Load (0.1ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" LIMIT 1
15611
- Processing by SampleController#index as HTML
15612
- Rendered sample/index.html.erb within layouts/application (0.1ms)
15613
- Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 0.0ms)
15614
-
15615
-
15616
- Started GET "/sample" for 127.0.0.1 at 2013-04-17 16:33:45 +0100
15617
- Processing by SampleController#index as HTML
15618
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15619
- Redirected to http://localhost:3000/disclaimer/documents/main
15620
- Filter chain halted as #<Proc:0x92b7dbc@/home/rob/web/disclaimer/lib/rails/actionpack/lib/action_controller/base.rb:6> rendered or redirected
15621
- Completed 302 Found in 9ms (ActiveRecord: 0.3ms)
15622
-
15623
-
15624
- Started GET "/disclaimer/documents/main" for 127.0.0.1 at 2013-04-17 16:33:45 +0100
15625
- Processing by Disclaimer::DocumentsController#show as HTML
15626
- Parameters: {"id"=>"main"}
15627
- Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15628
- Disclaimer::Segment Load (0.3ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
15629
- Rendered /home/rob/web/disclaimer/app/views/disclaimer/documents/show.html.erb within layouts/disclaimer/application (42.9ms)
15630
- Completed 200 OK in 106ms (Views: 100.0ms | ActiveRecord: 4.0ms)
15631
-
15632
-
15633
- Started POST "/disclaimer/documents/main/accept" for 127.0.0.1 at 2013-04-17 16:34:23 +0100
15634
- Processing by Disclaimer::DocumentsController#accept as HTML
15635
- Parameters: {"utf8"=>"✓", "authenticity_token"=>"qmOkIAYd7qBUTUnBZcwdi1+F5Unobj00bGvctUfgzdk=", "commit"=>"Accept", "id"=>"main"}
15636
- Disclaimer::Document Load (0.3ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15637
- Redirected to http://localhost:3000/
15638
- Completed 302 Found in 4ms (ActiveRecord: 0.3ms)
15639
-
15640
-
15641
- Started GET "/" for 127.0.0.1 at 2013-04-17 16:34:23 +0100
15642
-
15643
- ActionController::RoutingError (No route matches [GET] "/"):
15644
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
15645
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15646
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15647
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15648
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15649
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15650
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15651
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15652
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15653
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15654
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15655
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15656
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15657
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15658
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15659
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15660
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15661
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15662
-
15663
-
15664
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.3ms)
15665
- Connecting to database specified by database.yml
15666
-
15667
-
15668
- Started POST "/disclaimer/documents/main/accept" for 127.0.0.1 at 2013-04-17 16:42:43 +0100
15669
- Connecting to database specified by database.yml
15670
- Processing by Disclaimer::DocumentsController#accept as HTML
15671
- Parameters: {"utf8"=>"✓", "authenticity_token"=>"qmOkIAYd7qBUTUnBZcwdi1+F5Unobj00bGvctUfgzdk=", "commit"=>"Accept", "id"=>"main"}
15672
- Disclaimer::Document Load (0.4ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15673
- Completed 500 Internal Server Error in 115ms
15674
-
15675
- NameError (undefined local variable or method `sample_index_path' for #<Disclaimer::DocumentsController:0xb6b19e80>):
15676
- /home/rob/web/disclaimer/app/controllers/disclaimer/documents_controller.rb:74:in `host_app_root'
15677
- /home/rob/web/disclaimer/app/controllers/disclaimer/documents_controller.rb:44:in `accept'
15678
- actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
15679
- actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action'
15680
- actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action'
15681
- actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
15682
- activesupport (3.2.8) lib/active_support/callbacks.rb:414:in `_run__723110879__process_action__838989266__callbacks'
15683
- activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
15684
- activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
15685
- activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
15686
- actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action'
15687
- actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action'
15688
- actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
15689
- activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument'
15690
- activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
15691
- activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument'
15692
- actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
15693
- actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
15694
- activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
15695
- actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process'
15696
- actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process'
15697
- actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch'
15698
- actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
15699
- actionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action'
15700
- actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call'
15701
- actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
15702
- actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call'
15703
- journey (1.0.4) lib/journey/router.rb:68:in `block in call'
15704
- journey (1.0.4) lib/journey/router.rb:56:in `each'
15705
- journey (1.0.4) lib/journey/router.rb:56:in `call'
15706
- actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'
15707
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15708
- railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing'
15709
- journey (1.0.4) lib/journey/router.rb:68:in `block in call'
15710
- journey (1.0.4) lib/journey/router.rb:56:in `each'
15711
- journey (1.0.4) lib/journey/router.rb:56:in `call'
15712
- actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call'
15713
- actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
15714
- rack (1.4.1) lib/rack/etag.rb:23:in `call'
15715
- rack (1.4.1) lib/rack/conditionalget.rb:35:in `call'
15716
- actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call'
15717
- actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
15718
- actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call'
15719
- rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
15720
- rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
15721
- actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call'
15722
- activerecord (3.2.8) lib/active_record/query_cache.rb:64:in `call'
15723
- activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
15724
- actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
15725
- activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__422712038__call__805253680__callbacks'
15726
- activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback'
15727
- activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
15728
- activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks'
15729
- actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
15730
- actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:65:in `call'
15731
- actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
15732
- actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
15733
- actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
15734
- railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app'
15735
- railties (3.2.8) lib/rails/rack/logger.rb:16:in `call'
15736
- actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call'
15737
- rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
15738
- rack (1.4.1) lib/rack/runtime.rb:17:in `call'
15739
- activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
15740
- rack (1.4.1) lib/rack/lock.rb:15:in `call'
15741
- actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call'
15742
- railties (3.2.8) lib/rails/engine.rb:479:in `call'
15743
- railties (3.2.8) lib/rails/application.rb:223:in `call'
15744
- rack (1.4.1) lib/rack/content_length.rb:14:in `call'
15745
- railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call'
15746
- rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
15747
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
15748
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
15749
- /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
15750
-
15751
-
15752
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.3ms)
15753
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms)
15754
- Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@disclaimer/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (29.6ms)
15755
-
15756
-
15757
- Started POST "/disclaimer/documents/main/accept" for 127.0.0.1 at 2013-04-17 16:43:02 +0100
15758
- Processing by Disclaimer::DocumentsController#accept as HTML
15759
- Parameters: {"utf8"=>"✓", "authenticity_token"=>"qmOkIAYd7qBUTUnBZcwdi1+F5Unobj00bGvctUfgzdk=", "commit"=>"Accept", "id"=>"main"}
15760
- Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" WHERE "disclaimer_documents"."name" = 'main' LIMIT 1
15761
- Redirected to http://localhost:3000/disclaimer/
15762
- Completed 302 Found in 89ms (ActiveRecord: 0.8ms)
15763
-
15764
-
15765
- Started GET "/disclaimer/" for 127.0.0.1 at 2013-04-17 16:43:02 +0100
15766
- Processing by Disclaimer::DocumentsController#index as HTML
15767
- Disclaimer::Document Load (0.2ms) SELECT "disclaimer_documents".* FROM "disclaimer_documents" 
15768
- Disclaimer::Segment Load (0.5ms) SELECT DISTINCT "disclaimer_segments".* FROM "disclaimer_segments" INNER JOIN "disclaimer_segment_holders" ON "disclaimer_segments"."id" = "disclaimer_segment_holders"."segment_id" WHERE "disclaimer_segment_holders"."document_id" = 1 ORDER BY position
15769
- Rendered /home/rob/web/disclaimer/app/views/disclaimer/documents/index.html.erb within layouts/disclaimer/application (195.1ms)
15770
- Completed 200 OK in 224ms (Views: 218.4ms | ActiveRecord: 1.4ms)
15771
-
15772
-
15773
- Started GET "/assets/disclaimer/application.css?body=1" for 127.0.0.1 at 2013-04-17 16:43:03 +0100
15774
- Served asset /disclaimer/application.css - 304 Not Modified (19ms)
15775
-
15776
-
15777
- Started GET "/assets/disclaimer/documents.css?body=1" for 127.0.0.1 at 2013-04-17 16:43:03 +0100
15778
- Served asset /disclaimer/documents.css - 304 Not Modified (23ms)
15779
-
15780
-
15781
- Started GET "/assets/disclaimer/segments.css?body=1" for 127.0.0.1 at 2013-04-17 16:43:03 +0100
15782
- Served asset /disclaimer/segments.css - 304 Not Modified (18ms)