remote_partial 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/README.rdoc +58 -15
  2. data/Rakefile +5 -22
  3. data/{app/models → lib}/remote_partial/builder.rb +1 -1
  4. data/{app/models → lib}/remote_partial/exceptions.rb +0 -0
  5. data/{app/models → lib}/remote_partial/partial.rb +25 -4
  6. data/lib/remote_partial/railtie.rb +9 -0
  7. data/{app/models → lib}/remote_partial/resource_manager.rb +0 -0
  8. data/lib/remote_partial/time_calc.rb +45 -0
  9. data/lib/remote_partial/version.rb +8 -1
  10. data/{app/models → lib}/remote_partial/yaml_store.rb +13 -3
  11. data/lib/remote_partial.rb +46 -3
  12. data/lib/tasks/remote_partial_tasks.rake +3 -4
  13. data/test/log/test.log +71 -0
  14. data/test/test_helper.rb +36 -15
  15. data/test/unit/remote_partial/builder_test.rb +12 -9
  16. data/test/unit/remote_partial/exception_test.rb +1 -1
  17. data/test/unit/remote_partial/partial_test.rb +8 -8
  18. data/test/unit/remote_partial/resource_manager_test.rb +3 -3
  19. data/test/unit/remote_partial/yaml_store_test.rb +9 -9
  20. data/test/unit/remote_partial_test.rb +23 -9
  21. metadata +11 -173
  22. data/app/helpers/remote_partial/application_helper.rb +0 -4
  23. data/app/helpers/remote_partial/host_app_helper.rb +0 -11
  24. data/config/routes.rb +0 -2
  25. data/lib/remote_partial/engine.rb +0 -11
  26. data/test/dummy/README.rdoc +0 -261
  27. data/test/dummy/Rakefile +0 -7
  28. data/test/dummy/app/assets/javascripts/application.js +0 -15
  29. data/test/dummy/app/assets/javascripts/demos.js +0 -2
  30. data/test/dummy/app/assets/javascripts/samples.js +0 -2
  31. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  32. data/test/dummy/app/assets/stylesheets/demos.css +0 -4
  33. data/test/dummy/app/assets/stylesheets/samples.css +0 -4
  34. data/test/dummy/app/controllers/application_controller.rb +0 -3
  35. data/test/dummy/app/controllers/demos_controller.rb +0 -18
  36. data/test/dummy/app/helpers/application_helper.rb +0 -2
  37. data/test/dummy/app/helpers/demos_helper.rb +0 -2
  38. data/test/dummy/app/helpers/samples_helper.rb +0 -2
  39. data/test/dummy/app/views/demos/_clock.html.erb +0 -6
  40. data/test/dummy/app/views/demos/_fixed.html.erb +0 -3
  41. data/test/dummy/app/views/demos/_ruby.html.erb +0 -4
  42. data/test/dummy/app/views/demos/index.html.erb +0 -7
  43. data/test/dummy/app/views/demos/show.html.erb +0 -3
  44. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  45. data/test/dummy/app/views/remote_partials/_clock.html.erb +0 -1
  46. data/test/dummy/app/views/remote_partials/_fixed.html.erb +0 -2
  47. data/test/dummy/app/views/remote_partials/_partial_with_mod.html.erb +0 -1
  48. data/test/dummy/app/views/remote_partials/_ruby.html.erb +0 -11
  49. data/test/dummy/app/views/remote_partials/_wcc.html.erb +0 -1
  50. data/test/dummy/config/application.rb +0 -63
  51. data/test/dummy/config/boot.rb +0 -10
  52. data/test/dummy/config/environment.rb +0 -5
  53. data/test/dummy/config/environments/development.rb +0 -39
  54. data/test/dummy/config/environments/production.rb +0 -69
  55. data/test/dummy/config/environments/test.rb +0 -39
  56. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  57. data/test/dummy/config/initializers/inflections.rb +0 -15
  58. data/test/dummy/config/initializers/mime_types.rb +0 -5
  59. data/test/dummy/config/initializers/remote_partial.rb +0 -16
  60. data/test/dummy/config/initializers/secret_token.rb +0 -8
  61. data/test/dummy/config/initializers/session_store.rb +0 -8
  62. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  63. data/test/dummy/config/locales/en.yml +0 -5
  64. data/test/dummy/config/routes.rb +0 -8
  65. data/test/dummy/config.ru +0 -4
  66. data/test/dummy/db/development.sqlite3 +0 -0
  67. data/test/dummy/db/migrate/20130703141929_create_remote_partial_partials.remote_partial.rb +0 -13
  68. data/test/dummy/db/remote_partial/partials.yml +0 -13
  69. data/test/dummy/db/test.sqlite3 +0 -0
  70. data/test/dummy/log/development.log +0 -5518
  71. data/test/dummy/log/test.log +0 -33709
  72. data/test/dummy/public/404.html +0 -26
  73. data/test/dummy/public/422.html +0 -26
  74. data/test/dummy/public/500.html +0 -25
  75. data/test/dummy/public/favicon.ico +0 -0
  76. data/test/dummy/script/rails +0 -6
  77. data/test/dummy/test/functional/demos_controller_test.rb +0 -20
  78. data/test/dummy/test/unit/helpers/demos_helper_test.rb +0 -20
  79. data/test/dummy/test/unit/helpers/samples_helper_test.rb +0 -4
  80. data/test/dummy/tmp/cache/assets/BE9/0F0/sprockets%2Fb918d6cc641337193b96751002451244 +0 -0
  81. data/test/dummy/tmp/cache/assets/C2E/4E0/sprockets%2F5b29288e435665a224409e7d76530c95 +0 -0
  82. data/test/dummy/tmp/cache/assets/CB3/DC0/sprockets%2F157201713d2fd4954447e0bf4d8e853e +0 -0
  83. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  84. data/test/dummy/tmp/cache/assets/CE3/080/sprockets%2F7d4d7689d6fa8236f0b4848c03ba1215 +0 -0
  85. data/test/dummy/tmp/cache/assets/CE5/D30/sprockets%2F8c9834a63b25a66203918a75ff56e2ac +0 -0
  86. data/test/dummy/tmp/cache/assets/D16/E10/sprockets%2Fd5d9c442561ec08a55d5d843a0d9792d +0 -0
  87. data/test/dummy/tmp/cache/assets/D20/020/sprockets%2F488c2c97fede45c86a62f1aa14554957 +0 -0
  88. data/test/dummy/tmp/cache/assets/D2E/690/sprockets%2F840591ad233bc7bda28b7f6a2b27c205 +0 -0
  89. data/test/dummy/tmp/cache/assets/D30/990/sprockets%2F995cc20d042afc03241f58f7d6ca1f02 +0 -0
  90. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  91. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  92. data/test/dummy/tmp/cache/assets/D52/430/sprockets%2F6ada07f0c9869f9f35b05fa0988dc717 +0 -0
  93. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  94. data/test/dummy/tmp/cache/assets/DBB/BE0/sprockets%2Fc6eb578d23a69b5abb056e3abaa5c060 +0 -0
  95. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  96. data/test/dummy/tmp/cache/assets/E02/FA0/sprockets%2Fca8d5771d03e669be1d96acb6beb6cb6 +0 -0
  97. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  98. data/test/remote_partial_test.rb +0 -7
