any_login 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +22 -7
- data/app/controllers/any_login/application_controller.rb +3 -1
- data/lib/any_login/engine.rb +20 -25
- data/{app/helpers/any_login/application_helper.rb → lib/any_login/helpers.rb} +4 -6
- data/lib/any_login/providers/authlogic.rb +1 -3
- data/lib/any_login/providers/clearance.rb +1 -5
- data/lib/any_login/providers/devise.rb +2 -4
- data/lib/any_login/providers/sorcery.rb +1 -3
- data/lib/any_login/version.rb +1 -1
- data/lib/any_login.rb +3 -0
- data/test/authlogic/integration/navigation_test.rb +25 -0
- data/test/authlogic/test_helper_authlogic.rb +5 -0
- data/test/clearance/integration/navigation_test.rb +24 -0
- data/test/clearance/test_helper_clearance.rb +5 -0
- data/test/devise/integration/navigation_test.rb +26 -0
- data/test/devise/test_helper_devise.rb +5 -0
- data/test/{any_login_test.rb → devise/unit/any_login_test.rb} +1 -1
- data/test/{any_login → devise/unit}/collection_test.rb +1 -1
- data/test/{dummy-authlogic → rails_apps/authlogic}/Rakefile +1 -1
- data/test/rails_apps/authlogic/app/assets/config/manifest.js +1 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/controllers/application_controller.rb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/controllers/home_controller.rb +1 -1
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/controllers/user_sessions_controller.rb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/models/user.rb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/models/user_session.rb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/views/home/about.html.erb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/views/home/index.html.erb +0 -0
- data/test/rails_apps/authlogic/app/views/layouts/application.html.erb +29 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/views/shared/_footer.html.erb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/views/shared/_header.html.erb +0 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/app/views/user_sessions/new.html.erb +0 -0
- data/test/rails_apps/authlogic/bin/rails +4 -0
- data/test/rails_apps/authlogic/bin/rake +4 -0
- data/test/rails_apps/authlogic/bin/setup +33 -0
- data/test/rails_apps/authlogic/config/application.rb +25 -0
- data/test/rails_apps/authlogic/config/boot.rb +5 -0
- data/test/{dummy-sorcery → rails_apps/authlogic}/config/database.yml +3 -3
- data/test/{dummy-authlogic → rails_apps/authlogic}/config/environment.rb +1 -1
- data/test/rails_apps/authlogic/config/environments/development.rb +70 -0
- data/test/{dummy → rails_apps/authlogic}/config/environments/production.rb +40 -26
- data/test/rails_apps/authlogic/config/environments/test.rb +60 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/config/initializers/any_login.rb +1 -0
- data/test/rails_apps/authlogic/config/initializers/assets.rb +12 -0
- data/test/rails_apps/authlogic/config/initializers/filter_parameter_logging.rb +8 -0
- data/test/{dummy-clearance → rails_apps/authlogic}/config/initializers/inflections.rb +4 -4
- data/test/{dummy-sorcery → rails_apps/authlogic}/config/initializers/sorcery.rb +0 -0
- data/test/{dummy-sorcery → rails_apps/authlogic}/config/locales/en.yml +13 -3
- data/test/{dummy-authlogic → rails_apps/authlogic}/config/routes.rb +0 -0
- data/test/rails_apps/authlogic/config/storage.yml +34 -0
- data/test/{dummy-clearance → rails_apps/authlogic}/config.ru +3 -1
- data/test/{dummy-clearance → rails_apps/authlogic}/db/migrate/20150907190739_create_users.rb +1 -1
- data/test/{dummy-authlogic → rails_apps/authlogic}/db/migrate/20150907190846_add_devise_to_users.rb +1 -1
- data/test/{dummy-clearance → rails_apps/authlogic}/db/migrate/20150928123254_change_users.rb +1 -1
- data/test/rails_apps/authlogic/db/migrate/20220825195914_populate_test_users.rb +21 -0
- data/test/rails_apps/authlogic/db/schema.rb +46 -0
- data/test/{dummy-authlogic → rails_apps/authlogic}/public/404.html +6 -6
- data/test/{dummy-clearance → rails_apps/authlogic}/public/422.html +6 -6
- data/test/{dummy-clearance → rails_apps/authlogic}/public/500.html +6 -6
- data/test/{dummy-authlogic → rails_apps/authlogic}/public/favicon.ico +0 -0
- data/test/{dummy-sorcery → rails_apps/clearance}/Rakefile +1 -1
- data/test/rails_apps/clearance/app/assets/config/manifest.js +1 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/controllers/application_controller.rb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/controllers/home_controller.rb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/models/user.rb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/models/user_session.rb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/views/home/about.html.erb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/views/home/index.html.erb +0 -0
- data/test/rails_apps/clearance/app/views/layouts/application.html.erb +29 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/views/shared/_footer.html.erb +0 -0
- data/test/{dummy-clearance → rails_apps/clearance}/app/views/shared/_header.html.erb +0 -0
- data/test/rails_apps/clearance/bin/rails +4 -0
- data/test/rails_apps/clearance/bin/rake +4 -0
- data/test/rails_apps/clearance/bin/setup +33 -0
- data/test/rails_apps/clearance/config/application.rb +25 -0
- data/test/rails_apps/clearance/config/boot.rb +5 -0
- data/test/{dummy-authlogic → rails_apps/clearance}/config/database.yml +3 -3
- data/test/{dummy-clearance → rails_apps/clearance}/config/environment.rb +1 -1
- data/test/rails_apps/clearance/config/environments/development.rb +70 -0
- data/test/{dummy-sorcery → rails_apps/clearance}/config/environments/production.rb +40 -26
- data/test/rails_apps/clearance/config/environments/test.rb +60 -0
- data/test/{dummy-clearance → rails_apps/clearance}/config/initializers/any_login.rb +1 -0
- data/test/rails_apps/clearance/config/initializers/assets.rb +12 -0
- data/test/{dummy-clearance → rails_apps/clearance}/config/initializers/clearance.rb +0 -0
- data/test/rails_apps/clearance/config/initializers/filter_parameter_logging.rb +8 -0
- data/test/{dummy-sorcery → rails_apps/clearance}/config/initializers/inflections.rb +4 -4
- data/test/{dummy-authlogic → rails_apps/clearance}/config/locales/en.yml +13 -3
- data/test/{dummy-clearance → rails_apps/clearance}/config/routes.rb +0 -0
- data/test/rails_apps/clearance/config/storage.yml +34 -0
- data/test/{dummy-sorcery → rails_apps/clearance}/config.ru +3 -1
- data/test/{dummy-sorcery → rails_apps/clearance}/db/migrate/20150907190739_create_users.rb +1 -1
- data/test/{dummy → rails_apps/clearance}/db/migrate/20150907190846_add_devise_to_users.rb +1 -1
- data/test/{dummy-clearance → rails_apps/clearance}/db/migrate/20150909210357_populate_test_users.rb +6 -6
- data/test/{dummy-authlogic → rails_apps/clearance}/db/migrate/20150928123254_change_users.rb +1 -1
- data/test/{dummy-clearance → rails_apps/clearance}/db/migrate/20151007170422_add_clearance_to_users.rb +1 -1
- data/test/rails_apps/clearance/db/schema.rb +49 -0
- data/test/{dummy-sorcery → rails_apps/clearance}/public/404.html +6 -6
- data/test/{dummy-sorcery → rails_apps/clearance}/public/422.html +6 -6
- data/test/{dummy-sorcery → rails_apps/clearance}/public/500.html +6 -6
- data/test/{dummy-clearance → rails_apps/clearance}/public/favicon.ico +0 -0
- data/test/{dummy-clearance → rails_apps/devise}/Rakefile +1 -1
- data/test/rails_apps/devise/app/assets/config/manifest.js +1 -0
- data/test/rails_apps/devise/app/controllers/application_controller.rb +2 -0
- data/test/{dummy → rails_apps/devise}/app/controllers/home_controller.rb +0 -0
- data/test/{dummy → rails_apps/devise}/app/models/user.rb +0 -0
- data/test/{dummy-sorcery → rails_apps/devise}/app/views/home/about.html.erb +0 -0
- data/test/{dummy → rails_apps/devise}/app/views/home/index.html.erb +0 -0
- data/test/rails_apps/devise/app/views/layouts/application.html.erb +29 -0
- data/test/{dummy → rails_apps/devise}/app/views/shared/_footer.html.erb +0 -1
- data/test/{dummy-sorcery → rails_apps/devise}/app/views/shared/_header.html.erb +0 -0
- data/test/rails_apps/devise/bin/rails +4 -0
- data/test/rails_apps/devise/bin/rake +4 -0
- data/test/rails_apps/devise/bin/setup +33 -0
- data/test/rails_apps/devise/config/application.rb +25 -0
- data/test/rails_apps/devise/config/boot.rb +5 -0
- data/test/{dummy → rails_apps/devise}/config/database.yml +3 -3
- data/test/{dummy → rails_apps/devise}/config/environment.rb +1 -1
- data/test/rails_apps/devise/config/environments/development.rb +67 -0
- data/test/{dummy-authlogic → rails_apps/devise}/config/environments/production.rb +40 -26
- data/test/rails_apps/devise/config/environments/test.rb +60 -0
- data/test/{dummy → rails_apps/devise}/config/initializers/any_login.rb +1 -0
- data/test/rails_apps/devise/config/initializers/assets.rb +12 -0
- data/test/{dummy → rails_apps/devise}/config/initializers/devise.rb +0 -0
- data/test/rails_apps/devise/config/initializers/filter_parameter_logging.rb +8 -0
- data/test/{dummy-authlogic → rails_apps/devise}/config/initializers/inflections.rb +4 -4
- data/test/{dummy → rails_apps/devise}/config/locales/en.yml +13 -3
- data/test/{dummy → rails_apps/devise}/config/routes.rb +0 -0
- data/test/rails_apps/devise/config/storage.yml +34 -0
- data/test/{dummy → rails_apps/devise}/config.ru +3 -1
- data/test/{dummy → rails_apps/devise}/db/migrate/20150907190739_create_users.rb +1 -1
- data/test/{dummy-sorcery → rails_apps/devise}/db/migrate/20150907190846_add_devise_to_users.rb +1 -1
- data/test/rails_apps/devise/db/migrate/20150909210357_populate_test_users.rb +21 -0
- data/test/rails_apps/devise/db/schema.rb +35 -0
- data/test/{dummy → rails_apps/devise}/public/404.html +6 -6
- data/test/{dummy-authlogic → rails_apps/devise}/public/422.html +6 -6
- data/test/{dummy-authlogic → rails_apps/devise}/public/500.html +6 -6
- data/test/{dummy-sorcery → rails_apps/devise}/public/favicon.ico +0 -0
- data/test/{dummy → rails_apps/sorcery}/Rakefile +1 -1
- data/test/rails_apps/sorcery/app/assets/config/manifest.js +1 -0
- data/test/rails_apps/sorcery/app/controllers/application_controller.rb +2 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/app/controllers/home_controller.rb +0 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/app/models/user.rb +0 -0
- data/test/{dummy → rails_apps/sorcery}/app/views/home/about.html.erb +0 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/app/views/home/index.html.erb +0 -0
- data/test/rails_apps/sorcery/app/views/layouts/application.html.erb +29 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/app/views/shared/_footer.html.erb +0 -0
- data/test/{dummy → rails_apps/sorcery}/app/views/shared/_header.html.erb +0 -0
- data/test/rails_apps/sorcery/bin/rails +4 -0
- data/test/rails_apps/sorcery/bin/rake +4 -0
- data/test/rails_apps/sorcery/bin/setup +33 -0
- data/test/rails_apps/sorcery/config/application.rb +25 -0
- data/test/rails_apps/sorcery/config/boot.rb +5 -0
- data/test/{dummy-clearance → rails_apps/sorcery}/config/database.yml +3 -3
- data/test/{dummy-sorcery → rails_apps/sorcery}/config/environment.rb +1 -1
- data/test/rails_apps/sorcery/config/environments/development.rb +70 -0
- data/test/{dummy-clearance → rails_apps/sorcery}/config/environments/production.rb +40 -26
- data/test/rails_apps/sorcery/config/environments/test.rb +60 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/config/initializers/any_login.rb +1 -0
- data/test/rails_apps/sorcery/config/initializers/assets.rb +12 -0
- data/test/rails_apps/sorcery/config/initializers/filter_parameter_logging.rb +8 -0
- data/test/{dummy → rails_apps/sorcery}/config/initializers/inflections.rb +4 -4
- data/test/rails_apps/sorcery/config/initializers/sorcery.rb +463 -0
- data/test/{dummy-clearance → rails_apps/sorcery}/config/locales/en.yml +13 -3
- data/test/{dummy-sorcery → rails_apps/sorcery}/config/routes.rb +0 -0
- data/test/rails_apps/sorcery/config/storage.yml +34 -0
- data/test/{dummy-authlogic → rails_apps/sorcery}/config.ru +3 -1
- data/test/{dummy-authlogic → rails_apps/sorcery}/db/migrate/20150907190739_create_users.rb +1 -1
- data/test/{dummy-clearance → rails_apps/sorcery}/db/migrate/20150907190846_add_devise_to_users.rb +1 -1
- data/test/rails_apps/sorcery/db/migrate/20150909210357_add_role_to_users.rb +6 -0
- data/test/{dummy-sorcery → rails_apps/sorcery}/db/migrate/20151019154558_sorcery_core.rb +2 -2
- data/test/rails_apps/sorcery/db/migrate/20220827040518_populate_test_users.rb +20 -0
- data/test/rails_apps/sorcery/db/schema.rb +37 -0
- data/test/{dummy-clearance → rails_apps/sorcery}/public/404.html +6 -6
- data/test/{dummy → rails_apps/sorcery}/public/422.html +6 -6
- data/test/{dummy → rails_apps/sorcery}/public/500.html +6 -6
- data/test/{dummy → rails_apps/sorcery}/public/favicon.ico +0 -0
- data/test/sorcery/integration/navigation_test.rb +24 -0
- data/test/sorcery/test_helper_sorcery.rb +5 -0
- data/test/test_helper_common.rb +25 -0
- metadata +347 -631
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/dummy/app/assets/fonts/glyphicons-halflings-regular.svg +0 -288
- data/test/dummy/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/dummy/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/dummy/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -15
- data/test/dummy/app/assets/javascripts/bootstrap.min.js +0 -7
- data/test/dummy/app/assets/javascripts/home.js +0 -2
- data/test/dummy/app/assets/stylesheets/application.css +0 -22
- data/test/dummy/app/assets/stylesheets/bootstrap-theme.min.css +0 -5
- data/test/dummy/app/assets/stylesheets/bootstrap.min.css +0 -5
- data/test/dummy/app/assets/stylesheets/home.css +0 -4
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/home_helper.rb +0 -2
- data/test/dummy/app/views/layouts/application.html.erb +0 -22
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -29
- data/test/dummy/config/application.rb +0 -26
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -42
- data/test/dummy/config/environments/test.rb +0 -42
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/devise.en.yml +0 -60
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20150909210357_populate_test_users.rb +0 -21
- data/test/dummy/db/schema.rb +0 -37
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy-authlogic/README.rdoc +0 -28
- data/test/dummy-authlogic/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/dummy-authlogic/app/assets/fonts/glyphicons-halflings-regular.svg +0 -288
- data/test/dummy-authlogic/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/dummy-authlogic/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/dummy-authlogic/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/test/dummy-authlogic/app/assets/javascripts/application.js +0 -15
- data/test/dummy-authlogic/app/assets/javascripts/bootstrap.min.js +0 -7
- data/test/dummy-authlogic/app/assets/javascripts/home.js +0 -2
- data/test/dummy-authlogic/app/assets/stylesheets/application.css +0 -15
- data/test/dummy-authlogic/app/assets/stylesheets/bootstrap-theme.min.css +0 -5
- data/test/dummy-authlogic/app/assets/stylesheets/bootstrap.min.css +0 -5
- data/test/dummy-authlogic/app/assets/stylesheets/home.css +0 -4
- data/test/dummy-authlogic/app/helpers/application_helper.rb +0 -2
- data/test/dummy-authlogic/app/helpers/home_helper.rb +0 -2
- data/test/dummy-authlogic/app/views/layouts/application.html.erb +0 -22
- data/test/dummy-authlogic/bin/bundle +0 -3
- data/test/dummy-authlogic/bin/rails +0 -4
- data/test/dummy-authlogic/bin/rake +0 -4
- data/test/dummy-authlogic/bin/setup +0 -29
- data/test/dummy-authlogic/config/application.rb +0 -26
- data/test/dummy-authlogic/config/boot.rb +0 -5
- data/test/dummy-authlogic/config/environments/development.rb +0 -42
- data/test/dummy-authlogic/config/environments/test.rb +0 -42
- data/test/dummy-authlogic/config/initializers/assets.rb +0 -11
- data/test/dummy-authlogic/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy-authlogic/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy-authlogic/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy-authlogic/config/initializers/mime_types.rb +0 -4
- data/test/dummy-authlogic/config/initializers/session_store.rb +0 -3
- data/test/dummy-authlogic/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy-authlogic/config/locales/devise.en.yml +0 -60
- data/test/dummy-authlogic/config/secrets.yml +0 -22
- data/test/dummy-authlogic/db/development.sqlite3 +0 -0
- data/test/dummy-authlogic/db/migrate/20150909210357_populate_test_users.rb +0 -21
- data/test/dummy-authlogic/db/schema.rb +0 -48
- data/test/dummy-clearance/README.rdoc +0 -28
- data/test/dummy-clearance/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/dummy-clearance/app/assets/fonts/glyphicons-halflings-regular.svg +0 -288
- data/test/dummy-clearance/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/dummy-clearance/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/dummy-clearance/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/test/dummy-clearance/app/assets/javascripts/application.js +0 -15
- data/test/dummy-clearance/app/assets/javascripts/bootstrap.min.js +0 -7
- data/test/dummy-clearance/app/assets/javascripts/home.js +0 -2
- data/test/dummy-clearance/app/assets/stylesheets/application.css +0 -15
- data/test/dummy-clearance/app/assets/stylesheets/bootstrap-theme.min.css +0 -5
- data/test/dummy-clearance/app/assets/stylesheets/bootstrap.min.css +0 -5
- data/test/dummy-clearance/app/assets/stylesheets/home.css +0 -4
- data/test/dummy-clearance/app/helpers/application_helper.rb +0 -2
- data/test/dummy-clearance/app/helpers/home_helper.rb +0 -2
- data/test/dummy-clearance/app/views/layouts/application.html.erb +0 -22
- data/test/dummy-clearance/app/views/user_sessions/new.html.erb +0 -11
- data/test/dummy-clearance/bin/bundle +0 -3
- data/test/dummy-clearance/bin/rails +0 -4
- data/test/dummy-clearance/bin/rake +0 -4
- data/test/dummy-clearance/bin/setup +0 -29
- data/test/dummy-clearance/config/application.rb +0 -26
- data/test/dummy-clearance/config/boot.rb +0 -5
- data/test/dummy-clearance/config/environments/development.rb +0 -42
- data/test/dummy-clearance/config/environments/test.rb +0 -42
- data/test/dummy-clearance/config/initializers/assets.rb +0 -11
- data/test/dummy-clearance/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy-clearance/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy-clearance/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy-clearance/config/initializers/mime_types.rb +0 -4
- data/test/dummy-clearance/config/initializers/session_store.rb +0 -3
- data/test/dummy-clearance/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy-clearance/config/locales/devise.en.yml +0 -60
- data/test/dummy-clearance/config/secrets.yml +0 -22
- data/test/dummy-clearance/db/schema.rb +0 -51
- data/test/dummy-sorcery/README.rdoc +0 -28
- data/test/dummy-sorcery/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/dummy-sorcery/app/assets/fonts/glyphicons-halflings-regular.svg +0 -288
- data/test/dummy-sorcery/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/dummy-sorcery/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/dummy-sorcery/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/test/dummy-sorcery/app/assets/javascripts/application.js +0 -15
- data/test/dummy-sorcery/app/assets/javascripts/bootstrap.min.js +0 -7
- data/test/dummy-sorcery/app/assets/javascripts/home.js +0 -2
- data/test/dummy-sorcery/app/assets/stylesheets/application.css +0 -15
- data/test/dummy-sorcery/app/assets/stylesheets/bootstrap-theme.min.css +0 -5
- data/test/dummy-sorcery/app/assets/stylesheets/bootstrap.min.css +0 -5
- data/test/dummy-sorcery/app/assets/stylesheets/home.css +0 -4
- data/test/dummy-sorcery/app/controllers/application_controller.rb +0 -5
- data/test/dummy-sorcery/app/helpers/application_helper.rb +0 -2
- data/test/dummy-sorcery/app/helpers/home_helper.rb +0 -2
- data/test/dummy-sorcery/app/views/layouts/application.html.erb +0 -22
- data/test/dummy-sorcery/bin/bundle +0 -3
- data/test/dummy-sorcery/bin/rails +0 -4
- data/test/dummy-sorcery/bin/rake +0 -4
- data/test/dummy-sorcery/bin/setup +0 -29
- data/test/dummy-sorcery/config/application.rb +0 -26
- data/test/dummy-sorcery/config/boot.rb +0 -5
- data/test/dummy-sorcery/config/environments/development.rb +0 -42
- data/test/dummy-sorcery/config/environments/test.rb +0 -42
- data/test/dummy-sorcery/config/initializers/assets.rb +0 -11
- data/test/dummy-sorcery/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy-sorcery/config/initializers/cookies_serializer.rb +0 -3
- data/test/dummy-sorcery/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy-sorcery/config/initializers/mime_types.rb +0 -4
- data/test/dummy-sorcery/config/initializers/session_store.rb +0 -3
- data/test/dummy-sorcery/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy-sorcery/config/locales/devise.en.yml +0 -60
- data/test/dummy-sorcery/config/secrets.yml +0 -22
- data/test/dummy-sorcery/db/migrate/20150909210357_populate_test_users.rb +0 -21
- data/test/dummy-sorcery/db/schema.rb +0 -39
- data/test/integration/navigation_test.rb +0 -8
- data/test/test_helper.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0dc9ff7dec47ebdcb17659928d9506d65ba25a8c42291a9f15f38bb71503a69
|
4
|
+
data.tar.gz: 72d8bb2f965b20a3aa10d0008f0ce46034064f8218dc0fc23e78ff1c9cde37ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a8c6731ce47c9493e7cfd9b2d2689132243ebb8e8709e1958bd2fd25b41ebe1ea435dd941a030671638425e5cf69ac496e9a8ee2892b4fb88aef1d1fb4d213
|
7
|
+
data.tar.gz: e43dc1fb5665cbc16e3bbc90cc49f4553b840f6c4cd1d91927b5fd1d2a441e4c5fb3aed47de089036192537c86f61541632b9c95191aa63b94730e32919bd438
|
data/Rakefile
CHANGED
@@ -14,24 +14,39 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
14
14
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
15
|
end
|
16
16
|
|
17
|
-
APP_RAKEFILE = File.expand_path("../test/
|
17
|
+
APP_RAKEFILE = File.expand_path("../test/rails_apps/devise/Rakefile", __FILE__)
|
18
18
|
load 'rails/tasks/engine.rake'
|
19
19
|
|
20
|
-
|
21
20
|
load 'rails/tasks/statistics.rake'
|
22
21
|
|
23
|
-
|
24
|
-
|
25
22
|
Bundler::GemHelper.install_tasks
|
26
23
|
|
27
24
|
require 'rake/testtask'
|
28
25
|
|
29
|
-
Rake::TestTask.new(:
|
26
|
+
Rake::TestTask.new(:test_devise) do |t|
|
27
|
+
t.libs << 'lib'
|
28
|
+
t.libs << 'test'
|
29
|
+
t.pattern = ['test/devise/**/*_test.rb']
|
30
|
+
t.verbose = false
|
31
|
+
end
|
32
|
+
|
33
|
+
Rake::TestTask.new(:test_authlogic) do |t|
|
30
34
|
t.libs << 'lib'
|
31
35
|
t.libs << 'test'
|
32
|
-
t.pattern = 'test/**/*_test.rb'
|
36
|
+
t.pattern = ['test/authlogic/**/*_test.rb']
|
33
37
|
t.verbose = false
|
34
38
|
end
|
35
39
|
|
40
|
+
Rake::TestTask.new(:test_clearance) do |t|
|
41
|
+
t.libs << 'lib'
|
42
|
+
t.libs << 'test'
|
43
|
+
t.pattern = ['test/clearance/**/*_test.rb']
|
44
|
+
t.verbose = false
|
45
|
+
end
|
36
46
|
|
37
|
-
|
47
|
+
Rake::TestTask.new(:test_sorcery) do |t|
|
48
|
+
t.libs << 'lib'
|
49
|
+
t.libs << 'test'
|
50
|
+
t.pattern = ['test/sorcery/**/*_test.rb']
|
51
|
+
t.verbose = false
|
52
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module AnyLogin
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
+
include AnyLogin.provider.constantize::Controller
|
4
|
+
include ::Clearance::Controller if AnyLogin.provider.eql?("AnyLogin::Provider::Clearance")
|
3
5
|
|
4
6
|
if AnyLogin.enabled
|
5
7
|
if AnyLogin.http_basic_authentication_enabled
|
@@ -12,7 +14,7 @@ module AnyLogin
|
|
12
14
|
try_not_to_leak_any_login_is_installed
|
13
15
|
head 403 && return unless AnyLogin.verify_access_proc.call(self)
|
14
16
|
add_to_previous
|
15
|
-
AnyLogin.provider::Controller.instance_method(:any_login_sign_in).bind(self).call
|
17
|
+
AnyLogin.provider.constantize::Controller.instance_method(:any_login_sign_in).bind(self).call
|
16
18
|
end
|
17
19
|
|
18
20
|
private
|
data/lib/any_login/engine.rb
CHANGED
@@ -8,46 +8,41 @@ module AnyLogin
|
|
8
8
|
|
9
9
|
initializer 'any_login.helpers' do
|
10
10
|
load_provider
|
11
|
-
|
12
11
|
ActiveSupport.on_load :action_controller do
|
13
|
-
|
14
|
-
AnyLogin.provider::Controller.send :include, Rails.application.routes.url_helpers
|
15
|
-
end
|
16
|
-
|
17
|
-
AnyLogin::ApplicationController.send :include, AnyLogin.provider::Controller
|
12
|
+
AnyLogin.provider.constantize::Controller.send :include, Rails.application.routes.url_helpers
|
18
13
|
end
|
19
14
|
|
20
15
|
ActiveSupport.on_load :action_view do
|
21
|
-
|
16
|
+
include AnyLogin::Helpers
|
22
17
|
end
|
23
18
|
end
|
24
19
|
|
25
20
|
private
|
26
21
|
|
27
22
|
def load_provider
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
when :sorcery
|
36
|
-
require 'any_login/providers/sorcery'
|
23
|
+
if (selected_provider = AnyLogin.provider || provider)
|
24
|
+
provider_with_module = "AnyLogin::Provider::#{selected_provider.to_s.capitalize}"
|
25
|
+
if Object.const_defined?(provider_with_module)
|
26
|
+
AnyLogin.provider = provider_with_module
|
27
|
+
else
|
28
|
+
AnyLogin.provider = selected_provider.to_s
|
29
|
+
end
|
37
30
|
else
|
38
|
-
throw 'Please use this gem with
|
31
|
+
throw 'Please use this gem with Devise, Authlogic or Clearance or provide a custom handler class'
|
39
32
|
end
|
40
33
|
end
|
41
34
|
|
42
35
|
def provider
|
43
|
-
if AnyLogin.provider.nil?
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
36
|
+
if AnyLogin.provider.nil?
|
37
|
+
if Object.const_defined?('Authlogic')
|
38
|
+
:authlogic
|
39
|
+
elsif Object.const_defined?('Devise')
|
40
|
+
:devise
|
41
|
+
elsif Object.const_defined?('Clearance')
|
42
|
+
:clearance
|
43
|
+
elsif Object.const_defined?('Sorcery')
|
44
|
+
:sorcery
|
45
|
+
end
|
51
46
|
end
|
52
47
|
end
|
53
48
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module AnyLogin
|
2
|
-
module
|
2
|
+
module Helpers
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
def any_login_here
|
@@ -9,7 +9,7 @@ module AnyLogin
|
|
9
9
|
if AnyLogin.enabled
|
10
10
|
|
11
11
|
def any_login_id_input
|
12
|
-
text_field_tag :id, '', :placeholder => 'ID', :id => 'any_login_id_input'
|
12
|
+
text_field_tag :id, '', :placeholder => 'ID', :id => 'any_login_id_input', :required => true
|
13
13
|
end
|
14
14
|
|
15
15
|
def any_login_submit
|
@@ -66,8 +66,8 @@ module AnyLogin
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def current_user_information
|
69
|
-
if respond_to?(AnyLogin.provider::Controller.any_login_current_user_method) &&
|
70
|
-
user = send(AnyLogin.provider::Controller.any_login_current_user_method)
|
69
|
+
if respond_to?(AnyLogin.provider.constantize::Controller.any_login_current_user_method) &&
|
70
|
+
user = send(AnyLogin.provider.constantize::Controller.any_login_current_user_method)
|
71
71
|
content_tag :span, :class => 'any_login_user_information' do
|
72
72
|
if AnyLogin.name_method.is_a?(Symbol)
|
73
73
|
raw("Current #{AnyLogin.klass_name}: #{h(user.send(AnyLogin.name_method)[0])} — ID: #{user.id}")
|
@@ -77,8 +77,6 @@ module AnyLogin
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
80
|
-
|
81
80
|
end
|
82
|
-
|
83
81
|
end
|
84
82
|
end
|
@@ -5,7 +5,7 @@ module AnyLogin
|
|
5
5
|
module Controller
|
6
6
|
|
7
7
|
def self.any_login_current_user_method
|
8
|
-
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.underscore}".to_sym
|
8
|
+
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.parameterize.underscore}".to_sym
|
9
9
|
end
|
10
10
|
|
11
11
|
def any_login_sign_in
|
@@ -20,5 +20,3 @@ module AnyLogin
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
24
|
-
AnyLogin.provider = AnyLogin::Provider::Authlogic
|
@@ -5,7 +5,7 @@ module AnyLogin
|
|
5
5
|
module Controller
|
6
6
|
|
7
7
|
def self.any_login_current_user_method
|
8
|
-
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.underscore}".to_sym
|
8
|
+
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.parameterize.underscore}".to_sym
|
9
9
|
end
|
10
10
|
|
11
11
|
def any_login_sign_in
|
@@ -20,7 +20,3 @@ module AnyLogin
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
24
|
-
AnyLogin.provider = AnyLogin::Provider::Clearance
|
25
|
-
|
26
|
-
AnyLogin::ApplicationController.send(:include, ::Clearance::Controller)
|
@@ -6,11 +6,11 @@ module AnyLogin
|
|
6
6
|
|
7
7
|
DEFAULT_SIGN_IN = proc do |loginable|
|
8
8
|
reset_session
|
9
|
-
sign_in AnyLogin.klass.to_s.underscore.to_sym, loginable
|
9
|
+
sign_in AnyLogin.klass.to_s.parameterize.underscore.to_sym, loginable
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.any_login_current_user_method
|
13
|
-
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.underscore}".to_sym
|
13
|
+
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.parameterize.underscore}".to_sym
|
14
14
|
end
|
15
15
|
|
16
16
|
def any_login_sign_in
|
@@ -27,5 +27,3 @@ module AnyLogin
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
31
|
-
AnyLogin.provider = AnyLogin::Provider::Devise
|
@@ -5,7 +5,7 @@ module AnyLogin
|
|
5
5
|
module Controller
|
6
6
|
|
7
7
|
def self.any_login_current_user_method
|
8
|
-
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.underscore}".to_sym
|
8
|
+
@@any_login_current_user_method ||= "current_#{AnyLogin.klass.to_s.parameterize.underscore}".to_sym
|
9
9
|
end
|
10
10
|
|
11
11
|
def any_login_sign_in
|
@@ -20,5 +20,3 @@ module AnyLogin
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
24
|
-
AnyLogin.provider = AnyLogin::Provider::Sorcery
|
data/lib/any_login/version.rb
CHANGED
data/lib/any_login.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../test_helper_authlogic'
|
2
|
+
|
3
|
+
|
4
|
+
class NavigationTest < ActionDispatch::IntegrationTest
|
5
|
+
setup do
|
6
|
+
@user = User.create(name: "test", email: "test@test.com", password: "password123", role: "user")
|
7
|
+
end
|
8
|
+
|
9
|
+
test "user cannot navigate to about page without login" do
|
10
|
+
visit "/about"
|
11
|
+
|
12
|
+
assert_no_text("This is secret page available only for logged in users")
|
13
|
+
end
|
14
|
+
|
15
|
+
test "it properly logs users in and allows access to the secret page" do
|
16
|
+
visit "/"
|
17
|
+
|
18
|
+
find("#any_login_form").click
|
19
|
+
find('#selected_id option:last-of-type').select_option
|
20
|
+
|
21
|
+
visit "/about"
|
22
|
+
|
23
|
+
assert_text("This is secret page available only for logged in users")
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative '../test_helper_clearance'
|
2
|
+
|
3
|
+
class NavigationTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@user = User.create(name: "test", email: "test@test.com", password: "password123", role: "user")
|
6
|
+
end
|
7
|
+
|
8
|
+
test "user cannot navigate to about page without login" do
|
9
|
+
visit "/about"
|
10
|
+
|
11
|
+
assert_no_text("This is secret page available only for logged in users")
|
12
|
+
end
|
13
|
+
|
14
|
+
test "it properly logs users in and allows access to the secret page" do
|
15
|
+
visit "/"
|
16
|
+
|
17
|
+
find("#any_login_form").click
|
18
|
+
find('#selected_id option:last-of-type').select_option
|
19
|
+
|
20
|
+
visit "/about"
|
21
|
+
|
22
|
+
assert_text("This is secret page available only for logged in users")
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative "../test_helper_devise"
|
2
|
+
|
3
|
+
class NavigationTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@user = User.create(name: "test", email: "test@test.com", password: "password123", role: "user")
|
6
|
+
end
|
7
|
+
|
8
|
+
test "user cannot navigate to about page without login" do
|
9
|
+
visit "/about"
|
10
|
+
|
11
|
+
assert_no_text("This is secret page available only for logged in users")
|
12
|
+
end
|
13
|
+
|
14
|
+
test "it properly logs users in and allows access to the secret page" do
|
15
|
+
visit "/"
|
16
|
+
|
17
|
+
find("#any_login_form").click
|
18
|
+
# There is an instability in the test suite where the option on the dropdown sometimes shows
|
19
|
+
# up as `1` and sometimes shows up as `test@test.com`. This works around the issue.
|
20
|
+
find('#selected_id option:last-of-type').select_option
|
21
|
+
|
22
|
+
visit "/about"
|
23
|
+
|
24
|
+
assert_text("This is secret page available only for logged in users")
|
25
|
+
end
|
26
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
require_relative "config/application"
|
5
5
|
|
6
6
|
Rails.application.load_tasks
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/test/{dummy-authlogic → rails_apps/authlogic}/app/controllers/application_controller.rb
RENAMED
File without changes
|
data/test/{dummy-authlogic → rails_apps/authlogic}/app/controllers/user_sessions_controller.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>AnyLogin Dummy</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<!-- Latest compiled and minified CSS -->
|
7
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
8
|
+
|
9
|
+
<!-- Optional theme -->
|
10
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
|
11
|
+
|
12
|
+
<!-- Include JQuery as required by bootstrap -->
|
13
|
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
|
14
|
+
|
15
|
+
<!-- Latest compiled and minified JavaScript -->
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
|
17
|
+
|
18
|
+
<%= csrf_meta_tags %>
|
19
|
+
<%= csp_meta_tag %>
|
20
|
+
</head>
|
21
|
+
|
22
|
+
<body role="document">
|
23
|
+
<%= render '/shared/header' %>
|
24
|
+
<div class="container theme-showcase" role="main">
|
25
|
+
<%= yield %>
|
26
|
+
</div>
|
27
|
+
<%= render '/shared/footer' %>
|
28
|
+
</body>
|
29
|
+
</html>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = File.expand_path("..", __dir__)
|
6
|
+
|
7
|
+
def system!(*args)
|
8
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
9
|
+
end
|
10
|
+
|
11
|
+
FileUtils.chdir APP_ROOT do
|
12
|
+
# This script is a way to set up or update your development environment automatically.
|
13
|
+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
|
14
|
+
# Add necessary setup steps to this file.
|
15
|
+
|
16
|
+
puts "== Installing dependencies =="
|
17
|
+
system! "gem install bundler --conservative"
|
18
|
+
system("bundle check") || system!("bundle install")
|
19
|
+
|
20
|
+
# puts "\n== Copying sample files =="
|
21
|
+
# unless File.exist?("config/database.yml")
|
22
|
+
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
|
23
|
+
# end
|
24
|
+
|
25
|
+
puts "\n== Preparing database =="
|
26
|
+
system! "bin/rails db:prepare"
|
27
|
+
|
28
|
+
puts "\n== Removing old logs and tempfiles =="
|
29
|
+
system! "bin/rails log:clear tmp:clear"
|
30
|
+
|
31
|
+
puts "\n== Restarting application server =="
|
32
|
+
system! "bin/rails restart"
|
33
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative "boot"
|
2
|
+
|
3
|
+
require "rails/all"
|
4
|
+
|
5
|
+
# Require the gems listed in Gemfile, including any gems
|
6
|
+
# you've limited to :test, :development, or :production.
|
7
|
+
Bundler.require(*Rails.groups)
|
8
|
+
require "any_login"
|
9
|
+
|
10
|
+
module DummyAuthlogic
|
11
|
+
class Application < Rails::Application
|
12
|
+
config.load_defaults Rails::VERSION::STRING.to_f
|
13
|
+
|
14
|
+
# For compatibility with applications that use this config
|
15
|
+
config.action_controller.include_all_helpers = false
|
16
|
+
|
17
|
+
# Configuration for the application, engines, and railties goes here.
|
18
|
+
#
|
19
|
+
# These settings can be overridden in specific environments using the files
|
20
|
+
# in config/environments, which are processed later.
|
21
|
+
#
|
22
|
+
# config.time_zone = "Central Time (US & Canada)"
|
23
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
24
|
+
end
|
25
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
# SQLite
|
1
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
2
2
|
# gem install sqlite3
|
3
3
|
#
|
4
4
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem
|
5
|
+
# gem "sqlite3"
|
6
6
|
#
|
7
7
|
default: &default
|
8
8
|
adapter: sqlite3
|
9
|
-
pool: 5
|
9
|
+
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
10
10
|
timeout: 5000
|
11
11
|
|
12
12
|
development:
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
3
|
+
Rails.application.configure do
|
4
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
|
6
|
+
# In the development environment your application's code is reloaded any time
|
7
|
+
# it changes. This slows down response time but is perfect for development
|
8
|
+
# since you don't have to restart the web server when you make code changes.
|
9
|
+
config.cache_classes = false
|
10
|
+
|
11
|
+
# Do not eager load code on boot.
|
12
|
+
config.eager_load = false
|
13
|
+
|
14
|
+
# Show full error reports.
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
|
17
|
+
# Enable server timing
|
18
|
+
config.server_timing = true
|
19
|
+
|
20
|
+
# Enable/disable caching. By default caching is disabled.
|
21
|
+
# Run rails dev:cache to toggle caching.
|
22
|
+
if Rails.root.join("tmp/caching-dev.txt").exist?
|
23
|
+
config.action_controller.perform_caching = true
|
24
|
+
config.action_controller.enable_fragment_cache_logging = true
|
25
|
+
|
26
|
+
config.cache_store = :memory_store
|
27
|
+
config.public_file_server.headers = {
|
28
|
+
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
29
|
+
}
|
30
|
+
else
|
31
|
+
config.action_controller.perform_caching = false
|
32
|
+
|
33
|
+
config.cache_store = :null_store
|
34
|
+
end
|
35
|
+
|
36
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
37
|
+
config.active_storage.service = :local
|
38
|
+
|
39
|
+
# Don't care if the mailer can't send.
|
40
|
+
config.action_mailer.raise_delivery_errors = false
|
41
|
+
|
42
|
+
config.action_mailer.perform_caching = false
|
43
|
+
|
44
|
+
# Print deprecation notices to the Rails logger.
|
45
|
+
config.active_support.deprecation = :log
|
46
|
+
|
47
|
+
# Raise exceptions for disallowed deprecations.
|
48
|
+
config.active_support.disallowed_deprecation = :raise
|
49
|
+
|
50
|
+
# Tell Active Support which deprecation messages to disallow.
|
51
|
+
config.active_support.disallowed_deprecation_warnings = []
|
52
|
+
|
53
|
+
# Raise an error on page load if there are pending migrations.
|
54
|
+
config.active_record.migration_error = :page_load
|
55
|
+
|
56
|
+
# Highlight code that triggered database queries in logs.
|
57
|
+
config.active_record.verbose_query_logs = true
|
58
|
+
|
59
|
+
# Suppress logger output for asset requests.
|
60
|
+
config.assets.quiet = true
|
61
|
+
|
62
|
+
# Raises error for missing translations.
|
63
|
+
# config.i18n.raise_on_missing_translations = true
|
64
|
+
|
65
|
+
# Annotate rendered view with file names.
|
66
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
67
|
+
|
68
|
+
# Uncomment if you wish to allow Action Cable access from any origin.
|
69
|
+
# config.action_cable.disable_request_forgery_protection = true
|
70
|
+
end
|