remote_partial 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -9,14 +9,6 @@ Add this to your Gemfile:
9
9
 
10
10
  gem 'remote_partial'
11
11
 
12
- == Database
13
-
14
- To add to the host app, a migration that will create the table used to store
15
- remote partial data, run these rake tasks
16
-
17
- rake remote_partial:install:migrations
18
- rake db:migrate
19
-
20
12
  == Defining a remote partial
21
13
 
22
14
  Define the remote partials in an initializer (config/initializers/remote_partial.rb)
@@ -80,4 +72,10 @@ Remote partials are held in:
80
72
 
81
73
  Rails.root + '/app/veiws/remote_partials'
82
74
 
75
+ == Persistence
76
+
77
+ The current state of each defined remote partial is stored in a YAML file:
78
+
79
+ db/remote_partial/partials.yml
80
+
83
81
  This project wobbles and uses MIT-LICENSE.
@@ -1,7 +1,7 @@
1
1
 
2
2
  module RemotePartial
3
3
  class Builder
4
- attr_reader :args, :partial
4
+ attr_reader :args, :partial, :changed
5
5
 
6
6
  def self.build(args)
7
7
  builder = new(args)
@@ -9,22 +9,35 @@ module RemotePartial
9
9
  end
10
10
 
11
11
  def initialize(args)
12
- @args = args
12
+ @args = Partial.string_keys(args)
13
13
  end
14
14
 
15
15
  def run
16
16
  create_or_update_partial
17
+ # puts "stale_at: #{@partial.stale_at}, and stale? == #{@partial.stale?}"
17
18
  partial.update_stale_file
18
19
  rescue RemotePartialRetrivalError => error
19
20
  Rails.logger.warn error.message
20
21
  end
21
22
 
22
23
  def create_or_update_partial
23
- @partial = Partial.find_or_initialize_by_name(args[:name])
24
- @partial.url = args[:url]
25
- @partial.criteria = args[:criteria]
26
- @partial.repeat_period = args.fetch(:repeat_period, 12.hour)
27
- @partial.save
24
+ @partial = Partial.find(args['name']) || Partial.new(name: args['name'])
25
+ track_change(args, 'url')
26
+ track_change(args, 'criteria')
27
+ track_change(args, 'repeat_period', @partial.default_repeat_period)
28
+
29
+ if changed
30
+ @partial.save
31
+ end
32
+ end
33
+
34
+ private
35
+ def track_change(args, attribute, default = nil)
36
+ unless @partial.send(attribute) == args[attribute] or (default and @partial.send(attribute) == default)
37
+ @partial.send("#{attribute}=".to_sym, args.fetch(attribute, default))
38
+ @changed = true
39
+ end
28
40
  end
41
+
29
42
  end
30
43
  end
@@ -1,8 +1,8 @@
1
1
 
2
2
  module RemotePartial
3
- class Partial < ActiveRecord::Base
3
+ class Partial < YamlStore
4
4
 
5
- validates :name, :url, presence: true
5
+ attr_accessor :stale_at, :repeat_period
6
6
 
7
7
  def output_file_name
8
8
  [partial_folder, file_name].join("/")
@@ -10,6 +10,7 @@ module RemotePartial
10
10
 
11
11
  def update_file
12
12
  resource_manager.output_to output_file_name
13
+ update_stale_at
13
14
  end
14
15
 
15
16
  def update_stale_file
@@ -25,7 +26,11 @@ module RemotePartial
25
26
  end
26
27
 
27
28
  def repeat_period
28
- super.present? ? super : 60
29
+ @repeat_period ||= default_repeat_period
30
+ end
31
+
32
+ def default_repeat_period
33
+ 60
29
34
  end
30
35
 
31
36
  def update_stale_at
@@ -33,13 +38,22 @@ module RemotePartial
33
38
  end
34
39
 
35
40
  def reset_stale_at
36
- update_attribute(:stale_at, (Time.now + repeat_period))
41
+ self.stale_at = (Time.now + repeat_period)
42
+ save
43
+ end
44
+
45
+ def stale_at
46
+ @stale_at || self[:stale_at] || self['stale_at']
37
47
  end
38
48
 
