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.
- data/README.rdoc +58 -15
- data/Rakefile +5 -22
- data/{app/models → lib}/remote_partial/builder.rb +1 -1
- data/{app/models → lib}/remote_partial/exceptions.rb +0 -0
- data/{app/models → lib}/remote_partial/partial.rb +25 -4
- data/lib/remote_partial/railtie.rb +9 -0
- data/{app/models → lib}/remote_partial/resource_manager.rb +0 -0
- data/lib/remote_partial/time_calc.rb +45 -0
- data/lib/remote_partial/version.rb +8 -1
- data/{app/models → lib}/remote_partial/yaml_store.rb +13 -3
- data/lib/remote_partial.rb +46 -3
- data/lib/tasks/remote_partial_tasks.rake +3 -4
- data/test/log/test.log +71 -0
- data/test/test_helper.rb +36 -15
- data/test/unit/remote_partial/builder_test.rb +12 -9
- data/test/unit/remote_partial/exception_test.rb +1 -1
- data/test/unit/remote_partial/partial_test.rb +8 -8
- data/test/unit/remote_partial/resource_manager_test.rb +3 -3
- data/test/unit/remote_partial/yaml_store_test.rb +9 -9
- data/test/unit/remote_partial_test.rb +23 -9
- metadata +11 -173
- data/app/helpers/remote_partial/application_helper.rb +0 -4
- data/app/helpers/remote_partial/host_app_helper.rb +0 -11
- data/config/routes.rb +0 -2
- data/lib/remote_partial/engine.rb +0 -11
- data/test/dummy/README.rdoc +0 -261
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/javascripts/demos.js +0 -2
- data/test/dummy/app/assets/javascripts/samples.js +0 -2
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/assets/stylesheets/demos.css +0 -4
- data/test/dummy/app/assets/stylesheets/samples.css +0 -4
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/controllers/demos_controller.rb +0 -18
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/demos_helper.rb +0 -2
- data/test/dummy/app/helpers/samples_helper.rb +0 -2
- data/test/dummy/app/views/demos/_clock.html.erb +0 -6
- data/test/dummy/app/views/demos/_fixed.html.erb +0 -3
- data/test/dummy/app/views/demos/_ruby.html.erb +0 -4
- data/test/dummy/app/views/demos/index.html.erb +0 -7
- data/test/dummy/app/views/demos/show.html.erb +0 -3
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/app/views/remote_partials/_clock.html.erb +0 -1
- data/test/dummy/app/views/remote_partials/_fixed.html.erb +0 -2
- data/test/dummy/app/views/remote_partials/_partial_with_mod.html.erb +0 -1
- data/test/dummy/app/views/remote_partials/_ruby.html.erb +0 -11
- data/test/dummy/app/views/remote_partials/_wcc.html.erb +0 -1
- data/test/dummy/config/application.rb +0 -63
- data/test/dummy/config/boot.rb +0 -10
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -39
- data/test/dummy/config/environments/production.rb +0 -69
- data/test/dummy/config/environments/test.rb +0 -39
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -15
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/remote_partial.rb +0 -16
- data/test/dummy/config/initializers/secret_token.rb +0 -8
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/routes.rb +0 -8
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130703141929_create_remote_partial_partials.remote_partial.rb +0 -13
- data/test/dummy/db/remote_partial/partials.yml +0 -13
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -5518
- data/test/dummy/log/test.log +0 -33709
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/dummy/test/functional/demos_controller_test.rb +0 -20
- data/test/dummy/test/unit/helpers/demos_helper_test.rb +0 -20
- data/test/dummy/test/unit/helpers/samples_helper_test.rb +0 -4
- data/test/dummy/tmp/cache/assets/BE9/0F0/sprockets%2Fb918d6cc641337193b96751002451244 +0 -0
- data/test/dummy/tmp/cache/assets/C2E/4E0/sprockets%2F5b29288e435665a224409e7d76530c95 +0 -0
- data/test/dummy/tmp/cache/assets/CB3/DC0/sprockets%2F157201713d2fd4954447e0bf4d8e853e +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CE3/080/sprockets%2F7d4d7689d6fa8236f0b4848c03ba1215 +0 -0
- data/test/dummy/tmp/cache/assets/CE5/D30/sprockets%2F8c9834a63b25a66203918a75ff56e2ac +0 -0
- data/test/dummy/tmp/cache/assets/D16/E10/sprockets%2Fd5d9c442561ec08a55d5d843a0d9792d +0 -0
- data/test/dummy/tmp/cache/assets/D20/020/sprockets%2F488c2c97fede45c86a62f1aa14554957 +0 -0
- data/test/dummy/tmp/cache/assets/D2E/690/sprockets%2F840591ad233bc7bda28b7f6a2b27c205 +0 -0
- data/test/dummy/tmp/cache/assets/D30/990/sprockets%2F995cc20d042afc03241f58f7d6ca1f02 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D52/430/sprockets%2F6ada07f0c9869f9f35b05fa0988dc717 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/DBB/BE0/sprockets%2Fc6eb578d23a69b5abb056e3abaa5c060 +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/E02/FA0/sprockets%2Fca8d5771d03e669be1d96acb6beb6cb6 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/remote_partial_test.rb +0 -7
data/test/dummy/public/404.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/404.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/422.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/422.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/500.html
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/500.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
23
|
-
</div>
|
24
|
-
</body>
|
25
|
-
</html>
|
File without changes
|
data/test/dummy/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class DemosControllerTest < ActionController::TestCase
|
4
|
-
def test_index
|
5
|
-
get :index
|
6
|
-
assert_response :success
|
7
|
-
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_show_fixed
|
11
|
-
get :show, id: 'fixed'
|
12
|
-
assert_response :success
|
13
|
-
assert_match content_of('fixed'), response.body
|
14
|
-
end
|
15
|
-
|
16
|
-
def content_of(remote_partial_name)
|
17
|
-
File.read(Rails.root + "app/views/remote_partials/_#{remote_partial_name}.html.erb")
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
require 'remote_partial/host_app_helper'
|
3
|
-
|
4
|
-
class DemosHelperTest < ActionView::TestCase
|
5
|
-
include RemotePartial::HostAppHelper
|
6
|
-
|
7
|
-
def test_render_remote_partial_with_no_partial
|
8
|
-
if Rails.version.to_i == 4
|
9
|
-
assert_raise ArgumentError do
|
10
|
-
render_remote_partial 'non-existent-partial'
|
11
|
-
end
|
12
|
-
else
|
13
|
-
assert_raise ActionView::MissingTemplate do
|
14
|
-
render_remote_partial 'non-existent-partial'
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|