pinfirmable 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +36 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/pinfirmable.js +80 -0
- data/app/controllers/devise/pinfirmable_controller.rb +56 -0
- data/app/mailers/pinfirmable_mailer.rb +13 -0
- data/app/views/devise/pinfirmable/new.html.erb +25 -0
- data/app/views/pinfirmable_mailer/pin_email.html.erb +5 -0
- data/config/locales/en.yml +12 -0
- data/db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb +8 -0
- data/lib/pinfirmable/engine.rb +11 -0
- data/lib/pinfirmable/hooks/pinfirmable.rb +7 -0
- data/lib/pinfirmable/models/pinfirmable.rb +23 -0
- data/lib/pinfirmable/pin.rb +13 -0
- data/lib/pinfirmable/routes.rb +18 -0
- data/lib/pinfirmable/version.rb +3 -0
- data/lib/pinfirmable.rb +14 -0
- data/lib/tasks/pinfirmable_tasks.rake +4 -0
- data/spec/controllers/pinfirmable_controller/create_spec.rb +60 -0
- data/spec/controllers/pinfirmable_controller/new_spec.rb +14 -0
- data/spec/controllers/pinfirmable_controller/resend_email_spec.rb +21 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +7 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/jobs/application_job.rb +2 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +34 -0
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/config/application.rb +14 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +55 -0
- data/spec/dummy/config/environments/production.rb +86 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/devise.rb +274 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +24 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/devise.en.yml +62 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/puma.rb +47 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20160901092452_devise_create_users.rb +41 -0
- data/spec/dummy/db/schema.rb +33 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +4 -0
- data/spec/dummy/log/test.log +72068 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0I/0Ib_rTFdgnfYvsNReWAqAUKRVHoP48RXWpZzH31zbsA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0_/0_BEcKcOVfBOnDXLNQYgBo66sz57rUWfK3CFy37xHAs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0d/0dthYfJkw1ySY3H3yGN-X3YlabpIgzRctIar_VjJs-o.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0p/0pi1IJaTb-uJV_j5Apw90X2yVzONgxwSk4YGRQH_7tw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3C/3CXox-ywyGX-ImZxHmbU1PT6T7YqLaQJgtJiXe-Gspw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4j/4jK76DbDIsiKy6e_G5ssrieGsBWgQILORWkgoPoHGiA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/52/52mUG1lT2sxnvYn_J1cCmkSNnFBLJvyroFgPJt4XNiY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/59/590cxj6DeFThrcsMnUtKVC5E9cONxauOL9EdNRByYas.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6z/6zpMuUiqZWJ15l4nB9YTExEFA7YQFwRs2DnIu7kJNK8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7u/7ui7Y-rju7m-pR065VlaNtEn3rOCS434sF43WeBoADA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/87/87c6IwXEO0_GPKWLX-inn2yDraMkjDHE7Gd58IfQKUM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9W/9WGnclv7yQ7AU1vxOdZyZNQErQxvkv5TFLPsNqIHgDM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/A0/A03xbRgK3Ix-tjuc7SRE6m00FMsdS8Qxzo9Hy63qWI0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AD/ADncNYPGmQMedyN-TDLuBvHUgK6QnKa7prDCGaPBt8Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/BL/BL9KvH210DakvbZpa0y7uHeDCIxbVSZeVzX9ORPHklA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CU/CUUpvLwWXnqbPsnCoZYlJRQbCE9EnVaunFNss-gK0_Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/E7/E7BFg5Bv1-bfKP7DWLfYzAsN6zua4WSSmgFbE2LcNqI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FV/FVK45g3SK8uvE1S5sMm2QwQDjxBG6_ivZsbGiVw_PCc.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FV/fVZX1E54KolnE_T-rx6tajbpB60V3lZJjlU3VAnU6mQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FW/FWJmoL0Wb5jd6OZ8nsoS5plcoVaP9UuRoDopKMk9mzI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ff/Ff2kYMWnsRbC_7lkEB2fklWVPGGu3-mwavjevR0Dosg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fx/Fx6vJr-0KDZ1RkfAgtgOSBu28QxN2I90ScvQq2_M7Dk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/G8/G8LtyZik__wwpmptzRrSPhOp1_2LSteMMvQ9oGD4EaE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H1/H1NqkZMp5bVfN_gVtD5DI4IDfmEw3vLsfUl6oRnt4Tk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Hu/HuAv_RW-N_0y86EoCMOnfxRTT7CcahYAci_bjtZWK2c.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ji/JiPW4Kt5eOMvoyMvBGYS4ZTZPGkMUBmNIZ-RnfHNHfU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kl/KlW4RRk60Viqs5yetur9CA6cPokW4yPR6zR3M9ziJ98.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lr/LrhnzGqLYA3-9bW8scwWo_Sfc_mlJEHs_FCqH4t-fuE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OY/OY1Oc7QCzPN7zGREO3ZnVu5r4IskjAS1SqHAQ53B6tc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PX/PXdqXI13N_erEUdt85TgWIlvOH4RTIXKMAm-wZr_JQI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rz/RzG0b39PTQxcTGjL-Euwb8kG6fYyw0TISKfl9HnGZwI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Sm/Sm53Us6lv7P-FA8xvKLsUL_Gk1leKI1p2uuIwE4L7F0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Up/UpwPFEUiXqWZKXzP2lqsMok5X5awuh18Oxe8sHVHPgk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WX/WX2p7x3BZk2FlICmGW8K7ViNsPC9tAnjw78j3RgS7I4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/XZ/XZlTMeQI1tgBxD4GyAEccoJzoWl-o3VnQgiOLkLMYCU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_J/_JqPvyIHGRAA3W5yKSWIVxPeZv39yEYAea9s_qIkTns.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ae/aeqnlkDgYUJkn3MGhS9H15kWLorV4KlpqM86mS4QKf4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aw/awevoChN6gsPZ4sAAli2bpCg58LCjgrMO_mf6QZrEpQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b8/b8qWdGp0oLZ932cOSfCWz8GGZidFAwWcdPI3FGfv0B0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/c2/c270k9jWPU8yElVyFFdlsvApVjIzN47zjATRxZrMWys.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cQ/cQz3lzvG0R6MMztIUVR97n-0miKhe2Si4LeS2xugRw0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/cc/ccZlTdoD75wgZdjc9wQXzmlu_0SXOn7WhKgsCZBoBrw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/er/erS28TTvZ3iXT8lWy2hfzZKyX3zc9WcEjuW7oCpSlpU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fs/fsIJsHTd_I3ghT_JBxhC3LVvW6J7RQ_AMJduAVMEd-0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g3/g39vmOVZj2M63gH281qIU23pqqpq_2Y37u-QmgGB6ek.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g9/g9coOrsutLlDERJWOPFZh6_V-WYFlzGkaHMIzofKqfc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gR/gRsrCSxJvxqtDEsYpMWREbMrrZOhQX5FhuqdKQ0ouws.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iN/iN7mM-M4a8Rw7vcInE44X9KTxQWx-v429j0pR5bP3hE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ic/icdeYVWN9XD-9OojrXmUYX2li_Tq3lE-HID2s9ojH9Q.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jA/jAw6wecL4SRb-h5_8dEL-ssdzoINI1SL6rA6dy9c4UQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k6/k66kn0XGYputzIg4YmGlQ4HqXbJZLbOWAQyzLlBCqRY.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kE/KEKhbAfFG76ispjqj05RbM9r5RbzX0k9oLw5f8e3B7o.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kE/KeyFd5cIvfUx121T3mPGzSAheDvtidWKC-91dbobm3w.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kE/kEOIAdeqXzsRmWKAkG14WUfhCwG4lyugAwvPi3yDNno.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kM/kMvNXvXf4RfdAsPUQb0mrVncC7DyH_r8AwJW4lqAvtc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/N_bVbIOFifb5lMTgn3hmc4qd998Fdanj7kxicNQ7ioM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nf/nfkiYL3GpQDOru_4361htDx6xDKWZA8kRgKWPalINJY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/r0/r0U6EPXTIVVLx4zSzDqwT0KCz3TBRzxbdXjI4d04vyM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rD/rDsjtCmvl7oTNulriGIUbB5zA5UVnzEYJDVxpvCFu_Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sf/sf3QxMRblVIGu94NOkWKbkqGobdMHDIi4xOkc9UHWWo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tU/tU8_GR1SFXrgVKIN6mFB0Rd3rP2dVJg9e0l5QlGdwbs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ta/tanXh3aWxGrofJOeYGTreVfZb_0c3EfUq-tBmHpEHwU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w1/w1cTNnTXc6KzCcpu2zd2ydRdPe2gr_dZGoWNRCQGXsI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wC/wC0vwK3MtR_dBamKroNo_l5roOk3jF3xmQAPSE7NLww.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wU/wUdlJV2o6ddUH4FTwl050VtaN59iZu9b7QNI39Bbtb4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/x7/x7PYh8DJvPykcEqpVab2vcY9-GFz-3cqtoMlRAu94Uc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xH/xHv2g42ffiUxgku0zobVrbVWM6VJAV4_ZV9b7dghdmU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yl/yl7Cnv9zE-DNvCK1DQab8tCyKkq4V__3gSEu6VrNQZo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zR/zRKxGdH7UE371p9Qrn9c9BNa0OB0Mn9NdrEkYzUiTbM.cache +2 -0
- data/spec/features/resend_email_spec.rb +21 -0
- data/spec/features/user_signup_spec.rb +56 -0
- data/spec/routing/pinfirmable_routing_spec.rb +15 -0
- data/spec/spec_helper.rb +24 -0
- metadata +431 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains migration options to ease your Rails 5.0 upgrade.
|
4
|
+
#
|
5
|
+
# Read the Rails 5.0 release notes for more info on each option.
|
6
|
+
|
7
|
+
# Enable per-form CSRF tokens. Previous versions had false.
|
8
|
+
Rails.application.config.action_controller.per_form_csrf_tokens = true
|
9
|
+
|
10
|
+
# Enable origin-checking CSRF mitigation. Previous versions had false.
|
11
|
+
Rails.application.config.action_controller.forgery_protection_origin_check = true
|
12
|
+
|
13
|
+
# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
|
14
|
+
# Previous versions had false.
|
15
|
+
ActiveSupport.to_time_preserves_timezone = true
|
16
|
+
|
17
|
+
# Require `belongs_to` associations by default. Previous versions had false.
|
18
|
+
Rails.application.config.active_record.belongs_to_required_by_default = true
|
19
|
+
|
20
|
+
# Do not halt callback chains when a callback returns false. Previous versions had true.
|
21
|
+
ActiveSupport.halt_callback_chains_on_return_false = false
|
22
|
+
|
23
|
+
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
|
24
|
+
Rails.application.config.ssl_options = { hsts: { subdomains: true } }
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
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
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
13
|
+
locked: "Your account is locked."
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock instructions"
|
26
|
+
password_change:
|
27
|
+
subject: "Password Changed"
|
28
|
+
omniauth_callbacks:
|
29
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
30
|
+
success: "Successfully authenticated from %{kind} account."
|
31
|
+
passwords:
|
32
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
33
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
34
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
35
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
36
|
+
updated_not_active: "Your password has been changed successfully."
|
37
|
+
registrations:
|
38
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
39
|
+
signed_up: "Welcome! You have signed up successfully."
|
40
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
41
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
42
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
43
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
44
|
+
updated: "Your account has been updated successfully."
|
45
|
+
sessions:
|
46
|
+
signed_in: "Signed in successfully."
|
47
|
+
signed_out: "Signed out successfully."
|
48
|
+
already_signed_out: "Signed out successfully."
|
49
|
+
unlocks:
|
50
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
51
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
52
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
53
|
+
errors:
|
54
|
+
messages:
|
55
|
+
already_confirmed: "was already confirmed, please try signing in"
|
56
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
57
|
+
expired: "has expired, please request a new one"
|
58
|
+
not_found: "not found"
|
59
|
+
not_locked: "was not locked"
|
60
|
+
not_saved:
|
61
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
62
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -0,0 +1,23 @@
|
|
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.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
+
# The `threads` method setting takes two numbers a minimum and maximum.
|
3
|
+
# Any libraries that use thread pools should be configured to match
|
4
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
+
# and maximum, this matches the default thread size of Active Record.
|
6
|
+
#
|
7
|
+
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
|
8
|
+
threads threads_count, threads_count
|
9
|
+
|
10
|
+
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
|
11
|
+
#
|
12
|
+
port ENV.fetch("PORT") { 3000 }
|
13
|
+
|
14
|
+
# Specifies the `environment` that Puma will run in.
|
15
|
+
#
|
16
|
+
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
|
+
|
18
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
+
# Workers are forked webserver processes. If using threads and workers together
|
20
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
21
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
22
|
+
# processes).
|
23
|
+
#
|
24
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
25
|
+
|
26
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
27
|
+
# This directive tells Puma to first boot the application and load code
|
28
|
+
# before forking the application. This takes advantage of Copy On Write
|
29
|
+
# process behavior so workers use less memory. If you use this option
|
30
|
+
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
31
|
+
# block.
|
32
|
+
#
|
33
|
+
# preload_app!
|
34
|
+
|
35
|
+
# The code in the `on_worker_boot` will be called if you are using
|
36
|
+
# clustered mode by specifying a number of `workers`. After each worker
|
37
|
+
# process is booted this block will be run, if you are using `preload_app!`
|
38
|
+
# option you will want to use this block to reconnect to any threads
|
39
|
+
# or connections that may have been created at application boot, Ruby
|
40
|
+
# cannot share connections between processes.
|
41
|
+
#
|
42
|
+
# on_worker_boot do
|
43
|
+
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
44
|
+
# end
|
45
|
+
|
46
|
+
# Allow puma to be restarted by `rails restart` command.
|
47
|
+
plugin :tmp_restart
|
@@ -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 `rails 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: 953b7cbc63bea58182cb767179b8a5d2a6f0b1250fb667462b5c9211b6520e5fd82dd8dd646235a41fa5bec5675413920c70e60b497d50b2c8e70afce2eb5477
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: cf1a35bce910839ef88e8d810f900379dbda46acedaf817f7a8bea76659126ddc06a8b23ec9b291bff500916c613939bef34dd483ad8da82bd575da32227aea1
|
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
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class DeviseCreateUsers < ActiveRecord::Migration[5.0]
|
2
|
+
def change
|
3
|
+
create_table :users do |t|
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, null: false, default: ""
|
6
|
+
t.string :encrypted_password, null: false, default: ""
|
7
|
+
|
8
|
+
## Recoverable
|
9
|
+
t.string :reset_password_token
|
10
|
+
t.datetime :reset_password_sent_at
|
11
|
+
|
12
|
+
## Rememberable
|
13
|
+
t.datetime :remember_created_at
|
14
|
+
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, default: 0, null: false
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Confirmable
|
23
|
+
# t.string :confirmation_token
|
24
|
+
# t.datetime :confirmed_at
|
25
|
+
# t.datetime :confirmation_sent_at
|
26
|
+
# t.string :unconfirmed_email # Only if using reconfirmable
|
27
|
+
|
28
|
+
## Lockable
|
29
|
+
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
|
30
|
+
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
31
|
+
# t.datetime :locked_at
|
32
|
+
|
33
|
+
t.timestamps null: false
|
34
|
+
end
|
35
|
+
|
36
|
+
add_index :users, :email, unique: true
|
37
|
+
add_index :users, :reset_password_token, unique: true
|
38
|
+
# add_index :users, :confirmation_token, unique: true
|
39
|
+
# add_index :users, :unlock_token, unique: true
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your
|
6
|
+
# database schema. If you need to create the application database on another
|
7
|
+
# system, you should be using db:schema:load, not running all the migrations
|
8
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(version: 20_160_901_131_628) do
|
14
|
+
create_table "users", force: :cascade do |t|
|
15
|
+
t.string "email", default: "", null: false
|
16
|
+
t.string "encrypted_password", default: "", null: false
|
17
|
+
t.string "reset_password_token"
|
18
|
+
t.datetime "reset_password_sent_at"
|
19
|
+
t.datetime "remember_created_at"
|
20
|
+
t.integer "sign_in_count", default: 0, null: false
|
21
|
+
t.datetime "current_sign_in_at"
|
22
|
+
t.datetime "last_sign_in_at"
|
23
|
+
t.string "current_sign_in_ip"
|
24
|
+
t.string "last_sign_in_ip"
|
25
|
+
t.datetime "created_at", null: false
|
26
|
+
t.datetime "updated_at", null: false
|
27
|
+
t.string "pinfirmable_pin"
|
28
|
+
t.integer "pinfirmable_tries", default: 0
|
29
|
+
t.datetime "pinfirmable_lockout"
|
30
|
+
t.index ["email"], name: "index_users_on_email", unique: true
|
31
|
+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
32
|
+
end
|
33
|
+
end
|
Binary file
|
@@ -0,0 +1,4 @@
|
|
1
|
+
[1m[35m (1.7ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
2
|
+
[1m[35m (1.0ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.0ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|