39
49
  def stale?
40
50
  stale_at.blank? or stale_at < Time.now
41
51
  end
42
52
 
53
+ def to_hash
54
+ super.merge('stale_at' => stale_at)
55
+ end
56
+
43
57
  private
44
58
  def partial_folder
45
59
  RemotePartial.partial_location
@@ -0,0 +1,87 @@
1
+ require 'yaml'
2
+ require 'hashie'
3
+
4
+ module RemotePartial
5
+ class YamlStore < Hashie::Mash
6
+
7
+ def self.write(hash)
8
+ ensure_directory_exists
9
+ output = string_keys(hash).to_yaml
10
+ File.open(file, 'w+') { |file| file.write(output) }
11
+ end
12
+
13
+ def self.read
14
+ File.exists?(file) ? YAML.load_file(file) : {}
15
+ end
16
+
17
+ def self.create(hash)
18
+ new(string_keys(hash)).save
19
+ end
20
+
21
+ def self.find(name)
22
+ name = name.to_s
23
+ item = read[name]
24
+ new(item.merge(name: name)) if item
25
+ end
26
+
27
+ def self.count
28
+ read.keys.length
29
+ end
30
+
31
+ def self.file
32
+ @file ||= File.expand_path("#{name.tableize}.yml", root)
33
+ end
34
+
35
+ def self.root
36
+ location = Rails.env == 'test' ? 'test/fixtures' : 'db'
37
+ File.expand_path(location, Rails.root)
38
+ end
39
+
40
+ def self.dir
41
+ File.dirname file
42
+ end
43
+
44
+ def self.merge!(hash)
45
+ write(read.merge(string_keys(hash)))
46
+ end
47
+
48
+ def self.string_keys(hash)
49
+ hash.inject({}){|h,(key,value)| h[key.to_s] = value; h}
50
+ end
51
+
52
+ def save
53
+ raise "You must define a name before saving" unless name
54
+ update_time_stamps
55
+ self.class.merge!({name.to_s => data_stored_in_object})
56
+ self
57
+ end
58
+
59
+ def time_stamps
60
+ {
61
+ 'created_at' => created_at,
62
+ 'updated_at' => updated_at
63
+ }
64
+ end
65
+
66
+ private
67
+ def self.ensure_directory_exists
68
+ dir.split(/\//).inject do |path, folder|
69
+ current_path = [path, folder].join('/')
70
+ Dir.mkdir(current_path) unless Dir.exists?(current_path)
71
+ current_path
72
+ end
73
+ end
74
+
75
+ def update_time_stamps
76
+ self.created_at = Time.now unless created_at?
77
+ self.updated_at = Time.now
78
+ end
79
+
80
+ def data_stored_in_object
81
+ data = to_hash
82
+ data.delete('name')
83
+ data
84
+ end
85
+
86
+ end
87
+ end
@@ -4,16 +4,7 @@ require_relative '../app/models/remote_partial/exceptions'
4
4
  module RemotePartial
5
5
 
6
6
  def self.define(args = {})
7
- if Partial.table_exists?
8
- Builder.build(args)
9
- else
10
- unless @remote_partial_table_missing_message_logged
11
- message = "RemotePartial.define will not run until the '#{Partial.table_name}' table exists. See RemotePartial README"
12
- puts message
13
- Rails.logger.warn message
14
- @remote_partial_table_missing_message_logged = true
15
- end
16
- end
7
+ Builder.build(args)
17
8
  end
18
9
 
19
10
  def self.partial_location
@@ -1,10 +1,18 @@
1
1
  module RemotePartial
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
4
4
 
5
5
  # History
6
6
  # =======
7
7
  #
8
+ # 0.3.0 Partials persisted via YAML
9
+ # ---------------------------------
10
+ # Moved partial data to a YAML file to remove the dependency on ActiveRecord.
11
+ #
12
+ # A database table was being used to store partial data. However, the amount of
13
+ # data being stored is small, and adding a reliance on ActiveRecord to store
14
+ # this data was limiting where RemotePartial could be used.
15
+ #
8
16
  # 0.2.1 Initial migrate issue
9
17
  # ---------------------------
10
18
  # As you need to load the application, before you can migrate, the
@@ -1 +1 @@
1
- <strong id="ct" class="big">Tuesday, July 9, 2013 at 11:37:26 AM</strong>
1
+ <strong id="ct" class="big">Thursday, July 11, 2013 at 12:57:14 PM</strong>
@@ -1,6 +1,10 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- require 'rails/all'
3
+ require "action_controller/railtie"
4
+ #require "action_mailer/railtie"
5
+ #require "active_resource/railtie"
6
+ require "rails/test_unit/railtie"
7
+ #require "sprockets/railtie"
4
8
 
5
9
  Bundler.require(*Rails.groups)
6
10
  require "remote_partial"
@@ -47,7 +51,7 @@ module Dummy
47
51
  # This will create an empty whitelist of attributes available for mass-assignment for all models
48
52
  # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
49
53
  # parameters by using an attr_accessible or attr_protected declaration.
50
- config.active_record.whitelist_attributes = false
54
+ # config.active_record.whitelist_attributes = false
51
55
 
52
56
  # Enable the asset pipeline
53
57
  config.assets.enabled = true
@@ -14,7 +14,7 @@ Dummy::Application.configure do
14
14
  config.action_controller.perform_caching = false
15
15
 
16
16
  # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
17
+ # config.action_mailer.raise_delivery_errors = false
18
18
 
19
19
  # Print deprecation notices to the Rails logger
20
20
  config.active_support.deprecation = :log
@@ -22,16 +22,18 @@ Dummy::Application.configure do
22
22
  # Only use best-standards-support built into browsers
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
25
+ # # Raise exception on mass assignment protection for Active Record models
26
+ # config.active_record.mass_assignment_sanitizer = :strict
27
+ #
28
+ # # Log the query plan for queries taking more than this (works
29
+ # # with SQLite, MySQL, and PostgreSQL)
30
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
31
31
 
32
32
  # Do not compress assets
33
33
  config.assets.compress = false
34
34
 
35
35
  # Expands the lines which load the assets
36
36
  config.assets.debug = true
37
+
38
+ config.eager_load = false
37
39
  end
@@ -64,4 +64,6 @@ Dummy::Application.configure do
64
64
  # Log the query plan for queries taking more than this (works
65
65
  # with SQLite, MySQL, and PostgreSQL)
66
66
  # config.active_record.auto_explain_threshold_in_seconds = 0.5
67
+
68
+ config.eager_load = true
67
69
  end
@@ -24,14 +24,16 @@ Dummy::Application.configure do
24
24
  # Disable request forgery protection in test environment
25
25
  config.action_controller.allow_forgery_protection = false
26
26
 
27
- # Tell Action Mailer not to deliver emails to the real world.
28
- # The :test delivery method accumulates sent emails in the
29
- # ActionMailer::Base.deliveries array.
30
- config.action_mailer.delivery_method = :test
31
-
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
27
+ # # Tell Action Mailer not to deliver emails to the real world.
28
+ # # The :test delivery method accumulates sent emails in the
29
+ # # ActionMailer::Base.deliveries array.
30
+ # config.action_mailer.delivery_method = :test
31
+ #
32
+ # # Raise exception on mass assignment protection for Active Record models
33
+ # config.active_record.mass_assignment_sanitizer = :strict
34
34
 
35
35
  # Print deprecation notices to the stderr
36
36
  config.active_support.deprecation = :stderr
37
+
38
+ config.eager_load = false
37
39
  end
@@ -5,3 +5,4 @@
5
5
  # Make sure the secret is at least 30 characters and all random,
6
6
  # no regular words or you'll be exposed to dictionary attacks.
7
7
  Dummy::Application.config.secret_token = 'c7229d3064b76a518e3f12d5ea54451d688a469c130db7f1c96507327767f2c1bcb9a564392334b754e5cc999071bd341d5d10ee931922c749260a155c6c0dc2'
8
+ Dummy::Application.config.secret_key_base = Dummy::Application.config.secret_token
@@ -0,0 +1,13 @@
1
+ ---
2
+ clock:
3
+ url: http://www.timeanddate.com/worldclock/city.html?n=136
4
+ criteria: ! '#ct'
5
+ created_at: 2013-07-11 12:57:14.644407617 +01:00
6
+ updated_at: 2013-07-11 12:57:15.115082801 +01:00
7
+ stale_at: 2013-07-11 12:58:15.114612480 +01:00
8
+ ruby:
9
+ url: http://www.ruby-lang.org/en/
10
+ criteria: ! '#intro'
11
+ created_at: 2013-07-11 12:57:15.126905403 +01:00
12
+ updated_at: 2013-07-11 12:57:15.149826114 +01:00
13
+ stale_at: 2013-07-11 12:58:15.149248703 +01:00
@@ -5218,3 +5218,301 @@ ActionController::RoutingError (No route matches [GET] "/javascripts/application
5218
5218
  Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.6ms)
5219
5219
  Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.2ms)
