optimacms_backups 0.0.1
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/Rakefile +37 -0
- data/app/assets/javascripts/optimacms_backups/application.js +13 -0
- data/app/assets/stylesheets/optimacms_backups/application.css +15 -0
- data/app/controllers/optimacms_backups/admin/backups_controller.rb +126 -0
- data/app/helpers/optimacms_options/application_helper.rb +4 -0
- data/app/helpers/optimacms_options/filter_helper.rb +17 -0
- data/app/views/layouts/optimacms_backups/application.html.erb +14 -0
- data/app/views/optimacms_backups/admin/backups/_list.html.haml +22 -0
- data/app/views/optimacms_backups/admin/backups/delete.js.erb +0 -0
- data/app/views/optimacms_backups/admin/backups/index.html.haml +56 -0
- data/config/routes.rb +15 -0
- data/lib/optimacms/admin_menu/admin_menu.rb +22 -0
- data/lib/optimacms_backups.rb +17 -0
- data/lib/optimacms_backups/engine.rb +38 -0
- data/lib/optimacms_backups/version.rb +3 -0
- data/lib/tasks/optimacms_backups/optimacms_backups.rake +35 -0
- data/lib/tasks/optimacms_backups_tasks.rake +4 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/debug_controller.rb +4 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -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 +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +39 -0
- data/spec/dummy/config/backup/development.yml +38 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +43 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -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 +3 -0
- data/spec/dummy/config/initializers/devise.rb +265 -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/kaminari_config.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/optimacms.rb +4 -0
- data/spec/dummy/config/initializers/redis.rb +1 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/simple_form.rb +166 -0
- data/spec/dummy/config/initializers/simple_form_bootstrap.rb +136 -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/routes.rb +18 -0
- data/spec/dummy/config/schedule.rb +41 -0
- data/spec/dummy/config/secrets.yml +25 -0
- data/spec/dummy/lib/optimacms/admin_menu/admin_menu.rb +22 -0
- data/spec/dummy/log/development.log +1567 -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/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_badges.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_glyphicons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_input-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_jumbotron.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_normalize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_print.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_responsive-embed.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_responsive-utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/05d719e30fdb1fc33ab7345a8a96fc2ba5acd7b1/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_background-variant.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_border-radius.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_center-block.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_clearfix.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_grid-framework.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_hide-text.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_image.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_nav-divider.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_nav-vertical-align.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_opacity.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_progress-bar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_reset-filter.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_resize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_responsive-visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_size.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_tab-focus.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_table-row.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_text-emphasis.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_text-overflow.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/07ad2749ad1dff0b3eff514e3f3618a7eb16d31d/_vendor-prefixes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/26af158bccf21c268563637534883b45e25afa27/font-awesome.css.erbc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/admin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/admin_tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/bootstrap_and_overrides.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/bootstrap_custom.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/bootstrap_variables.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/colors.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/7797f9d6138dd2c6ee45407c558e640a79a243c0/tpl.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e070deb3b48e5df4776034cc30ee02d620489ec3/noskin.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0535250345c7b1efff3bc664d7ff3814 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0b0588eb416d0cdecc54b0f7816c307a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13f60d2492f1bb3d8e228543041c75c9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1d204000233310c3bca3404cda7c443e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/204c56559d599b0509342b32cd4c5107 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/25b6592e6223a9ecec7b0dd9f1dec03e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2d2bbc60484c5a61afb49422caeefdac +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/30ce7931c35911851f1c08ffc52aa886 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3b7a5882e27798e6414b79b2e0e2b76d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/410e56ef5698cd537862a2df47839e02 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4bb89fd5d95f7b3294bcb02e94e078e1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4d94425fcc899584c007773a00f18d22 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/544f377be0fdcb55f15d8ae39f3f8f15 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/54cff2496ccca69e747e0ad6644804bd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/602b44db7006a7c331f377dcc4ab67db +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6674e577f5e53cf91c58427d17922a68 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6c25cb0fa4adf45134c3b67e49bbd576 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6ea641122a19528d31c0fcd92f8bcf1f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6fe8b99e7382fcd21d955064c451beee +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7ed17a64e2ecff9c3f46e26d68f02eab +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7fffdd6749714f217ccd6d09f9354777 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/801f1ac67fcaeba7f201aa8a280c317c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/80e85b88855c6309abb0927e70232a2e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/83ab64d88d1f74efb793253d1121fde5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8885959482e15d8a68f57186e4ad3fe8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8ae2a0703eae56e617da95f890a7c613 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/990b80a7abd4c8842a5fd8ff9594c29e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9cc03baf5fd3a167bec251bcff920d50 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9daae6e77dc078864f1a0a362d2fdb8c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a085a04d488a2608316f68fe789d28f7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a34b6a1c17b69387576ef698c2df7f16 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a84171eddd8a86884544cdd01967a501 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aec1ea599348fe28d5acf845ed60a372 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b7250af556a10509c6b1d7d580c37d72 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c16e22258e86baf09e4a165cf90464a8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c6fb86d2b656a7e598a5a67475a59c0d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d3635a8ba01cadc9865bb1484cce2528 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d8c3521cc0d441a6378a88bc0956f687 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9bd2396da91cea3aa9a1d7284fc9a7f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9c2b3812e39a8117a357d2caf527904 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/eb3eb2dc1496cec0b335beff3bf0354e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ed0143c3e7cede9dec3482cd24473ebb +0 -0
- metadata +418 -0
@@ -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,265 @@
|
|
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
|
+
config.scoped_views = true
|
5
|
+
|
6
|
+
config.secret_key = Rails.application.secrets.devise_secret_key
|
7
|
+
|
8
|
+
# Setup a pepper to generate the encrypted password.
|
9
|
+
config.pepper = '14f890567940ebd97c796ca1cb0969224bed880faee0d78e8b213f1b2e977d29e2c6e390cd50f3fb98d5561bdeb1722645df5fe4f7cedb630c7889c9c79e27e'
|
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
|
+
# ==> ORM configuration
|
21
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
22
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
23
|
+
# available as additional gems.
|
24
|
+
require 'devise/orm/active_record'
|
25
|
+
|
26
|
+
# ==> Configuration for any authentication mechanism
|
27
|
+
# Configure which keys are used when authenticating a user. The default is
|
28
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
29
|
+
# authenticating a user, both parameters are required. Remember that those
|
30
|
+
# parameters are used only when authenticating and not when retrieving from
|
31
|
+
# session. If you need permissions, you should implement that in a before filter.
|
32
|
+
# You can also supply a hash where the value is a boolean determining whether
|
33
|
+
# or not authentication should be aborted when the value is not present.
|
34
|
+
# config.authentication_keys = [:email]
|
35
|
+
|
36
|
+
# Configure parameters from the request object used for authentication. Each entry
|
37
|
+
# given should be a request method and it will automatically be passed to the
|
38
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
39
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
40
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
41
|
+
# config.request_keys = []
|
42
|
+
|
43
|
+
# Configure which authentication keys should be case-insensitive.
|
44
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
45
|
+
# to authenticate or find a user. Default is :email.
|
46
|
+
config.case_insensitive_keys = [:email]
|
47
|
+
|
48
|
+
# Configure which authentication keys should have whitespace stripped.
|
49
|
+
# These keys will have whitespace before and after removed upon creating or
|
50
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
51
|
+
config.strip_whitespace_keys = [:email]
|
52
|
+
|
53
|
+
# Tell if authentication through request.params is enabled. True by default.
|
54
|
+
# It can be set to an array that will enable params authentication only for the
|
55
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
56
|
+
# enable it only for database (email + password) authentication.
|
57
|
+
# config.params_authenticatable = true
|
58
|
+
|
59
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
60
|
+
# It can be set to an array that will enable http authentication only for the
|
61
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
62
|
+
# enable it only for database authentication. The supported strategies are:
|
63
|
+
# :database = Support basic authentication with authentication key + password
|
64
|
+
# config.http_authenticatable = false
|
65
|
+
|
66
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
67
|
+
# config.http_authenticatable_on_xhr = true
|
68
|
+
|
69
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
70
|
+
# config.http_authentication_realm = 'Application'
|
71
|
+
|
72
|
+
# It will change confirmation, password recovery and other workflows
|
73
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
74
|
+
# Does not affect registerable.
|
75
|
+
# config.paranoid = true
|
76
|
+
|
77
|
+
# By default Devise will store the user in session. You can skip storage for
|
78
|
+
# particular strategies by setting this option.
|
79
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
80
|
+
# may want to disable generating routes to Devise's sessions controller by
|
81
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
82
|
+
config.skip_session_storage = [:http_auth]
|
83
|
+
|
84
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
85
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
86
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
87
|
+
# from the server. You can disable this option at your own risk.
|
88
|
+
# config.clean_up_csrf_token_on_authentication = true
|
89
|
+
|
90
|
+
# ==> Configuration for :database_authenticatable
|
91
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
92
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
93
|
+
#
|
94
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
95
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
96
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
97
|
+
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
98
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
99
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
100
|
+
|
101
|
+
# Setup a pepper to generate the encrypted password.
|
102
|
+
# config.pepper = 'a10216c54c5f16257ba38852216ce84a0f92f1cde4b9c6ac16e858b7e3d58233f76919ee628328b4f83982c57463e803bf28d920d60baef0c0c6e573d9c4e1b2'
|
103
|
+
|
104
|
+
# Send a notification email when the user's password is changed
|
105
|
+
# config.send_password_change_notification = false
|
106
|
+
|
107
|
+
# ==> Configuration for :confirmable
|
108
|
+
# A period that the user is allowed to access the website even without
|
109
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
110
|
+
# able to access the website for two days without confirming their account,
|
111
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
112
|
+
# the user cannot access the website without confirming their account.
|
113
|
+
# config.allow_unconfirmed_access_for = 2.days
|
114
|
+
|
115
|
+
# A period that the user is allowed to confirm their account before their
|
116
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
117
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
118
|
+
# their account can't be confirmed with the token any more.
|
119
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
120
|
+
# before confirming their account.
|
121
|
+
# config.confirm_within = 3.days
|
122
|
+
|
123
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
124
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
125
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
126
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
127
|
+
config.reconfirmable = true
|
128
|
+
|
129
|
+
# Defines which key will be used when confirming an account
|
130
|
+
# config.confirmation_keys = [:email]
|
131
|
+
|
132
|
+
# ==> Configuration for :rememberable
|
133
|
+
# The time the user will be remembered without asking for credentials again.
|
134
|
+
# config.remember_for = 2.weeks
|
135
|
+
|
136
|
+
# Invalidates all the remember me tokens when the user signs out.
|
137
|
+
config.expire_all_remember_me_on_sign_out = true
|
138
|
+
|
139
|
+
# If true, extends the user's remember period when remembered via cookie.
|
140
|
+
# config.extend_remember_period = false
|
141
|
+
|
142
|
+
# Options to be passed to the created cookie. For instance, you can set
|
143
|
+
# secure: true in order to force SSL only cookies.
|
144
|
+
# config.rememberable_options = {}
|
145
|
+
|
146
|
+
# ==> Configuration for :validatable
|
147
|
+
# Range for password length.
|
148
|
+
config.password_length = 8..72
|
149
|
+
|
150
|
+
# Email regex used to validate email formats. It simply asserts that
|
151
|
+
# one (and only one) @ exists in the given string. This is mainly
|
152
|
+
# to give user feedback and not to assert the e-mail validity.
|
153
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
154
|
+
|
155
|
+
# ==> Configuration for :timeoutable
|
156
|
+
# The time you want to timeout the user session without activity. After this
|
157
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
158
|
+
# config.timeout_in = 30.minutes
|
159
|
+
|
160
|
+
# ==> Configuration for :lockable
|
161
|
+
# Defines which strategy will be used to lock an account.
|
162
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
163
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
164
|
+
# config.lock_strategy = :failed_attempts
|
165
|
+
|
166
|
+
# Defines which key will be used when locking and unlocking an account
|
167
|
+
# config.unlock_keys = [:email]
|
168
|
+
|
169
|
+
# Defines which strategy will be used to unlock an account.
|
170
|
+
# :email = Sends an unlock link to the user email
|
171
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
172
|
+
# :both = Enables both strategies
|
173
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
174
|
+
# config.unlock_strategy = :both
|
175
|
+
|
176
|
+
# Number of authentication tries before locking an account if lock_strategy
|
177
|
+
# is failed attempts.
|
178
|
+
# config.maximum_attempts = 20
|
179
|
+
|
180
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
181
|
+
# config.unlock_in = 1.hour
|
182
|
+
|
183
|
+
# Warn on the last attempt before the account is locked.
|
184
|
+
# config.last_attempt_warning = true
|
185
|
+
|
186
|
+
# ==> Configuration for :recoverable
|
187
|
+
#
|
188
|
+
# Defines which key will be used when recovering the password for an account
|
189
|
+
# config.reset_password_keys = [:email]
|
190
|
+
|
191
|
+
# Time interval you can reset your password with a reset password key.
|
192
|
+
# Don't put a too small interval or your users won't have the time to
|
193
|
+
# change their passwords.
|
194
|
+
config.reset_password_within = 6.hours
|
195
|
+
|
196
|
+
# When set to false, does not sign a user in automatically after their password is
|
197
|
+
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
198
|
+
# config.sign_in_after_reset_password = true
|
199
|
+
|
200
|
+
# ==> Configuration for :encryptable
|
201
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
202
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
203
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
204
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
205
|
+
# REST_AUTH_SITE_KEY to pepper).
|
206
|
+
#
|
207
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
208
|
+
# config.encryptor = :sha512
|
209
|
+
|
210
|
+
# ==> Scopes configuration
|
211
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
212
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
213
|
+
# are using only default views.
|
214
|
+
# config.scoped_views = false
|
215
|
+
|
216
|
+
# Configure the default scope given to Warden. By default it's the first
|
217
|
+
# devise role declared in your routes (usually :user).
|
218
|
+
# config.default_scope = :user
|
219
|
+
|
220
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
221
|
+
# only the current scope. By default, Devise signs out all scopes.
|
222
|
+
# config.sign_out_all_scopes = true
|
223
|
+
|
224
|
+
# ==> Navigation configuration
|
225
|
+
# Lists the formats that should be treated as navigational. Formats like
|
226
|
+
# :html, should redirect to the sign in page when the user does not have
|
227
|
+
# access, but formats like :xml or :json, should return 401.
|
228
|
+
#
|
229
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
230
|
+
# should add them to the navigational formats lists.
|
231
|
+
#
|
232
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
233
|
+
# config.navigational_formats = ['*/*', :html]
|
234
|
+
|
235
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
236
|
+
config.sign_out_via = :delete
|
237
|
+
|
238
|
+
# ==> OmniAuth
|
239
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
240
|
+
# up on your models and hooks.
|
241
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
242
|
+
|
243
|
+
# ==> Warden configuration
|
244
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
245
|
+
# change the failure app, you can configure them inside the config.warden block.
|
246
|
+
#
|
247
|
+
# config.warden do |manager|
|
248
|
+
# manager.intercept_401 = false
|
249
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
250
|
+
# end
|
251
|
+
|
252
|
+
# ==> Mountable engine configurations
|
253
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
254
|
+
# is mountable, there are some extra configurations to be taken into account.
|
255
|
+
# The following options are available, assuming the engine is mounted as:
|
256
|
+
#
|
257
|
+
# mount MyEngine, at: '/my_engine'
|
258
|
+
#
|
259
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
260
|
+
# config.router_name = :my_engine
|
261
|
+
#
|
262
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
263
|
+
# so you need to do it manually. For the users scope, it would be:
|
264
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
265
|
+
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
|
@@ -0,0 +1 @@
|
|
1
|
+
#$redis = Redis.new(:host => Rails.configuration.gex_config[:redis_host], :port => 6379)
|
@@ -0,0 +1,166 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
4
|
+
# complete input. You can remove any component from the
|
5
|
+
# wrapper, change the order or even add your own to the
|
6
|
+
# stack. The options given below are used to wrap the
|
7
|
+
# whole input.
|
8
|
+
config.wrappers :default, class: :input,
|
9
|
+
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
10
|
+
## Extensions enabled by default
|
11
|
+
# Any of these extensions can be disabled for a
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
13
|
+
# You can make any of these extensions optional by
|
14
|
+
# renaming `b.use` to `b.optional`.
|
15
|
+
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
17
|
+
# and required attributes
|
18
|
+
b.use :html5
|
19
|
+
|
20
|
+
# Calculates placeholders automatically from I18n
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
22
|
+
b.use :placeholder
|
23
|
+
|
24
|
+
## Optional extensions
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => true`
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
27
|
+
# if any exists. If you want to enable any of those
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
29
|
+
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
31
|
+
b.optional :maxlength
|
32
|
+
|
33
|
+
# Calculates pattern from format validations for string inputs
|
34
|
+
b.optional :pattern
|
35
|
+
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
37
|
+
b.optional :min_max
|
38
|
+
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
40
|
+
b.optional :readonly
|
41
|
+
|
42
|
+
## Inputs
|
43
|
+
b.use :label_input
|
44
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
45
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
46
|
+
|
47
|
+
## full_messages_for
|
48
|
+
# If you want to display the full error message for the attribute, you can
|
49
|
+
# use the component :full_error, like:
|
50
|
+
#
|
51
|
+
# b.use :full_error, wrap_with: { tag: :span, class: :error }
|
52
|
+
end
|
53
|
+
|
54
|
+
# The default wrapper to be used by the FormBuilder.
|
55
|
+
config.default_wrapper = :default
|
56
|
+
|
57
|
+
# Define the way to render check boxes / radio buttons with labels.
|
58
|
+
# Defaults to :nested for bootstrap config.
|
59
|
+
# inline: input + label
|
60
|
+
# nested: label > input
|
61
|
+
config.boolean_style = :nested
|
62
|
+
|
63
|
+
# Default class for buttons
|
64
|
+
config.button_class = 'btn'
|
65
|
+
|
66
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
67
|
+
# :first lists the first message for each field.
|
68
|
+
# Use :to_sentence to list all errors for each field.
|
69
|
+
# config.error_method = :first
|
70
|
+
|
71
|
+
# Default tag used for error notification helper.
|
72
|
+
config.error_notification_tag = :div
|
73
|
+
|
74
|
+
# CSS class to add for error notification helper.
|
75
|
+
config.error_notification_class = 'error_notification'
|
76
|
+
|
77
|
+
# ID to add for error notification helper.
|
78
|
+
# config.error_notification_id = nil
|
79
|
+
|
80
|
+
# Series of attempts to detect a default label method for collection.
|
81
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
82
|
+
|
83
|
+
# Series of attempts to detect a default value method for collection.
|
84
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
85
|
+
|
86
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
87
|
+
# config.collection_wrapper_tag = nil
|
88
|
+
|
89
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
90
|
+
# config.collection_wrapper_class = nil
|
91
|
+
|
92
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
93
|
+
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
94
|
+
# SimpleForm will force this option to be a label.
|
95
|
+
# config.item_wrapper_tag = :span
|
96
|
+
|
97
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
98
|
+
# config.item_wrapper_class = nil
|
99
|
+
|
100
|
+
# How the label text should be generated altogether with the required text.
|
101
|
+
# config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
|
102
|
+
|
103
|
+
# You can define the class to use on all labels. Default is nil.
|
104
|
+
# config.label_class = nil
|
105
|
+
|
106
|
+
# You can define the default class to be used on forms. Can be overriden
|
107
|
+
# with `html: { :class }`. Defaulting to none.
|
108
|
+
# config.default_form_class = nil
|
109
|
+
|
110
|
+
# You can define which elements should obtain additional classes
|
111
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
112
|
+
|
113
|
+
# Whether attributes are required by default (or not). Default is true.
|
114
|
+
# config.required_by_default = true
|
115
|
+
|
116
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
117
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
118
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
119
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
120
|
+
# change this configuration to true.
|
121
|
+
config.browser_validations = false
|
122
|
+
|
123
|
+
# Collection of methods to detect if a file type was given.
|
124
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
125
|
+
|
126
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
127
|
+
# to match as key, and the input type that will be used when the field name
|
128
|
+
# matches the regexp as value.
|
129
|
+
# config.input_mappings = { /count/ => :integer }
|
130
|
+
|
131
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
132
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
133
|
+
# config.wrapper_mappings = { string: :prepend }
|
134
|
+
|
135
|
+
# Namespaces where SimpleForm should look for custom input classes that
|
136
|
+
# override default inputs.
|
137
|
+
# config.custom_inputs_namespaces << "CustomInputs"
|
138
|
+
|
139
|
+
# Default priority for time_zone inputs.
|
140
|
+
# config.time_zone_priority = nil
|
141
|
+
|
142
|
+
# Default priority for country inputs.
|
143
|
+
# config.country_priority = nil
|
144
|
+
|
145
|
+
# When false, do not use translations for labels.
|
146
|
+
# config.translate_labels = true
|
147
|
+
|
148
|
+
# Automatically discover new inputs in Rails' autoload path.
|
149
|
+
# config.inputs_discovery = true
|
150
|
+
|
151
|
+
# Cache SimpleForm inputs discovery
|
152
|
+
# config.cache_discovery = !Rails.env.development?
|
153
|
+
|
154
|
+
# Default class for inputs
|
155
|
+
# config.input_class = nil
|
156
|
+
|
157
|
+
# Define the default class of the input wrapper of the boolean input.
|
158
|
+
config.boolean_label_class = 'checkbox'
|
159
|
+
|
160
|
+
# Defines if the default input wrapper class should be included in radio
|
161
|
+
# collection wrappers.
|
162
|
+
# config.include_default_input_wrapper_class = true
|
163
|
+
|
164
|
+
# Defines which i18n scope will be used in Simple Form.
|
165
|
+
# config.i18n_scope = 'simple_form'
|
166
|
+
end
|