@@ -1,7 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # You can define backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
- # Rails.backtrace_cleaner.define_silencer { |line| line =~ /my_noisy_library/ }
5
-
6
- # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
- # Rails.backtrace_cleaner.remove_silencers!
@@ -1,15 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new inflection rules using the following format
4
- # (all these examples are active by default):
5
- # ActiveSupport::Inflector.inflections do |inflect|
6
- # inflect.plural /^(ox)$/i, '\1en'
7
- # inflect.singular /^(ox)en/i, '\1'
8
- # inflect.irregular 'person', 'people'
9
- # inflect.uncountable %w( fish sheep )
10
- # end
11
- #
12
- # These inflection rules are supported but not enabled by default:
13
- # ActiveSupport::Inflector.inflections do |inflect|
14
- # inflect.acronym 'RESTful'
15
- # end
@@ -1,5 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Add new mime types for use in respond_to blocks:
4
- # Mime::Type.register "text/richtext", :rtf
5
- # Mime::Type.register_alias "text/html", :iphone
@@ -1,16 +0,0 @@
1
-
2
- RemotePartial.define(
3
- url: 'http://www.timeanddate.com/worldclock/city.html?n=136',
4
- name: 'clock',
5
- criteria: '#ct',
6
- minimum_life: 5.minutes
7
- )
8
-
9
- RemotePartial.define(
10
- url: 'http://www.ruby-lang.org/en/',
11
- name: 'ruby',
12
- criteria: '#intro',
13
- minimum_life: 3.hours
14
- )
15
-
16
-
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
- # Make sure the secret is at least 30 characters and all random,
6
- # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = 'c7229d3064b76a518e3f12d5ea54451d688a469c130db7f1c96507327767f2c1bcb9a564392334b754e5cc999071bd341d5d10ee931922c749260a155c6c0dc2'
8
- Dummy::Application.config.secret_key_base = Dummy::Application.config.secret_token
@@ -1,8 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
-
5
- # Use the database for sessions instead of the cookie-based default,
6
- # which shouldn't be used to store highly confidential information
7
- # (create the session table with "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
@@ -1,14 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
- #
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
9
- end
10
-
11
- # Disable root element in JSON by default.
12
- ActiveSupport.on_load(:active_record) do
13
- self.include_root_in_json = false
14
- end
@@ -1,5 +0,0 @@
1
- # Sample localization file for English. Add more files in this directory for other locales.
2
- # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
-
4
- en:
5
- hello: "Hello world"
@@ -1,8 +0,0 @@
1
- Rails.application.routes.draw do
2
-
3
- root :to => 'demos#index'
4
-
5
- resources :demos, only: [:index, :show]
6
-
7
-
8
- end
data/test/dummy/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
Binary file
@@ -1,13 +0,0 @@
1
- # This migration comes from remote_partial (originally 20130702072157)
2
- class CreateRemotePartialPartials < ActiveRecord::Migration
3
- def change
4
- create_table :remote_partial_partials do |t|
5
- t.string :name, limit: 100, null: false
6
- t.text :url, limit: 0x7ff, null: false
7
- t.string :criteria
8
- t.float :repeat_period
9
- t.datetime :stale_at
10
- t.timestamps
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
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-12 09:11:10.633546708 +01:00
7
- stale_at: 2013-07-12 09:12:10.633475076 +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-12 09:11:16.339316247 +01:00
13
- stale_at: 2013-07-12 09:12:16.339248280 +01:00
Binary file