5220
5220
  Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (66.8ms)
5221
+ Unable to retrieve remote partial at : #<ArgumentError: bad argument (expected URI object or URI string)>
5222
+
5223
+
5224
+ Started GET "/" for 127.0.0.1 at 2013-07-11 12:56:04 +0100
5225
+ Processing by DemosController#index as HTML
5226
+ Rendered demos/index.html.erb within layouts/application (3.3ms)
5227
+ Completed 200 OK in 112ms (Views: 111.6ms)
5228
+
5229
+
5230
+ Started GET "/stylesheets/application.css" for 127.0.0.1 at 2013-07-11 12:56:04 +0100
5231
+
5232
+ ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
5233
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5234
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5235
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5236
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5237
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5238
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5239
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5240
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5241
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5242
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5243
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5244
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5245
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5246
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5247
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5248
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5249
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5250
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5251
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5252
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5253
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5254
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5255
+
5256
+
5257
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (3.6ms)
5258
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.3ms)
5259
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (21.5ms)
5260
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (106.8ms)
5261
+
5262
+
5263
+ Started GET "/javascripts/application.js" for 127.0.0.1 at 2013-07-11 12:56:04 +0100
5264
+
5265
+ ActionController::RoutingError (No route matches [GET] "/javascripts/application.js"):
5266
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5267
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5268
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5269
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5270
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5271
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5272
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5273
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5274
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5275
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5276
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5277
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5278
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5279
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5280
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5281
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5282
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5283
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5284
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5285
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5286
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5287
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5288
+
5289
+
5290
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.6ms)
5291
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.8ms)
5292
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.7ms)
5293
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (66.4ms)
5294
+
5295
+
5296
+ Started GET "/demos/fixed" for 127.0.0.1 at 2013-07-11 12:56:06 +0100
5297
+ Processing by DemosController#show as HTML
5298
+ Parameters: {"id"=>"fixed"}
5299
+ Rendered remote_partials/_fixed.html.erb (7.2ms)
5300
+ Rendered demos/_fixed.html.erb (19.6ms)
5301
+ Rendered demos/show.html.erb within layouts/application (27.8ms)
5302
+ Completed 200 OK in 32ms (Views: 30.9ms)
5303
+
5304
+
5305
+ Started GET "/stylesheets/application.css" for 127.0.0.1 at 2013-07-11 12:56:06 +0100
5306
+
5307
+ ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
5308
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5309
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5310
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5311
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5312
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5313
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5314
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5315
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5316
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5317
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5318
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5319
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5320
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5321
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5322
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5323
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5324
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5325
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5326
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5327
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5328
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5329
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5330
+
5331
+
5332
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.4ms)
5333
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (9.0ms)
5334
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (9.4ms)
5335
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (94.3ms)
5336
+
5337
+
5338
+ Started GET "/javascripts/application.js" for 127.0.0.1 at 2013-07-11 12:56:07 +0100
5339
+
5340
+ ActionController::RoutingError (No route matches [GET] "/javascripts/application.js"):
5341
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5342
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5343
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5344
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5345
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5346
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5347
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5348
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5349
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5350
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5351
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5352
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5353
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5354
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5355
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5356
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5357
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5358
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5359
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5360
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5361
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5362
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5363
+
5364
+
5365
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (8.1ms)
5366
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (0.8ms)
5367
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (12.9ms)
5368
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (81.3ms)
5369
+
5370
+
5371
+ Started GET "/demos/clock" for 127.0.0.1 at 2013-07-11 12:56:10 +0100
5372
+ Processing by DemosController#show as HTML
5373
+ Parameters: {"id"=>"clock"}
5374
+ Rendered remote_partials/_clock.html.erb (0.4ms)
5375
+ Rendered demos/_clock.html.erb (10.0ms)
5376
+ Rendered demos/show.html.erb within layouts/application (12.3ms)
5377
+ Completed 200 OK in 16ms (Views: 15.4ms)
5378
+
5379
+
5380
+ Started GET "/stylesheets/application.css" for 127.0.0.1 at 2013-07-11 12:56:10 +0100
5381
+
5382
+ ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
5383
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5384
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5385
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5386
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5387
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5388
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5389
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5390
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5391
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5392
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5393
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5394
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5395
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5396
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5397
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5398
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5399
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5400
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5401
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5402
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5403
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5404
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5405
+
5406
+
5407
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.6ms)
5408
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (5.7ms)
5409
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (8.6ms)
5410
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (62.8ms)
5411
+
5412
+
5413
+ Started GET "/javascripts/application.js" for 127.0.0.1 at 2013-07-11 12:56:10 +0100
5414
+
5415
+ ActionController::RoutingError (No route matches [GET] "/javascripts/application.js"):
5416
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5417
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5418
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5419
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5420
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5421
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5422
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5423
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5424
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5425
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5426
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5427
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5428
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5429
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5430
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5431
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5432
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5433
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5434
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5435
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5436
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5437
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5438
+
5439
+
5440
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (6.8ms)
5441
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (3.3ms)
5442
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.0ms)
5443
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (73.8ms)
5444
+
5445
+
5446
+ Started GET "/demos/ruby" for 127.0.0.1 at 2013-07-11 12:56:20 +0100
5447
+ Processing by DemosController#show as HTML
5448
+ Parameters: {"id"=>"ruby"}
5449
+ Rendered remote_partials/_ruby.html.erb (0.5ms)
5450
+ Rendered demos/_ruby.html.erb (16.7ms)
5451
+ Rendered demos/show.html.erb within layouts/application (18.4ms)
5452
+ Completed 200 OK in 23ms (Views: 22.3ms)
5453
+
5454
+
5455
+ Started GET "/stylesheets/application.css" for 127.0.0.1 at 2013-07-11 12:56:20 +0100
5456
+
5457
+ ActionController::RoutingError (No route matches [GET] "/stylesheets/application.css"):
5458
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5459
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5460
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5461
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5462
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5463
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5464
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5465
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5466
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5467
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5468
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5469
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5470
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5471
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5472
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5473
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5474
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5475
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5476
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5477
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5478
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5479
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5480
+
5481
+
5482
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.8ms)
5483
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (1.5ms)
5484
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (3.2ms)
5485
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (52.4ms)
5486
+
5487
+
5488
+ Started GET "/javascripts/application.js" for 127.0.0.1 at 2013-07-11 12:56:20 +0100
5489
+
5490
+ ActionController::RoutingError (No route matches [GET] "/javascripts/application.js"):
5491
+ actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
5492
+ actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
5493
+ railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
5494
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
5495
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
5496
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
5497
+ activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
5498
+ railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
5499
+ actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
5500
+ rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
5501
+ rack (1.5.2) lib/rack/runtime.rb:17:in `call'
5502
+ activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
5503
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5504
+ actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
5505
+ railties (4.0.0) lib/rails/engine.rb:511:in `call'
5506
+ railties (4.0.0) lib/rails/application.rb:97:in `call'
5507
+ rack (1.5.2) lib/rack/lock.rb:17:in `call'
5508
+ rack (1.5.2) lib/rack/content_length.rb:14:in `call'
5509
+ rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
5510
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
5511
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
5512
+ /home/rob/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
5513
+
5514
+
5515
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.0ms)
5516
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_route.html.erb (4.1ms)
5517
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/routes/_table.html.erb (2.3ms)
5518
+ Rendered /home/rob/.rvm/gems/ruby-1.9.3-p286@remote_partial/gems/actionpack-4.0.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (48.7ms)