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.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +56 -44
  3. data/app/controllers/fine_print/application_controller.rb +0 -3
  4. data/app/models/fine_print/contract.rb +9 -8
  5. data/app/models/fine_print/signature.rb +1 -1
  6. data/config/initializers/fine_print.rb +20 -16
  7. data/db/migrate/0_install_fine_print.rb +4 -3
  8. data/lib/fine_print/controller_includes.rb +114 -0
  9. data/lib/fine_print/version.rb +1 -1
  10. data/lib/fine_print.rb +20 -24
  11. data/spec/controllers/contracts_controller_spec.rb +38 -36
  12. data/spec/controllers/home_controller_spec.rb +4 -4
  13. data/spec/controllers/signatures_controller_spec.rb +8 -8
  14. data/spec/dummy/Rakefile +0 -1
  15. data/spec/dummy/app/assets/javascripts/application.js +3 -5
  16. data/spec/dummy/app/views/layouts/application.html.erb +2 -2
  17. data/spec/dummy/bin/bundle +3 -0
  18. data/spec/dummy/bin/rails +4 -0
  19. data/spec/dummy/bin/rake +4 -0
  20. data/spec/dummy/config/application.rb +3 -37
  21. data/spec/dummy/config/boot.rb +4 -9
  22. data/spec/dummy/config/environment.rb +2 -2
  23. data/spec/dummy/config/environments/development.rb +11 -19
  24. data/spec/dummy/config/environments/production.rb +40 -27
  25. data/spec/dummy/config/environments/test.rb +13 -14
  26. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  27. data/spec/dummy/config/initializers/fine_print.rb +1 -34
  28. data/spec/dummy/config/initializers/inflections.rb +6 -5
  29. data/spec/dummy/config/initializers/secret_token.rb +7 -2
  30. data/spec/dummy/config/initializers/session_store.rb +1 -6
  31. data/spec/dummy/config/initializers/wrap_parameters.rb +6 -6
  32. data/spec/dummy/config/locales/en.yml +20 -2
  33. data/spec/dummy/config/routes.rb +2 -1
  34. data/spec/dummy/config.ru +1 -1
  35. data/spec/dummy/db/development.sqlite3 +0 -0
  36. data/spec/dummy/db/schema.rb +21 -21
  37. data/spec/dummy/db/test.sqlite3 +0 -0
  38. data/spec/dummy/log/development.log +15 -1849
  39. data/spec/dummy/log/test.log +10536 -53785
  40. data/spec/dummy/public/404.html +43 -11
  41. data/spec/dummy/public/422.html +43 -11
  42. data/spec/dummy/public/500.html +43 -11
  43. data/spec/factories/contract.rb +2 -2
  44. data/spec/lib/fine_print/{controller_additions_spec.rb → controller_includes_spec.rb} +16 -6
  45. metadata +104 -166
  46. data/app/assets/javascripts/application.js~ +0 -16
  47. data/app/controllers/fine_print/application_controller.rb~ +0 -15
  48. data/app/controllers/fine_print/contracts_controller.rb~ +0 -79
  49. data/app/controllers/fine_print/home_controller.rb~ +0 -6
  50. data/app/controllers/fine_print/signatures_controller.rb~ +0 -14
  51. data/app/helpers/fine_print/application_helper.rb~ +0 -7
  52. data/app/helpers/fine_print/contracts_helper.rb~ +0 -7
  53. data/app/models/fine_print/contract.rb~ +0 -100
  54. data/app/models/fine_print/signature.rb~ +0 -25
  55. data/app/views/fine_print/contracts/_form.html.erb~ +0 -35
  56. data/app/views/fine_print/contracts/index.html.erb~ +0 -43
  57. data/app/views/fine_print/contracts/show.html.erb~ +0 -35
  58. data/app/views/fine_print/home/index.html.erb~ +0 -15
  59. data/app/views/fine_print/signatures/index.html.erb~ +0 -32
  60. data/app/views/layouts/fine_print/application.html.erb~ +0 -20
  61. data/config/initializers/fine_print.rb~ +0 -36
  62. data/config/routes.rb~ +0 -12
  63. data/db/migrate/0_install_fine_print.rb~ +0 -26
  64. data/lib/fine_print/controller_additions.rb +0 -80
  65. data/lib/fine_print/controller_additions.rb~ +0 -86
  66. data/lib/fine_print/utilities.rb~ +0 -26
  67. data/lib/fine_print/version.rb~ +0 -3
  68. data/lib/fine_print.rb~ +0 -120
  69. data/spec/controllers/contracts_controller_spec.rb~ +0 -224
  70. data/spec/controllers/home_controller_spec.rb~ +0 -25
  71. data/spec/controllers/signatures_controller_spec.rb~ +0 -46
  72. data/spec/dummy/app/controllers/dummy_models_controller.rb~ +0 -29
  73. data/spec/dummy/app/models/dummy_user.rb~ +0 -4
  74. data/spec/dummy/app/models/user.rb~ +0 -78
  75. data/spec/dummy/config/application.rb~ +0 -60
  76. data/spec/dummy/config/initializers/fine_print.rb~ +0 -36
  77. data/spec/dummy/config/initializers/session_store.rb~ +0 -8
  78. data/spec/dummy/config/initializers/wrap_parameters.rb~ +0 -14
  79. data/spec/dummy/config/routes.rb~ +0 -4
  80. data/spec/dummy/db/migrate/1_create_dummy_users.rb~ +0 -8
  81. data/spec/dummy/script/rails +0 -6
  82. data/spec/factories/contract.rb~ +0 -26
  83. data/spec/factories/dummy_user.rb~ +0 -6
  84. data/spec/factories/signature.rb~ +0 -8
  85. data/spec/factories/user.rb~ +0 -6
  86. data/spec/fine_print_spec.rb~ +0 -18
  87. data/spec/lib/fine_print/controller_additions_spec.rb~ +0 -20
  88. data/spec/lib/fine_print_spec.rb~ +0 -47
  89. data/spec/models/contract_spec.rb~ +0 -80
  90. data/spec/models/signature_spec.rb~ +0 -28
  91. data/spec/spec_helper.rb~ +0 -32
  92. data/spec/test_helper.rb~ +0 -15
