fine_print 1.3.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +56 -44
- data/app/controllers/fine_print/application_controller.rb +0 -3
- data/app/models/fine_print/contract.rb +9 -8
- data/app/models/fine_print/signature.rb +1 -1
- data/config/initializers/fine_print.rb +20 -16
- data/db/migrate/0_install_fine_print.rb +4 -3
- data/lib/fine_print/controller_includes.rb +114 -0
- data/lib/fine_print/version.rb +1 -1
- data/lib/fine_print.rb +20 -24
- data/spec/controllers/contracts_controller_spec.rb +38 -36
- data/spec/controllers/home_controller_spec.rb +4 -4
- data/spec/controllers/signatures_controller_spec.rb +8 -8
- data/spec/dummy/Rakefile +0 -1
- data/spec/dummy/app/assets/javascripts/application.js +3 -5
- data/spec/dummy/app/views/layouts/application.html.erb +2 -2
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +3 -37
- data/spec/dummy/config/boot.rb +4 -9
- data/spec/dummy/config/environment.rb +2 -2
- data/spec/dummy/config/environments/development.rb +11 -19
- data/spec/dummy/config/environments/production.rb +40 -27
- data/spec/dummy/config/environments/test.rb +13 -14
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/fine_print.rb +1 -34
- data/spec/dummy/config/initializers/inflections.rb +6 -5
- data/spec/dummy/config/initializers/secret_token.rb +7 -2
- data/spec/dummy/config/initializers/session_store.rb +1 -6
- data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/spec/dummy/config/locales/en.yml +20 -2
- data/spec/dummy/config/routes.rb +2 -1
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +21 -21
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +15 -1849
- data/spec/dummy/log/test.log +10536 -53785
- data/spec/dummy/public/404.html +43 -11
- data/spec/dummy/public/422.html +43 -11
- data/spec/dummy/public/500.html +43 -11
- data/spec/factories/contract.rb +2 -2
- data/spec/lib/fine_print/{controller_additions_spec.rb → controller_includes_spec.rb} +16 -6
- metadata +104 -166
- data/app/assets/javascripts/application.js~ +0 -16
- data/app/controllers/fine_print/application_controller.rb~ +0 -15
- data/app/controllers/fine_print/contracts_controller.rb~ +0 -79
- data/app/controllers/fine_print/home_controller.rb~ +0 -6
- data/app/controllers/fine_print/signatures_controller.rb~ +0 -14
- data/app/helpers/fine_print/application_helper.rb~ +0 -7
- data/app/helpers/fine_print/contracts_helper.rb~ +0 -7
- data/app/models/fine_print/contract.rb~ +0 -100
- data/app/models/fine_print/signature.rb~ +0 -25
- data/app/views/fine_print/contracts/_form.html.erb~ +0 -35
- data/app/views/fine_print/contracts/index.html.erb~ +0 -43
- data/app/views/fine_print/contracts/show.html.erb~ +0 -35
- data/app/views/fine_print/home/index.html.erb~ +0 -15
- data/app/views/fine_print/signatures/index.html.erb~ +0 -32
- data/app/views/layouts/fine_print/application.html.erb~ +0 -20
- data/config/initializers/fine_print.rb~ +0 -36
- data/config/routes.rb~ +0 -12
- data/db/migrate/0_install_fine_print.rb~ +0 -26
- data/lib/fine_print/controller_additions.rb +0 -80
- data/lib/fine_print/controller_additions.rb~ +0 -86
- data/lib/fine_print/utilities.rb~ +0 -26
- data/lib/fine_print/version.rb~ +0 -3
- data/lib/fine_print.rb~ +0 -120
- data/spec/controllers/contracts_controller_spec.rb~ +0 -224
- data/spec/controllers/home_controller_spec.rb~ +0 -25
- data/spec/controllers/signatures_controller_spec.rb~ +0 -46
- data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -29
- data/spec/dummy/app/models/dummy_user.rb~ +0 -4
- data/spec/dummy/app/models/user.rb~ +0 -78
- data/spec/dummy/config/application.rb~ +0 -60
- data/spec/dummy/config/initializers/fine_print.rb~ +0 -36
- data/spec/dummy/config/initializers/session_store.rb~ +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb~ +0 -14
- data/spec/dummy/config/routes.rb~ +0 -4
- data/spec/dummy/db/migrate/1_create_dummy_users.rb~ +0 -8
- data/spec/dummy/script/rails +0 -6
- data/spec/factories/contract.rb~ +0 -26
- data/spec/factories/dummy_user.rb~ +0 -6
- data/spec/factories/signature.rb~ +0 -8
- data/spec/factories/user.rb~ +0 -6
- data/spec/fine_print_spec.rb~ +0 -18
- data/spec/lib/fine_print/controller_additions_spec.rb~ +0 -20
- data/spec/lib/fine_print_spec.rb~ +0 -47
- data/spec/models/contract_spec.rb~ +0 -80
- data/spec/models/signature_spec.rb~ +0 -28
- data/spec/spec_helper.rb~ +0 -32
- data/spec/test_helper.rb~ +0 -15
data/spec/dummy/public/404.html
CHANGED
@@ -2,17 +2,48 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
16
47
|
</style>
|
17
48
|
</head>
|
18
49
|
|
@@ -22,5 +53,6 @@
|
|
22
53
|
<h1>The page you were looking for doesn't exist.</h1>
|
23
54
|
<p>You may have mistyped the address or the page may have moved.</p>
|
24
55
|
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
25
57
|
</body>
|
26
58
|
</html>
|
data/spec/dummy/public/422.html
CHANGED
@@ -2,17 +2,48 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
16
47
|
</style>
|
17
48
|
</head>
|
18
49
|
|
@@ -22,5 +53,6 @@
|
|
22
53
|
<h1>The change you wanted was rejected.</h1>
|
23
54
|
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
55
|
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
25
57
|
</body>
|
26
58
|
</html>
|
data/spec/dummy/public/500.html
CHANGED
@@ -2,17 +2,48 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
16
47
|
</style>
|
17
48
|
</head>
|
18
49
|
|
@@ -21,5 +52,6 @@
|
|
21
52
|
<div class="dialog">
|
22
53
|
<h1>We're sorry, but something went wrong.</h1>
|
23
54
|
</div>
|
55
|
+
<p>If you are the application owner check the logs for more information.</p>
|
24
56
|
</body>
|
25
57
|
</html>
|
data/spec/factories/contract.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
FactoryGirl.define do
|
2
2
|
factory :contract, :class => FinePrint::Contract do
|
3
3
|
name { "Contract_#{SecureRandom.hex(4)}" }
|
4
|
-
title { Faker::Lorem.sentence(3) }
|
5
|
-
content { Faker::Lorem.paragraphs(2) }
|
4
|
+
title { Faker::Lorem.sentence(3).to_s }
|
5
|
+
content { Faker::Lorem.paragraphs(2).to_s }
|
6
6
|
|
7
7
|
factory :published_contract do
|
8
8
|
after(:create) {|instance| instance.publish }
|
@@ -1,7 +1,22 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
module FinePrint
|
4
|
-
describe
|
4
|
+
describe ControllerIncludes do
|
5
|
+
it 'must add fine_print_get_unsigned_contract_names to ActionController instances' do
|
6
|
+
expect(ActionController::Base.new.respond_to? :fine_print_get_unsigned_contract_names).to eq true
|
7
|
+
expect(DummyModelsController.new.respond_to? :fine_print_get_unsigned_contract_names).to eq true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'must add fine_print_redirect to ActionController instances' do
|
11
|
+
expect(ActionController::Base.new.respond_to? :fine_print_redirect).to eq true
|
12
|
+
expect(DummyModelsController.new.respond_to? :fine_print_redirect).to eq true
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'must add fine_print_return to ActionController instances' do
|
16
|
+
expect(ActionController::Base.new.respond_to?(:fine_print_return, true)).to eq true
|
17
|
+
expect(DummyModelsController.new.respond_to?(:fine_print_return, true)).to eq true
|
18
|
+
end
|
19
|
+
|
5
20
|
it 'must add fine_print_get_signatures to ActionController and subclasses' do
|
6
21
|
expect(ActionController::Base.respond_to? :fine_print_get_signatures).to eq true
|
7
22
|
expect(DummyModelsController.respond_to? :fine_print_get_signatures).to eq true
|
@@ -11,10 +26,5 @@ module FinePrint
|
|
11
26
|
expect(ActionController::Base.respond_to? :fine_print_skip_signatures).to eq true
|
12
27
|
expect(DummyModelsController.respond_to? :fine_print_skip_signatures).to eq true
|
13
28
|
end
|
14
|
-
|
15
|
-
it 'must add fine_print_return to ActionController instances' do
|
16
|
-
expect(ActionController::Base.new.respond_to?(:fine_print_return, true)).to eq true
|
17
|
-
expect(DummyModelsController.new.respond_to?(:fine_print_return, true)).to eq true
|
18
|
-
end
|
19
29
|
end
|
20
30
|
end
|