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
@@ -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
|
-
|
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, :
|
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 :
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
9
|
end
|
10
10
|
|
11
|
-
#
|
12
|
-
ActiveSupport.on_load(:active_record) do
|
13
|
-
self.include_root_in_json =
|
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
|
-
#
|
2
|
-
#
|
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"
|
data/spec/dummy/config/routes.rb
CHANGED
data/spec/dummy/config.ru
CHANGED
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -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
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 1) do
|
15
15
|
|
16
|
-
create_table "dummy_users", :
|
17
|
-
t.boolean "is_admin", :
|
18
|
-
t.datetime "created_at"
|
19
|
-
t.datetime "updated_at"
|
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", :
|
23
|
-
t.string "name", :
|
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", :
|
26
|
-
t.text "content", :
|
27
|
-
t.datetime "created_at"
|
28
|
-
t.datetime "updated_at"
|
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"], :
|
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", :
|
34
|
-
t.integer "contract_id", :
|
35
|
-
t.integer "user_id", :
|
36
|
-
t.string "user_type", :
|
37
|
-
t.datetime "created_at"
|
38
|
-
t.datetime "updated_at"
|
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"], :
|
42
|
-
add_index "fine_print_signatures", ["user_id", "user_type", "contract_id"], :
|
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
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|