@@ -1,7 +1,12 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Your secret key for verifying the integrity of signed cookies.
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
4
  # If you change this key, all old signed cookies will become invalid!
5
+
5
6
  # Make sure the secret is at least 30 characters and all random,
6
7
  # no regular words or you'll be exposed to dictionary attacks.
7
- Dummy::Application.config.secret_token = '686318144c9183cbbeccd12c808fd8ac13548714039777a283717c755b1eb0cbe46b9fb9b3edde7168faf6ba04f124c97a2ee5295af66d5b3df3046940b9a29b'
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ Dummy::Application.config.secret_key_base = 'd2b1305db4640dc238e977414f76c1a03e2abd6b1233b968cd750f27878c39cd1397c220186de49b0a29c137bb69fb27e6ad2b66c1e100b2f9a9d50e1deb7f78'
@@ -1,8 +1,3 @@
1
1
  # Be sure to restart your server when you modify this file.
2
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
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,14 +1,14 @@
1
1
  # Be sure to restart your server when you modify this file.
2
- #
2
+
3
3
  # This file contains settings for ActionController::ParamsWrapper which
4
4
  # is enabled by default.
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters :format => [:json]
8
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
9
  end
10
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
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -1,5 +1,23 @@
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.
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
3
21
 
4
22
  en:
5
23
  hello: "Hello world"
@@ -1,3 +1,4 @@
1
1
  Rails.application.routes.draw do
2
- mount FinePrint::Engine => '/fine_print'
2
+
3
+ mount FinePrint::Engine => "/fine_print"
3
4
  end
data/spec/dummy/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is used by Rack-based servers to start the application.
2
2
 
3
3
  require ::File.expand_path('../config/environment', __FILE__)
4
- run Dummy::Application
4
+ run Rails.application
Binary file
@@ -9,36 +9,36 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 1) do
14
+ ActiveRecord::Schema.define(version: 1) do
15
15
 
16
- create_table "dummy_users", :force => true do |t|
17
- t.boolean "is_admin", :default => false, :null => false
18
- t.datetime "created_at", :null => false
19
- t.datetime "updated_at", :null => false
16
+ create_table "dummy_users", force: true do |t|
17
+ t.boolean "is_admin", default: false, null: false
18
+ t.datetime "created_at"
19
+ t.datetime "updated_at"
20
20
  end
21
21
 
22
- create_table "fine_print_contracts", :force => true do |t|
23
- t.string "name", :null => false
22
+ create_table "fine_print_contracts", force: true do |t|
23
+ t.string "name", null: false
24
24
  t.integer "version"
25
- t.string "title", :null => false
26
- t.text "content", :null => false
27
- t.datetime "created_at", :null => false
28
- t.datetime "updated_at", :null => false
25
+ t.string "title", null: false
26
+ t.text "content", null: false
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
29
  end
30
30
 
31
- add_index "fine_print_contracts", ["name", "version"], :name => "index_fine_print_contracts_on_name_and_version", :unique => true
31
+ add_index "fine_print_contracts", ["name", "version"], name: "index_fine_print_contracts_on_name_and_version", unique: true
32
32
 
33
- create_table "fine_print_signatures", :force => true do |t|
34
- t.integer "contract_id", :null => false
35
- t.integer "user_id", :null => false
36
- t.string "user_type", :null => false
37
- t.datetime "created_at", :null => false
38
- t.datetime "updated_at", :null => false
33
+ create_table "fine_print_signatures", force: true do |t|
34
+ t.integer "contract_id", null: false
35
+ t.integer "user_id", null: false
36
+ t.string "user_type", null: false
37
+ t.datetime "created_at"
38
+ t.datetime "updated_at"
39
39
  end
40
40
 
41
- add_index "fine_print_signatures", ["contract_id"], :name => "index_fine_print_signatures_on_contract_id"
42
- add_index "fine_print_signatures", ["user_id", "user_type", "contract_id"], :name => "index_fine_print_s_on_u_id_and_u_type_and_c_id", :unique => true
41
+ add_index "fine_print_signatures", ["contract_id"], name: "index_fine_print_signatures_on_contract_id"
42
+ add_index "fine_print_signatures", ["user_id", "user_type", "contract_id"], name: "index_fine_print_s_on_u_id_and_u_type_and_c_id", unique: true
43
43
 
44
44
  end
Binary file