user_stamp 3.0.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +2 -2
- data/README.rdoc +3 -3
- data/Rakefile +6 -9
- data/config/routes.rb +22 -21
- data/lib/generators/user_stamp/USAGE +5 -6
- data/lib/generators/user_stamp/templates/user_stamp.template +16 -21
- data/lib/generators/user_stamp/user_stamp_generator.rb +23 -23
- data/lib/user_stamp.rb +23 -22
- data/lib/user_stamp/app_controller.rb +22 -24
- data/lib/user_stamp/config.rb +29 -33
- data/lib/user_stamp/engine.rb +27 -28
- data/lib/user_stamp/user.rb +23 -24
- data/lib/user_stamp/user_stamp.rb +33 -35
- data/lib/user_stamp/version.rb +23 -22
- data/test/dummy/README.rdoc +15 -248
- data/test/dummy/Rakefile +1 -2
- data/test/dummy/app/assets/javascripts/application.js +4 -6
- data/test/dummy/app/assets/stylesheets/application.css +6 -4
- data/test/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -30
- data/test/dummy/app/controllers/materials_controller.rb +27 -51
- data/test/dummy/app/controllers/products_controller.rb +27 -51
- data/test/dummy/app/helpers/application_helper.rb +0 -26
- data/test/dummy/app/helpers/materials_helper.rb +0 -26
- data/test/dummy/app/helpers/products_helper.rb +0 -26
- data/test/dummy/app/models/material.rb +2 -33
- data/test/dummy/app/models/product.rb +3 -30
- data/test/dummy/app/models/user.rb +0 -30
- data/test/dummy/app/views/layouts/application.html.erb +2 -2
- data/test/dummy/app/views/materials/_form.html.erb +9 -9
- data/test/dummy/app/views/materials/edit.html.erb +2 -2
- data/test/dummy/app/views/materials/index.html.erb +27 -23
- data/test/dummy/app/views/materials/new.html.erb +1 -2
- data/test/dummy/app/views/materials/show.html.erb +4 -8
- data/test/dummy/app/views/products/_form.html.erb +6 -6
- data/test/dummy/app/views/products/edit.html.erb +1 -1
- data/test/dummy/app/views/products/index.html.erb +26 -22
- data/test/dummy/app/views/products/new.html.erb +1 -1
- data/test/dummy/app/views/products/show.html.erb +4 -5
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +2 -2
- data/test/dummy/config/application.rb +2 -35
- data/test/dummy/config/boot.rb +4 -9
- data/test/dummy/config/database.yml +8 -8
- data/test/dummy/config/environment.rb +3 -3
- data/test/dummy/config/environments/development.rb +22 -18
- data/test/dummy/config/environments/production.rb +46 -34
- data/test/dummy/config/environments/test.rb +19 -14
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/devise.rb +5 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +6 -5
- data/test/dummy/config/initializers/mime_types.rb +0 -1
- data/test/dummy/config/initializers/session_store.rb +1 -6
- data/test/dummy/config/initializers/user_stamp.rb +16 -21
- data/test/dummy/config/initializers/wrap_parameters.rb +6 -6
- data/test/dummy/config/locales/en.yml +20 -2
- data/test/dummy/config/routes.rb +56 -4
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/{20150418012302_devise_create_users.rb → 20150427152452_devise_create_users.rb} +1 -1
- data/test/dummy/db/migrate/{20150420023321_create_materials.rb → 20150427153058_create_materials.rb} +2 -2
- data/test/dummy/db/migrate/{20150418013334_create_products.rb → 20150427153126_create_products.rb} +5 -5
- data/test/dummy/db/schema.rb +19 -19
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/public/404.html +54 -13
- data/test/dummy/public/422.html +54 -13
- data/test/dummy/public/500.html +53 -12
- data/test/dummy/test/{functional → controllers}/materials_controller_test.rb +6 -36
- data/test/dummy/test/{functional → controllers}/products_controller_test.rb +9 -39
- data/test/dummy/test/models/material_test.rb +7 -0
- data/test/dummy/test/models/product_test.rb +7 -0
- data/test/dummy/test/models/user_test.rb +7 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/-uBri7P4oa8-cPDbuxBzrBh6f_6YgmRETeF1cPQ98BI.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0HaE6Po_aJLoGCREH2pm0GVz0rQO2AnHYN5WxfxRAdk.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4WkO5ZKNyqFfwe0aMDO40zL7WuG01_LUMIo_Z1VIwIM.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6sjvyZUWlu55-3XP-5yZfxjfXvbrvxsg-E3Q7B_t8pk.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8Z_hEjtyPSQN4opQbT6RkcCNBCF-CFQybzoSs5Aq6KI.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9-HUlJkF3jRyupEtKfWn1dlmpPkguFR6iptppjOucgg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/A7WZdZGirgPer7eGsq2mJfHio6N9R9HJJxM4hkuItJo.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DzCB5KQSlVUBNf_tlBgnzTbS3b_pMkzkuqihSfNHe4s.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GIw-liLL0pp9xX_VtZkZToKgqPr4koaqbpG9bROGWQQ.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IgADW9PKfRr6TSWEm1ipKSMaJ4DwdbJMYiKMXWP2qvw.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/MEs_AIdrjZ9MYzLES9uOroxBGNjY9Stpe19ohy0z1lA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/SDZR43ZDx01ZzCRNeIhjSx_9kJO78HCK8YMJAKnWIaI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/U2SInYmDs_pipNOzdogCHPXzyUyc1h5jAls6xbWSGs4.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UL1xczCpSxV6CONGlfaMEdE5KwKA9o56RLp2QZxGstA.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UReuCl2zv3Z3nGvte7lUGu7979JxkuCRbDNv6-HtTZU.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WT1n2kS2FLNKA6DHRX7THVlGIGzgTC8je4MMzBQtSmg.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XgTwbFt01e5bfNNba5Gr83GNRea9MoFlqP2rJGW_rjk.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZAc9zFuIs2cKSfQZVtEkV3u4_RLFxLSP55C0RqqhZ1w.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Zea97tHycA5aXYbZ9DHtFHTu4bhAZcIhb0RlckVvzXI.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZwP9zS5ft5ww816BPhmhQPqMPKbbgPdjBrz5VnSZ5oo.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/hwZcJkZ_YQ4hjBA1FzHIvGWudWHtQDZW7h8zUJslBQM.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/iqtLgHvtAikgr0-aW1Vqy4KeUsVmzgOz9YVG2_2RVeY.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jpKzE4ZVMG4ynSLgDB76TOPEZbHNqYF8BQRy94ioeQE.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/kM0liVKuJ_BZI9HenUEa6OO9pOnT4KuC-zzXot34reU.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/nGfH8igMEHxuQWcDKD23EjWqmSvgxI2sVXhNOC5wE8I.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ni5fBgQoTXajLTgoWS8nd8LoiucG5krt3YIpbrx1mIY.cache +2 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oVvP3smTURXlapOzr_iUN4Ew_m3EEy3CQ4M0cOkTsm0.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oX6WZjQtAOkKXBohDgfcjs0cda8wFDGnkwJDGkJoytI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oeTdUtI5qsh1Nn2Hy6_wmjtPV25O-RCQPcNjCwoSCKA.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ov953wmqzp_9OaWCaoMLlOSWzHeF9kLApt4aCcW-Bgk.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sg6mpEMI9L65gEc7QFaXG534feyjIGE29SE7B_RTQNY.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uJ8m6b9jypIn4pSuuaKkFBW9E2Ifcx2ulcERIa1q1dA.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uYPgal6XAaVE9q7oz6jQS5nmQKM3IwZ8tnsE-__Oweo.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vXJI-yUwt8d552Mj63nmnTx46YY7-GUrYuFzLUT9hMI.cache +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/xs2cSdXmo8vitmiaAo7fhDSGbrVPUKN17Ue3aTCUseE.cache +1 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/yCPG4xJ4TDzj7Mbcm2B0wDN_Jqlu2dKg8bFLKqW-pBI.cache +0 -0
- data/test/fixtures/materials.yml +1 -1
- data/test/fixtures/products.yml +1 -1
- data/test/fixtures/users.yml +5 -26
- data/test/test_helper.rb +7 -33
- data/test/user_stamp_test.rb +0 -26
- metadata +124 -40
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/log/test.log +0 -414
- data/test/dummy/script/rails +0 -6
- data/test/dummy/test/unit/helpers/materials_helper_test.rb +0 -30
- data/test/dummy/test/unit/helpers/products_helper_test.rb +0 -30
- data/test/dummy/test/unit/material_test.rb +0 -33
- data/test/dummy/test/unit/product_test.rb +0 -33
- data/test/dummy/test/unit/user_test.rb +0 -33
@@ -3,24 +3,19 @@
|
|
3
3
|
# Initilization file for UserStamp gem
|
4
4
|
#
|
5
5
|
UserStamp.configure do |config|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
# Default
|
24
|
-
# config.user_field = :login_name
|
25
|
-
|
26
|
-
end
|
6
|
+
# ===== Config.current_user =====
|
7
|
+
# Set the name of the user object created when checking authentication
|
8
|
+
# By default uses the current_user object that devise creates
|
9
|
+
# need to make sure that the user_field is defined within the user object
|
10
|
+
# Default
|
11
|
+
# config.current_user = :current_user
|
12
|
+
|
13
|
+
# ===== Config.user_field ======
|
14
|
+
# The field within the user object / user database that is stored for each record in the database
|
15
|
+
# To change the behavior to store the user.id field use the following config:
|
16
|
+
# config.user_field = :id
|
17
|
+
# To store the user's email use the following config:
|
18
|
+
# config.user_field = :email
|
19
|
+
# Default
|
20
|
+
# config.user_field = :login_name
|
21
|
+
end
|
@@ -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
|
-
#
|
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/test/dummy/config/routes.rb
CHANGED
@@ -1,7 +1,59 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
devise_for :users
|
1
|
+
Rails.application.routes.draw do
|
4
2
|
resources :products
|
5
3
|
resources :materials
|
6
|
-
|
4
|
+
devise_for :users
|
5
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
6
|
+
# See how all your routes lay out with "rake routes".
|
7
|
+
|
8
|
+
# You can have the root of your site routed with "root"
|
9
|
+
# root 'welcome#index'
|
10
|
+
|
11
|
+
# Example of regular route:
|
12
|
+
# get 'products/:id' => 'catalog#view'
|
13
|
+
|
14
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
15
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
16
|
+
|
17
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
18
|
+
# resources :products
|
19
|
+
|
20
|
+
# Example resource route with options:
|
21
|
+
# resources :products do
|
22
|
+
# member do
|
23
|
+
# get 'short'
|
24
|
+
# post 'toggle'
|
25
|
+
# end
|
26
|
+
#
|
27
|
+
# collection do
|
28
|
+
# get 'sold'
|
29
|
+
# end
|
30
|
+
# end
|
31
|
+
|
32
|
+
# Example resource route with sub-resources:
|
33
|
+
# resources :products do
|
34
|
+
# resources :comments, :sales
|
35
|
+
# resource :seller
|
36
|
+
# end
|
37
|
+
|
38
|
+
# Example resource route with more complex sub-resources:
|
39
|
+
# resources :products do
|
40
|
+
# resources :comments
|
41
|
+
# resources :sales do
|
42
|
+
# get 'recent', on: :collection
|
43
|
+
# end
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Example resource route with concerns:
|
47
|
+
# concern :toggleable do
|
48
|
+
# post 'toggle'
|
49
|
+
# end
|
50
|
+
# resources :posts, concerns: :toggleable
|
51
|
+
# resources :photos, concerns: :toggleable
|
52
|
+
|
53
|
+
# Example resource route within a namespace:
|
54
|
+
# namespace :admin do
|
55
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
56
|
+
# # (app/controllers/admin/products_controller.rb)
|
57
|
+
# resources :products
|
58
|
+
# end
|
7
59
|
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 1f3cf8b90860464ede093e57b21456dbeb66d0e710f6e09bba6f5e81339085092be617ab233491a34dbe4c4f2b1d1dc1897591d0ff825ac83a240fa6709cca73
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 437783f3437195d52917408850dc06c1926ebcb2387edf54152bdb805e182278a5023d3a351d9231638c9ca0cd31baff70927599fc5ba9f2b4884f34f0e0bcc1
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -4,7 +4,6 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
|
4
4
|
## Database authenticatable
|
5
5
|
t.string :email, null: false, default: ""
|
6
6
|
t.string :encrypted_password, null: false, default: ""
|
7
|
-
t.string :login_name
|
8
7
|
|
9
8
|
## Recoverable
|
10
9
|
t.string :reset_password_token
|
@@ -31,6 +30,7 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
|
31
30
|
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
32
31
|
# t.datetime :locked_at
|
33
32
|
|
33
|
+
t.string :login_name
|
34
34
|
|
35
35
|
t.timestamps
|
36
36
|
end
|
data/test/dummy/db/migrate/{20150420023321_create_materials.rb → 20150427153058_create_materials.rb}
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateMaterials < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :materials do |t|
|
4
|
-
t.string
|
4
|
+
t.string :name
|
5
5
|
t.boolean :deleted, default: false
|
6
6
|
t.integer :created_user
|
7
7
|
t.integer :updated_user
|
8
8
|
t.integer :destroy_user
|
9
9
|
|
10
|
-
t.timestamps
|
10
|
+
t.timestamps null: false
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/test/dummy/db/migrate/{20150418013334_create_products.rb → 20150427153126_create_products.rb}
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateProducts < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :products do |t|
|
4
|
-
t.string
|
4
|
+
t.string :name
|
5
5
|
t.boolean :deleted, default: false
|
6
|
-
t.string
|
7
|
-
t.string
|
8
|
-
t.string
|
6
|
+
t.string :created_user
|
7
|
+
t.string :updated_user
|
8
|
+
t.string :destroy_user
|
9
9
|
|
10
|
-
t.timestamps
|
10
|
+
t.timestamps null: false
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/test/dummy/db/schema.rb
CHANGED
@@ -9,47 +9,47 @@
|
|
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: 20150427153126) do
|
15
15
|
|
16
|
-
create_table "materials", :
|
16
|
+
create_table "materials", force: :cascade do |t|
|
17
17
|
t.string "name"
|
18
|
-
t.boolean "deleted", :
|
18
|
+
t.boolean "deleted", default: false
|
19
19
|
t.integer "created_user"
|
20
20
|
t.integer "updated_user"
|
21
21
|
t.integer "destroy_user"
|
22
|
-
t.datetime "created_at",
|
23
|
-
t.datetime "updated_at",
|
22
|
+
t.datetime "created_at", null: false
|
23
|
+
t.datetime "updated_at", null: false
|
24
24
|
end
|
25
25
|
|
26
|
-
create_table "products", :
|
26
|
+
create_table "products", force: :cascade do |t|
|
27
27
|
t.string "name"
|
28
|
-
t.boolean "deleted", :
|
28
|
+
t.boolean "deleted", default: false
|
29
29
|
t.string "created_user"
|
30
30
|
t.string "updated_user"
|
31
31
|
t.string "destroy_user"
|
32
|
-
t.datetime "created_at",
|
33
|
-
t.datetime "updated_at",
|
32
|
+
t.datetime "created_at", null: false
|
33
|
+
t.datetime "updated_at", null: false
|
34
34
|
end
|
35
35
|
|
36
|
-
create_table "users", :
|
37
|
-
t.string "email", :
|
38
|
-
t.string "encrypted_password", :
|
39
|
-
t.string "login_name"
|
36
|
+
create_table "users", force: :cascade do |t|
|
37
|
+
t.string "email", default: "", null: false
|
38
|
+
t.string "encrypted_password", default: "", null: false
|
40
39
|
t.string "reset_password_token"
|
41
40
|
t.datetime "reset_password_sent_at"
|
42
41
|
t.datetime "remember_created_at"
|
43
|
-
t.integer "sign_in_count", :
|
42
|
+
t.integer "sign_in_count", default: 0, null: false
|
44
43
|
t.datetime "current_sign_in_at"
|
45
44
|
t.datetime "last_sign_in_at"
|
46
45
|
t.string "current_sign_in_ip"
|
47
46
|
t.string "last_sign_in_ip"
|
48
|
-
t.
|
49
|
-
t.datetime "
|
47
|
+
t.string "login_name"
|
48
|
+
t.datetime "created_at"
|
49
|
+
t.datetime "updated_at"
|
50
50
|
end
|
51
51
|
|
52
|
-
add_index "users", ["email"], :
|
53
|
-
add_index "users", ["reset_password_token"], :
|
52
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
53
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
54
54
|
|
55
55
|
end
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/public/404.html
CHANGED
@@ -2,25 +2,66 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
16
54
|
</style>
|
17
55
|
</head>
|
18
56
|
|
19
57
|
<body>
|
20
58
|
<!-- This file lives in public/404.html -->
|
21
59
|
<div class="dialog">
|
22
|
-
<
|
23
|
-
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
24
65
|
</div>
|
25
66
|
</body>
|
26
67
|
</html>
|
data/test/dummy/public/422.html
CHANGED
@@ -2,25 +2,66 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
16
54
|
</style>
|
17
55
|
</head>
|
18
56
|
|
19
57
|
<body>
|
20
58
|
<!-- This file lives in public/422.html -->
|
21
59
|
<div class="dialog">
|
22
|
-
<
|
23
|
-
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
24
65
|
</div>
|
25
66
|
</body>
|
26
67
|
</html>
|