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
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "pathname"
|
3
|
+
require "fileutils"
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path("../../", __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a starting point to setup your application.
|
15
|
+
# Add necessary setup steps to this file.
|
16
|
+
|
17
|
+
puts "== Installing dependencies =="
|
18
|
+
system! "gem install bundler --conservative"
|
19
|
+
system("bundle check") || system!("bundle install")
|
20
|
+
|
21
|
+
# puts "\n== Copying sample files =="
|
22
|
+
# unless File.exist?('config/database.yml')
|
23
|
+
# cp 'config/database.yml.sample', 'config/database.yml'
|
24
|
+
# end
|
25
|
+
|
26
|
+
puts "\n== Preparing database =="
|
27
|
+
system! "bin/rails db:setup"
|
28
|
+
|
29
|
+
puts "\n== Removing old logs and tempfiles =="
|
30
|
+
system! "bin/rails log:clear tmp:clear"
|
31
|
+
|
32
|
+
puts "\n== Restarting application server =="
|
33
|
+
system! "bin/rails restart"
|
34
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "pathname"
|
3
|
+
require "fileutils"
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = Pathname.new File.expand_path("../../", __FILE__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
chdir APP_ROOT do
|
14
|
+
# This script is a way to update your development environment automatically.
|
15
|
+
# Add necessary update steps to this file.
|
16
|
+
|
17
|
+
puts "== Installing dependencies =="
|
18
|
+
system! "gem install bundler --conservative"
|
19
|
+
system("bundle check") || system!("bundle install")
|
20
|
+
|
21
|
+
puts "\n== Updating database =="
|
22
|
+
system! "bin/rails db:migrate"
|
23
|
+
|
24
|
+
puts "\n== Removing old logs and tempfiles =="
|
25
|
+
system! "bin/rails log:clear tmp:clear"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system! "bin/rails restart"
|
29
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "boot"
|
2
|
+
|
3
|
+
require "rails/all"
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "pinfirmable"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,55 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
|
15
|
+
# Enable/disable caching. By default caching is disabled.
|
16
|
+
if Rails.root.join("tmp/caching-dev.txt").exist?
|
17
|
+
config.action_controller.perform_caching = true
|
18
|
+
|
19
|
+
config.cache_store = :memory_store
|
20
|
+
config.public_file_server.headers = {
|
21
|
+
"Cache-Control" => "public, max-age=172800"
|
22
|
+
}
|
23
|
+
else
|
24
|
+
config.action_controller.perform_caching = false
|
25
|
+
|
26
|
+
config.cache_store = :null_store
|
27
|
+
end
|
28
|
+
|
29
|
+
# Don't care if the mailer can't send.
|
30
|
+
config.action_mailer.raise_delivery_errors = false
|
31
|
+
|
32
|
+
config.action_mailer.perform_caching = false
|
33
|
+
|
34
|
+
# Print deprecation notices to the Rails logger.
|
35
|
+
config.active_support.deprecation = :log
|
36
|
+
|
37
|
+
# Raise an error on page load if there are pending migrations.
|
38
|
+
config.active_record.migration_error = :page_load
|
39
|
+
|
40
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
41
|
+
# This option may cause significant delays in view rendering with a large
|
42
|
+
# number of complex assets.
|
43
|
+
config.assets.debug = true
|
44
|
+
|
45
|
+
# Suppress logger output for asset requests.
|
46
|
+
config.assets.quiet = true
|
47
|
+
|
48
|
+
# Raises error for missing translations
|
49
|
+
# config.action_view.raise_on_missing_translations = true
|
50
|
+
|
51
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
52
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
53
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
54
|
+
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
|
55
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Disable serving static files from the `/public` folder by default since
|
18
|
+
# Apache or NGINX already handles this.
|
19
|
+
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
20
|
+
|
21
|
+
# Compress JavaScripts and CSS.
|
22
|
+
config.assets.js_compressor = :uglifier
|
23
|
+
# config.assets.css_compressor = :sass
|
24
|
+
|
25
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
26
|
+
config.assets.compile = false
|
27
|
+
|
28
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
29
|
+
|
30
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
31
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
32
|
+
|
33
|
+
# Specifies the header that your server uses for sending files.
|
34
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
35
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
36
|
+
|
37
|
+
# Mount Action Cable outside main process or domain
|
38
|
+
# config.action_cable.mount_path = nil
|
39
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
40
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
41
|
+
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
+
# config.force_ssl = true
|
44
|
+
|
45
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
46
|
+
# when problems arise.
|
47
|
+
config.log_level = :debug
|
48
|
+
|
49
|
+
# Prepend all log lines with the following tags.
|
50
|
+
config.log_tags = [:request_id]
|
51
|
+
|
52
|
+
# Use a different cache store in production.
|
53
|
+
# config.cache_store = :mem_cache_store
|
54
|
+
|
55
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
56
|
+
# config.active_job.queue_adapter = :resque
|
57
|
+
# config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
|
58
|
+
config.action_mailer.perform_caching = false
|
59
|
+
|
60
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
61
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
62
|
+
# config.action_mailer.raise_delivery_errors = false
|
63
|
+
|
64
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
65
|
+
# the I18n.default_locale when a translation cannot be found).
|
66
|
+
config.i18n.fallbacks = true
|
67
|
+
|
68
|
+
# Send deprecation notices to registered listeners.
|
69
|
+
config.active_support.deprecation = :notify
|
70
|
+
|
71
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
72
|
+
config.log_formatter = ::Logger::Formatter.new
|
73
|
+
|
74
|
+
# Use a different logger for distributed setups.
|
75
|
+
# require 'syslog/logger'
|
76
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
77
|
+
|
78
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
79
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
80
|
+
logger.formatter = config.log_formatter
|
81
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Do not dump schema after migrations.
|
85
|
+
config.active_record.dump_schema_after_migration = false
|
86
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure public file server for tests with Cache-Control for performance.
|
16
|
+
config.public_file_server.enabled = true
|
17
|
+
config.public_file_server.headers = {
|
18
|
+
"Cache-Control" => "public, max-age=3600"
|
19
|
+
}
|
20
|
+
|
21
|
+
# Show full error reports and disable caching.
|
22
|
+
config.consider_all_requests_local = true
|
23
|
+
config.action_controller.perform_caching = false
|
24
|
+
|
25
|
+
# Raise exceptions instead of rendering exception templates.
|
26
|
+
config.action_dispatch.show_exceptions = false
|
27
|
+
|
28
|
+
# Disable request forgery protection in test environment.
|
29
|
+
config.action_controller.allow_forgery_protection = false
|
30
|
+
config.action_mailer.perform_caching = false
|
31
|
+
|
32
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
33
|
+
# The :test delivery method accumulates sent emails in the
|
34
|
+
# ActionMailer::Base.deliveries array.
|
35
|
+
config.action_mailer.delivery_method = :test
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = "1.0"
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,274 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
# The secret key used by Devise. Devise uses this key to generate
|
5
|
+
# random tokens. Changing this key will render invalid all existing
|
6
|
+
# confirmation, reset password and unlock tokens in the database.
|
7
|
+
# Devise will use the `secret_key_base` as its `secret_key`
|
8
|
+
# by default. You can change it below and use your own secret key.
|
9
|
+
# config.secret_key = 'd7e630c8cdd2c64e44f5a9cd5527cc7db28c5c92ef31b63be5695047a79704e5691158ee13c789c2c4f447e589df7d17ccea9b409fa87e358916f74c877e60b9'
|
10
|
+
|
11
|
+
# ==> Mailer Configuration
|
12
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
13
|
+
# note that it will be overwritten if you use your own mailer class
|
14
|
+
# with default "from" parameter.
|
15
|
+
config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
16
|
+
|
17
|
+
# Configure the class responsible to send e-mails.
|
18
|
+
# config.mailer = 'Devise::Mailer'
|
19
|
+
|
20
|
+
# Configure the parent class responsible to send e-mails.
|
21
|
+
# config.parent_mailer = 'ActionMailer::Base'
|
22
|
+
|
23
|
+
# ==> ORM configuration
|
24
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
25
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
26
|
+
# available as additional gems.
|
27
|
+
require "devise/orm/active_record"
|
28
|
+
|
29
|
+
# ==> Configuration for any authentication mechanism
|
30
|
+
# Configure which keys are used when authenticating a user. The default is
|
31
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
32
|
+
# authenticating a user, both parameters are required. Remember that those
|
33
|
+
# parameters are used only when authenticating and not when retrieving from
|
34
|
+
# session. If you need permissions, you should implement that in a before filter.
|
35
|
+
# You can also supply a hash where the value is a boolean determining whether
|
36
|
+
# or not authentication should be aborted when the value is not present.
|
37
|
+
# config.authentication_keys = [:email]
|
38
|
+
|
39
|
+
# Configure parameters from the request object used for authentication. Each entry
|
40
|
+
# given should be a request method and it will automatically be passed to the
|
41
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
42
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
43
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
44
|
+
# config.request_keys = []
|
45
|
+
|
46
|
+
# Configure which authentication keys should be case-insensitive.
|
47
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
48
|
+
# to authenticate or find a user. Default is :email.
|
49
|
+
config.case_insensitive_keys = [:email]
|
50
|
+
|
51
|
+
# Configure which authentication keys should have whitespace stripped.
|
52
|
+
# These keys will have whitespace before and after removed upon creating or
|
53
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
54
|
+
config.strip_whitespace_keys = [:email]
|
55
|
+
|
56
|
+
# Tell if authentication through request.params is enabled. True by default.
|
57
|
+
# It can be set to an array that will enable params authentication only for the
|
58
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
59
|
+
# enable it only for database (email + password) authentication.
|
60
|
+
# config.params_authenticatable = true
|
61
|
+
|
62
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
63
|
+
# It can be set to an array that will enable http authentication only for the
|
64
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
65
|
+
# enable it only for database authentication. The supported strategies are:
|
66
|
+
# :database = Support basic authentication with authentication key + password
|
67
|
+
# config.http_authenticatable = false
|
68
|
+
|
69
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
70
|
+
# config.http_authenticatable_on_xhr = true
|
71
|
+
|
72
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
73
|
+
# config.http_authentication_realm = 'Application'
|
74
|
+
|
75
|
+
# It will change confirmation, password recovery and other workflows
|
76
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
77
|
+
# Does not affect registerable.
|
78
|
+
# config.paranoid = true
|
79
|
+
|
80
|
+
# By default Devise will store the user in session. You can skip storage for
|
81
|
+
# particular strategies by setting this option.
|
82
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
83
|
+
# may want to disable generating routes to Devise's sessions controller by
|
84
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
85
|
+
config.skip_session_storage = [:http_auth]
|
86
|
+
|
87
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
88
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
89
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
90
|
+
# from the server. You can disable this option at your own risk.
|
91
|
+
# config.clean_up_csrf_token_on_authentication = true
|
92
|
+
|
93
|
+
# When false, Devise will not attempt to reload routes on eager load.
|
94
|
+
# This can reduce the time taken to boot the app but if your application
|
95
|
+
# requires the Devise mappings to be loaded during boot time the application
|
96
|
+
# won't boot properly.
|
97
|
+
# config.reload_routes = true
|
98
|
+
|
99
|
+
# ==> Configuration for :database_authenticatable
|
100
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
|
101
|
+
# using other algorithms, it sets how many times you want the password to be hashed.
|
102
|
+
#
|
103
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
104
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
105
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
106
|
+
# algorithm), the cost increases exponentially with the number of stretches (e.g.
|
107
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
108
|
+
config.stretches = Rails.env.test? ? 1 : 11
|
109
|
+
|
110
|
+
# Set up a pepper to generate the hashed password.
|
111
|
+
# config.pepper = 'f99a2bcae9fbbb86d2e4779312702979185c952c7850159516f3af4c20bc41d4d17a1fb52cad2f6f19b2c5b27124494c0f5a3593baff2934ecad4f8a8794e606'
|
112
|
+
|
113
|
+
# Send a notification email when the user's password is changed
|
114
|
+
# config.send_password_change_notification = false
|
115
|
+
|
116
|
+
# ==> Configuration for :confirmable
|
117
|
+
# A period that the user is allowed to access the website even without
|
118
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
119
|
+
# able to access the website for two days without confirming their account,
|
120
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
121
|
+
# the user cannot access the website without confirming their account.
|
122
|
+
# config.allow_unconfirmed_access_for = 2.days
|
123
|
+
|
124
|
+
# A period that the user is allowed to confirm their account before their
|
125
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
126
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
127
|
+
# their account can't be confirmed with the token any more.
|
128
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
129
|
+
# before confirming their account.
|
130
|
+
# config.confirm_within = 3.days
|
131
|
+
|
132
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
133
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
134
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
135
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
136
|
+
config.reconfirmable = true
|
137
|
+
|
138
|
+
# Defines which key will be used when confirming an account
|
139
|
+
# config.confirmation_keys = [:email]
|
140
|
+
|
141
|
+
# ==> Configuration for :rememberable
|
142
|
+
# The time the user will be remembered without asking for credentials again.
|
143
|
+
# config.remember_for = 2.weeks
|
144
|
+
|
145
|
+
# Invalidates all the remember me tokens when the user signs out.
|
146
|
+
config.expire_all_remember_me_on_sign_out = true
|
147
|
+
|
148
|
+
# If true, extends the user's remember period when remembered via cookie.
|
149
|
+
# config.extend_remember_period = false
|
150
|
+
|
151
|
+
# Options to be passed to the created cookie. For instance, you can set
|
152
|
+
# secure: true in order to force SSL only cookies.
|
153
|
+
# config.rememberable_options = {}
|
154
|
+
|
155
|
+
# ==> Configuration for :validatable
|
156
|
+
# Range for password length.
|
157
|
+
config.password_length = 6..128
|
158
|
+
|
159
|
+
# Email regex used to validate email formats. It simply asserts that
|
160
|
+
# one (and only one) @ exists in the given string. This is mainly
|
161
|
+
# to give user feedback and not to assert the e-mail validity.
|
162
|
+
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
163
|
+
|
164
|
+
# ==> Configuration for :timeoutable
|
165
|
+
# The time you want to timeout the user session without activity. After this
|
166
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
167
|
+
# config.timeout_in = 30.minutes
|
168
|
+
|
169
|
+
# ==> Configuration for :lockable
|
170
|
+
# Defines which strategy will be used to lock an account.
|
171
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
172
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
173
|
+
# config.lock_strategy = :failed_attempts
|
174
|
+
|
175
|
+
# Defines which key will be used when locking and unlocking an account
|
176
|
+
# config.unlock_keys = [:email]
|
177
|
+
|
178
|
+
# Defines which strategy will be used to unlock an account.
|
179
|
+
# :email = Sends an unlock link to the user email
|
180
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
181
|
+
# :both = Enables both strategies
|
182
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
183
|
+
# config.unlock_strategy = :both
|
184
|
+
|
185
|
+
# Number of authentication tries before locking an account if lock_strategy
|
186
|
+
# is failed attempts.
|
187
|
+
# config.maximum_attempts = 20
|
188
|
+
|
189
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
190
|
+
# config.unlock_in = 1.hour
|
191
|
+
|
192
|
+
# Warn on the last attempt before the account is locked.
|
193
|
+
# config.last_attempt_warning = true
|
194
|
+
|
195
|
+
# ==> Configuration for :recoverable
|
196
|
+
#
|
197
|
+
# Defines which key will be used when recovering the password for an account
|
198
|
+
# config.reset_password_keys = [:email]
|
199
|
+
|
200
|
+
# Time interval you can reset your password with a reset password key.
|
201
|
+
# Don't put a too small interval or your users won't have the time to
|
202
|
+
# change their passwords.
|
203
|
+
config.reset_password_within = 6.hours
|
204
|
+
|
205
|
+
# When set to false, does not sign a user in automatically after their password is
|
206
|
+
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
207
|
+
# config.sign_in_after_reset_password = true
|
208
|
+
|
209
|
+
# ==> Configuration for :encryptable
|
210
|
+
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
211
|
+
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
212
|
+
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
213
|
+
# for default behavior) and :restful_authentication_sha1 (then you should set
|
214
|
+
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
215
|
+
#
|
216
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
217
|
+
# config.encryptor = :sha512
|
218
|
+
|
219
|
+
# ==> Scopes configuration
|
220
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
221
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
222
|
+
# are using only default views.
|
223
|
+
# config.scoped_views = false
|
224
|
+
|
225
|
+
# Configure the default scope given to Warden. By default it's the first
|
226
|
+
# devise role declared in your routes (usually :user).
|
227
|
+
# config.default_scope = :user
|
228
|
+
|
229
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
230
|
+
# only the current scope. By default, Devise signs out all scopes.
|
231
|
+
# config.sign_out_all_scopes = true
|
232
|
+
|
233
|
+
# ==> Navigation configuration
|
234
|
+
# Lists the formats that should be treated as navigational. Formats like
|
235
|
+
# :html, should redirect to the sign in page when the user does not have
|
236
|
+
# access, but formats like :xml or :json, should return 401.
|
237
|
+
#
|
238
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
239
|
+
# should add them to the navigational formats lists.
|
240
|
+
#
|
241
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
242
|
+
# config.navigational_formats = ['*/*', :html]
|
243
|
+
|
244
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
245
|
+
config.sign_out_via = :delete
|
246
|
+
|
247
|
+
# ==> OmniAuth
|
248
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
249
|
+
# up on your models and hooks.
|
250
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
251
|
+
|
252
|
+
# ==> Warden configuration
|
253
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
254
|
+
# change the failure app, you can configure them inside the config.warden block.
|
255
|
+
#
|
256
|
+
# config.warden do |manager|
|
257
|
+
# manager.intercept_401 = false
|
258
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
259
|
+
# end
|
260
|
+
|
261
|
+
# ==> Mountable engine configurations
|
262
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
263
|
+
# is mountable, there are some extra configurations to be taken into account.
|
264
|
+
# The following options are available, assuming the engine is mounted as:
|
265
|
+
#
|
266
|
+
# mount MyEngine, at: '/my_engine'
|
267
|
+
#
|
268
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
269
|
+
# config.router_name = :my_engine
|
270
|
+
#
|
271
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
272
|
+
# so you need to do it manually. For the users scope, it would be:
|
273
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
274
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|