carnival 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +34 -0
- data/app/assets/images/carnival/avatar.png +0 -0
- data/app/assets/images/carnival/bg_button.png +0 -0
- data/app/assets/images/carnival/cal.png +0 -0
- data/app/assets/images/carnival/chosen-sprite.png +0 -0
- data/app/assets/images/carnival/chosen-sprite@2x.png +0 -0
- data/app/assets/images/carnival/datatables-loading.gif +0 -0
- data/app/assets/images/carnival/fonts/opensans-regular-webfont.eot +0 -0
- data/app/assets/images/carnival/fonts/opensans-regular-webfont.svg +252 -0
- data/app/assets/images/carnival/fonts/opensans-regular-webfont.ttf +0 -0
- data/app/assets/images/carnival/fonts/opensans-regular-webfont.woff +0 -0
- data/app/assets/images/carnival/fonts/opensans-semibold-webfont.eot +0 -0
- data/app/assets/images/carnival/fonts/opensans-semibold-webfont.svg +251 -0
- data/app/assets/images/carnival/fonts/opensans-semibold-webfont.ttf +0 -0
- data/app/assets/images/carnival/fonts/opensans-semibold-webfont.woff +0 -0
- data/app/assets/images/carnival/fonts/up-not.png +0 -0
- data/app/assets/images/carnival/header-bg.png +0 -0
- data/app/assets/images/carnival/novo.png +0 -0
- data/app/assets/images/carnival/overlay.png +0 -0
- data/app/assets/images/carnival/search-button.png +0 -0
- data/app/assets/images/carnival/search.png +0 -0
- data/app/assets/images/carnival/sort_asc.png +0 -0
- data/app/assets/images/carnival/sort_asc_disabled.png +0 -0
- data/app/assets/images/carnival/sort_both.png +0 -0
- data/app/assets/images/carnival/sort_desc.png +0 -0
- data/app/assets/images/carnival/sort_desc_disabled.png +0 -0
- data/app/assets/images/carnival/sprite.png +0 -0
- data/app/assets/images/carnival/sprites-active.png +0 -0
- data/app/assets/images/carnival/sprites.png +0 -0
- data/app/assets/images/carnival/up-not.png +0 -0
- data/app/assets/images/carnival/voltar.png +0 -0
- data/app/assets/javascripts/carnival/admin.js +10 -0
- data/app/assets/javascripts/carnival/advanced_search.js +40 -0
- data/app/assets/javascripts/carnival/data_tables_functions.js +75 -0
- data/app/assets/javascripts/carnival/external/chosen.jquery.js +1239 -0
- data/app/assets/javascripts/carnival/external/jquery-ui-1.9.1.custom.min.js +6 -0
- data/app/assets/javascripts/carnival/external/jquery.colorbox-min.js +7 -0
- data/app/assets/javascripts/carnival/external/jquery.dataTables.min.js +156 -0
- data/app/assets/javascripts/carnival/external/jquery.maskedinput.js +7 -0
- data/app/assets/javascripts/carnival/external/jquery.noty.js +560 -0
- data/app/assets/javascripts/carnival/external/jquery.noty.layout.bottom.js +34 -0
- data/app/assets/javascripts/carnival/external/jquery.noty.theme.default.js +156 -0
- data/app/assets/javascripts/carnival/external/perfect-scrollbar-0.4.6.min.js +4 -0
- data/app/assets/javascripts/carnival/external/perfect-scrollbar-0.4.6.with-mousewheel.min.js +4 -0
- data/app/assets/javascripts/carnival/vizir_admin.js +137 -0
- data/app/assets/stylesheets/carnival/admin.css +13 -0
- data/app/assets/stylesheets/carnival/admin_users.css +4 -0
- data/app/assets/stylesheets/carnival/chosen.css +435 -0
- data/app/assets/stylesheets/carnival/colorbox.css +69 -0
- data/app/assets/stylesheets/carnival/datatable.css +131 -0
- data/app/assets/stylesheets/carnival/formframe.css +407 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-icons_888888_256x240.png +0 -0
- data/app/assets/stylesheets/carnival/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/stylesheets/carnival/jquery-ui-1.8.11.custom.css +573 -0
- data/app/assets/stylesheets/carnival/jquery.noty.css +104 -0
- data/app/assets/stylesheets/carnival/main.css +2223 -0
- data/app/assets/stylesheets/carnival/noty_theme_default.css +185 -0
- data/app/assets/stylesheets/carnival/perfect-scrollbar-0.4.6.min.css +5 -0
- data/app/assets/stylesheets/carnival/vizir-grid.css +663 -0
- data/app/controllers/carnival/admin_user_notifications_controller.rb +19 -0
- data/app/controllers/carnival/admin_users_controller.rb +10 -0
- data/app/controllers/carnival/base_admin_controller.rb +103 -0
- data/app/controllers/carnival/omniauth_callbacks_controller.rb +26 -0
- data/app/controllers/carnival/sessions_controller.rb +23 -0
- data/app/datatable/carnival/generic_datatable.rb +179 -0
- data/app/helpers/carnival/admin_users_helper.rb +4 -0
- data/app/helpers/carnival/base_admin_helper.rb +75 -0
- data/app/inputs/admin_base_input.rb +8 -0
- data/app/inputs/admin_currency_input.rb +12 -0
- data/app/inputs/admin_date_input.rb +11 -0
- data/app/inputs/admin_enum_input.rb +13 -0
- data/app/inputs/admin_relationship_select_input.rb +13 -0
- data/app/inputs/admin_text_input.rb +7 -0
- data/app/models/carnival/action.rb +51 -0
- data/app/models/carnival/admin_user.rb +40 -0
- data/app/models/carnival/admin_user_notification.rb +20 -0
- data/app/models/carnival/field.rb +102 -0
- data/app/models/carnival/form.rb +83 -0
- data/app/models/carnival/notification.rb +5 -0
- data/app/models/carnival/scope.rb +16 -0
- data/app/presenters/carnival/admin_user_notification_presenter.rb +61 -0
- data/app/presenters/carnival/admin_user_presenter.rb +53 -0
- data/app/presenters/carnival/base_admin_presenter.rb +336 -0
- data/app/views/carnival/admin_users/_form.html.haml +21 -0
- data/app/views/carnival/admin_users/edit.html.haml +3 -0
- data/app/views/carnival/admin_users/new.html.haml +4 -0
- data/app/views/carnival/admin_users/show.html.haml +14 -0
- data/app/views/carnival/index.html.haml +93 -0
- data/app/views/carnival/index.pdf.haml +5 -0
- data/app/views/carnival/login.html.haml +20 -0
- data/app/views/carnival/shared/_action_default.html.haml +1 -0
- data/app/views/carnival/shared/_action_delete.html.haml +1 -0
- data/app/views/carnival/shared/_add_button.html.haml +2 -0
- data/app/views/carnival/shared/_advanced_search.html.haml +26 -0
- data/app/views/carnival/shared/_advanced_search_field.html.haml +10 -0
- data/app/views/carnival/shared/_application_popup_partial.html.haml +12 -0
- data/app/views/carnival/shared/_batch_operation_checkbox.html.haml +4 -0
- data/app/views/carnival/shared/_delete.html.haml +1 -0
- data/app/views/carnival/shared/_edit_delete.html.haml +6 -0
- data/app/views/carnival/shared/_extra.html.haml +3 -0
- data/app/views/carnival/shared/_extra_item.html.haml +21 -0
- data/app/views/carnival/shared/_filter_bar.html.haml +3 -0
- data/app/views/carnival/shared/_header.pdf.haml +13 -0
- data/app/views/carnival/shared/_item_buttons.html.haml +3 -0
- data/app/views/carnival/shared/_link_fields.html.haml +6 -0
- data/app/views/carnival/shared/_list_cel.html.haml +9 -0
- data/app/views/carnival/shared/_list_cel.pdf.haml +9 -0
- data/app/views/carnival/shared/_period_filter.html.haml +54 -0
- data/app/views/carnival/shared/_report.pdf.haml +21 -0
- data/app/views/carnival/shared/_scope.html.haml +75 -0
- data/app/views/carnival/shared/_special_scope.html.haml +1 -0
- data/app/views/carnival/shared/form/_edit.html.haml +1 -0
- data/app/views/carnival/shared/form/_field.html.haml +8 -0
- data/app/views/carnival/shared/form/_form.html.haml +13 -0
- data/app/views/carnival/shared/form/edit.html.haml +6 -0
- data/app/views/carnival/shared/form/new.html.haml +7 -0
- data/app/views/carnival/shared/form/show.html.haml +16 -0
- data/app/views/carnival/shared/render_popup.js.erb +2 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +19 -0
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/layouts/carnival/_menu.html.haml +30 -0
- data/app/views/layouts/carnival/_notifications_list.html.haml +27 -0
- data/app/views/layouts/carnival/admin.html.haml +51 -0
- data/config/initializers/carnival_initializer.rb +41 -0
- data/config/initializers/devise.rb +258 -0
- data/config/initializers/simple_form.rb +3 -0
- data/config/locales/carnival.en.yml +1 -0
- data/config/locales/carnival.pt.yml +228 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/devise.pt.yml +59 -0
- data/config/routes.rb +8 -0
- data/db/migrate/20140129211859_devise_create_admin_users.rb +43 -0
- data/db/migrate/20140129213216_create_notifications.rb +10 -0
- data/db/migrate/20140129223355_create_admin_user_notifications.rb +10 -0
- data/db/migrate/20140206144730_add_columns_to_admin_users.rb +7 -0
- data/lib/carnival.rb +13 -0
- data/lib/carnival/config.rb +10 -0
- data/lib/carnival/engine.rb +5 -0
- data/lib/carnival/routes.rb +13 -0
- data/lib/carnival/version.rb +3 -0
- data/lib/generators/carnival/install_generator.rb +18 -0
- data/lib/generators/carnival/templates/carnival_initializer.rb +41 -0
- data/lib/tasks/carnival_tasks.rake +4 -0
- data/test/carnival_test.rb +7 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/admin/cities_controller.rb +9 -0
- data/test/dummy/app/controllers/admin/countries_controller.rb +9 -0
- data/test/dummy/app/controllers/admin/people_controller.rb +9 -0
- data/test/dummy/app/controllers/admin/states_controller.rb +9 -0
- data/test/dummy/app/controllers/admin/testes_controller.rb +9 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/admin.rb +5 -0
- data/test/dummy/app/models/admin/association_common.rb +23 -0
- data/test/dummy/app/models/admin/city.rb +11 -0
- data/test/dummy/app/models/admin/company.rb +14 -0
- data/test/dummy/app/models/admin/country.rb +9 -0
- data/test/dummy/app/models/admin/job.rb +10 -0
- data/test/dummy/app/models/admin/person.rb +17 -0
- data/test/dummy/app/models/admin/professional_experience.rb +14 -0
- data/test/dummy/app/models/admin/state.rb +12 -0
- data/test/dummy/app/models/job.rb +8 -0
- data/test/dummy/app/presenters/admin/city_presenter.rb +42 -0
- data/test/dummy/app/presenters/admin/country_presenter.rb +28 -0
- data/test/dummy/app/presenters/admin/person_presenter.rb +60 -0
- data/test/dummy/app/presenters/admin/state_presenter.rb +35 -0
- data/test/dummy/app/views/admin/testes/_form.html.haml +17 -0
- data/test/dummy/app/views/admin/testes/edit.html.haml +3 -0
- data/test/dummy/app/views/admin/testes/new.html.haml +4 -0
- data/test/dummy/app/views/admin/testes/show.html.haml +14 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +22 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +47 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +15 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20140206211804_create_admin_companies.rb +16 -0
- data/test/dummy/db/migrate/20140206211829_create_admin_countries.rb +10 -0
- data/test/dummy/db/migrate/20140206211850_create_admin_states.rb +12 -0
- data/test/dummy/db/migrate/20140206211923_create_admin_cities.rb +11 -0
- data/test/dummy/db/migrate/20140206212128_create_admin_people.rb +19 -0
- data/test/dummy/db/migrate/20140309013000_create_jobs.rb +9 -0
- data/test/dummy/db/migrate/20140309013019_create_professional_experiences.rb +14 -0
- data/test/dummy/db/migrate/20140323020642_devise_create_admin_users.carnival_engine.rb +44 -0
- data/test/dummy/db/migrate/20140323020643_create_notifications.carnival_engine.rb +11 -0
- data/test/dummy/db/migrate/20140323020644_create_admin_user_notifications.carnival_engine.rb +11 -0
- data/test/dummy/db/migrate/20140323020645_add_columns_to_admin_users.carnival_engine.rb +8 -0
- data/test/dummy/db/schema.rb +143 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/bullet.log +0 -0
- data/test/dummy/log/development.log +6933 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/01c1d1cbb942f60130f0aa01d50c98d2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/049c6f2079e2e93f96fd228df8c265ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0d9971c4a3b5017a7d2122508b66bb12 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/147e4215ac96fd8b8d373567ae00ed47 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1634e1287a9914e738e710919b7cd6e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/16c6027bc506317d8266573d0ae1b510 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/16e4094498947b5f36bfbb490b94d025 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/197f549b9c46ec6679bddac8e4065948 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2109e2acf993625dc0a3f05e7e0af523 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/22e50c67b95bf23b653e7a6768d38749 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2684dad966b304ec2aee0149dc77c657 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2908a36318747c72030e94441a2579c4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2a4d4d7ea99972ea41453ec4e6bad058 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/30c8c2e6ca355103a267133f6b45b0ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31177aaa32db75be241353c5819450b4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/31a6581dfe5a788b2b450403959a97c5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/32daf8a3bfd9da8ab261f5002f66389f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/33dfbc7bdde795abfd1031ceaa315dc8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3636240cbc1f10d05a7e27f44c330bf9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/39d34c0caaa6f36d684fac1898a7f88f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3ac0f4fad0d3e6d3d13d4ed2189dcabe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3d8100b6e405407290dcf994ef05e0b7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3fd8a2a00bb4ebd69a3ecac257dbe536 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3fdb709b3417757576eff80c0ec26b75 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4423cb4765f66f187ffcb3be911c3600 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/45b86c586ed942b09cec2190b3c45c5a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/47ce692a80d5b075614c2489d7e3a142 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4a7a4dcd9fea9bd2e287771c51f96631 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4bd7e9214a07840040d269fdbf523e97 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4c36f4196d9df171251bea6f3b587fe3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4e4b1f24c5e69f2f305f6d6483a1605c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5090d7ea741c7f63994eb7b62e757f8f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/565023fdd3960225e817ec043b2d9474 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5a4d2d875f1d8ab987ab653f896d1c39 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5c8a4c90b3525681a2173b93b9d55293 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5e7998a2046d512312e432aef40d3e22 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5eacf8d05b2a79f57d54ee047a51e223 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/662125e0a3b8f685abafe02e03c6f442 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6808736d34ec24fb10203097ff009a4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6c257cb7126b2e5bda4c42d414e39786 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6ce5945ed85a31ec875a9973b5a3d3bc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6d806eaa317f200bbf2832a0abf1c1cc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6f6ec88ead28d25410be2a6f62ec79b1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/706dcf8ec253808fea35ae06a4b408b1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7cfe3fa955d677396ed9e22193559a64 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e154ca951644e8aa1a2c6221f08db4f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/822d6436044fe88b0b3fbc6f3458ff88 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/84e6a879569ca7546a93558488a6ff70 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8576d7c22dbd8222ab27a6c47f56a65c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/88144c375f9e329812d0302be96e0eab +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8a4b32386b5d8554473df478badd6ef9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8bc60f31f479cd0263d897aa45b88750 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8e22d55d0b7b958a3904e7428269df65 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/918ab452d9c4634682ff94ffbd89e16f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9455de99a5c68705427bbec9e50865ce +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/958dd41e5252627471b2b65116401512 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/996ac001c901711cabb64b7e1940c54a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9aec27b5fa2afdfa28068452ece0e6f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9db7e75f3fa621ef08ade7ffda96e39f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9dc853d92b5d774afadacc451965059c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a125dd8e84a82fc90705bd3710fb93c2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a1c5386d742fb4d01bea977ed28f4a96 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a30288f737d428b0feb2a78b3aab9c69 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a40d723f9a6ad5b541009b8f05ce6533 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a908448dd851cae431aa2b4bde9b5a98 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aa5708f6fbe7528d49c127a7f89a2511 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/aaf9dac7bb02577a8005e39ca9225482 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ad7b50123ad008ac0730bbbdf76a6bfe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b271e3537645a42480b3ba7bca2342f4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ba891185d4fda83f4c16e6bb8139359b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c72101732682999b6ca050f007fc6467 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c8927e934e7960fc7907b6fc02ea7f08 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c980544b5828a643ecaa8e784897c2c2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ca0e1997bc6c40f955a42ee777299750 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cc2c3f8b87c5b787305412a3076058db +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d16461dfcae4b782f721ebd81e4f8740 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d3b5d5784361e5eb827fbcdb0332258f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d81122f6f2520c8f0785425936756e20 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dbf160a6439a8d0b792ff46cf0a612f6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc829340258cc36c0df423725df54649 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dd326f3f4fd1c7fd075b58d6cb623a25 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de060f82711b4b5c465f17b140eb2a61 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e0352d0f97751491adbe6a94832772af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e1d6efce94e71965434d2dde64fd8410 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e4298973f799acdce289752c24bfddf2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e9c81ca91323dab8977ffd8a459cab06 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eccab0d41d08e156ccd2f36f85949356 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/eed84a44f4e3915a39ea98ce25dc2570 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f1e75c209067b23f5c0c7bf2006c43d0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f31e05a23db2e9dfc9207658cda7b799 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f5c9348795319821f3309d4e03bb9fdb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f631443b06d6b36e666344dbaf0b64f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7ab949c8c6b7ef3f2b743ebd98f9f59 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fc4b3bb94f52c27dfb87395841a7cb62 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fc79e1609ba401a4408c71182ef89b3e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fd1e0a44b82fc47f26c7adec9d918911 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/fe9a0ccc2a407c74780c85e66882e888 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ff3b0a569330823bd5599af14ee70cc8 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/fixtures/notifications.yml +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/models/notification_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- metadata +739 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
4
|
+
|
5
|
+
<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
|
6
|
+
|
7
|
+
<p>If you didn't request this, please ignore this email.</p>
|
8
|
+
<p>Your password won't change until you access the link above and create a new one.</p>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= @resource.email %>!</p>
|
2
|
+
|
3
|
+
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
4
|
+
|
5
|
+
<p>Click the link below to unlock your account:</p>
|
6
|
+
|
7
|
+
<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h2>Change your password</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
<%= f.hidden_field :reset_password_token %>
|
6
|
+
|
7
|
+
<div><%= f.label :password, "New password" %><br />
|
8
|
+
<%= f.password_field :password, :autofocus => true %></div>
|
9
|
+
|
10
|
+
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
|
11
|
+
<%= f.password_field :password_confirmation %></div>
|
12
|
+
|
13
|
+
<div><%= f.submit "Change my password" %></div>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Forgot your password?</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Send me reset password instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
10
|
+
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
14
|
+
<%= f.password_field :password, :autocomplete => "off" %></div>
|
15
|
+
|
16
|
+
<div><%= f.label :password_confirmation %><br />
|
17
|
+
<%= f.password_field :password_confirmation %></div>
|
18
|
+
|
19
|
+
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
20
|
+
<%= f.password_field :current_password %></div>
|
21
|
+
|
22
|
+
<div><%= f.submit "Update" %></div>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<h3>Cancel my account</h3>
|
26
|
+
|
27
|
+
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
|
28
|
+
|
29
|
+
<%= link_to "Back", :back %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.label :password %><br />
|
10
|
+
<%= f.password_field :password %></div>
|
11
|
+
|
12
|
+
<div><%= f.label :password_confirmation %><br />
|
13
|
+
<%= f.password_field :password_confirmation %></div>
|
14
|
+
|
15
|
+
<div><%= f.submit "Sign up" %></div>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<h2>Sign in</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
|
4
|
+
<%= link_to "Sign in with Facebook", admin_user_omniauth_authorize_path(:facebook) %>
|
5
|
+
<%= link_to "Sign in with Google", admin_user_omniauth_authorize_path(:google_oauth2) %>
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.label :password %><br />
|
10
|
+
<%= f.password_field :password %></div>
|
11
|
+
|
12
|
+
<% if devise_mapping.rememberable? -%>
|
13
|
+
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
|
14
|
+
<% end -%>
|
15
|
+
|
16
|
+
<div><%= f.submit "Sign in" %></div>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Sign in", new_session_path(resource_name) %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
+
<%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<h2>Resend unlock instructions</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<div><%= f.label :email %><br />
|
7
|
+
<%= f.email_field :email, :autofocus => true %></div>
|
8
|
+
|
9
|
+
<div><%= f.submit "Resend unlock instructions" %></div>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
- menus = Carnival::Config::menu.clone
|
2
|
+
.menu.full
|
3
|
+
%ul.menu
|
4
|
+
%li{:style => "border-top:none;"}
|
5
|
+
%span.arrow
|
6
|
+
%ul.dropdown_main_menu
|
7
|
+
%li.dashboard
|
8
|
+
= link_to t("menu.dashboard"), admin_root_url, {:class => " btn_usuario sublevel"}
|
9
|
+
%li.administracao
|
10
|
+
= link_to t("menu.admin"), "#", {:class => " btn_usuario sublevel"}
|
11
|
+
%ul.dropdown_main_menu_sublevel
|
12
|
+
%li
|
13
|
+
= link_to t('menu.admin_user'), admin_admin_users_path, {:class => "#{set_resource_actived_if_current(admin_admin_users_path)}"}
|
14
|
+
- menus[:admin][:subs].each do |sub|
|
15
|
+
%li
|
16
|
+
= link_to t(sub[:label]), sub[:link], {:class => "#{set_resource_actived_if_current(sub[:link])} #{sub[:class]}"}
|
17
|
+
- menus.delete :admin
|
18
|
+
- menus.each do |key, menu|
|
19
|
+
%li{:class =>key}
|
20
|
+
= link_to t(menu[:label]), menu[:link], {:class => " btn_usuario sublevel"}
|
21
|
+
%ul.dropdown_main_menu_sublevel
|
22
|
+
- menu[:subs].each do |sub|
|
23
|
+
%li
|
24
|
+
= link_to t(sub[:label]), sub[:link], {:class => "#{set_resource_actived_if_current(sub[:link])} #{sub[:class]}"}
|
25
|
+
|
26
|
+
%li.minify
|
27
|
+
%span="Minimizar"
|
28
|
+
|
29
|
+
|
30
|
+
.menu.short
|
@@ -0,0 +1,27 @@
|
|
1
|
+
.baloon_arrow
|
2
|
+
.notifications_container
|
3
|
+
.circle
|
4
|
+
= link_to current_admin_user.unread_notifications.size, "#", :class => "notifications_counter #{current_admin_user.unread_notifications.size > 0 ? 'unread' : 'read'}"
|
5
|
+
:javascript
|
6
|
+
$(document).ready(function() {
|
7
|
+
$('.circle').click(function () {
|
8
|
+
$('.notification-content').fadeToggle('fast');
|
9
|
+
});
|
10
|
+
});
|
11
|
+
.notification-content
|
12
|
+
%span.up-not
|
13
|
+
.notifications_list
|
14
|
+
#notification-scroll
|
15
|
+
%ul
|
16
|
+
- current_admin_user.admin_user_notifications.order('created_at desc').each do |n|
|
17
|
+
%li{:class => "#{(n.read)? 'read' : 'unread'}"}
|
18
|
+
%span.title="#{n.notification.title}:"
|
19
|
+
%br
|
20
|
+
%span.message= link_to n.notification.message.html_safe, admin_read_admin_user_notification_path(n)
|
21
|
+
.view-all
|
22
|
+
%span.message= link_to "Ver todas notificações", admin_admin_user_notifications_path
|
23
|
+
|
24
|
+
:javascript
|
25
|
+
$(document).ready(function(){
|
26
|
+
$('.notifications_list').perfectScrollbar();
|
27
|
+
})
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%link{ href: '/assets/favicon.ico', rel: 'shortcut icon', type: 'image/x-icon' }/
|
5
|
+
%title="#{Rails.application.class.to_s.split('::').first} Admin"
|
6
|
+
= stylesheet_link_tag "carnival/admin", :media => "all"
|
7
|
+
= stylesheet_link_tag controller_name if Rails.application.assets.find_asset("#{controller_name}.css")
|
8
|
+
= javascript_include_tag controller_name if Rails.application.assets.find_asset("#{controller_name}.js")
|
9
|
+
= javascript_include_tag "carnival/admin", "data-turbolinks-track" => true
|
10
|
+
= csrf_meta_tags
|
11
|
+
%link{:href => "http://fonts.googleapis.com/css?family=Raleway:400,600,700", :rel => "stylesheet", :type => "text/css"}
|
12
|
+
%script{:src => "http://www.google.com/jsapi"}
|
13
|
+
:javascript
|
14
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
15
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
16
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
17
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
18
|
+
|
19
|
+
ga('create', 'UA-46181046-2', 'safeguard.vc');
|
20
|
+
ga('send', 'pageview');
|
21
|
+
%body
|
22
|
+
#main
|
23
|
+
- if current_admin_user.present?
|
24
|
+
.right_menu
|
25
|
+
%div.sign_out= link_to t('logout'), destroy_admin_user_session_path, :method => :delete
|
26
|
+
%div.safe-guard-notification
|
27
|
+
= render '/layouts/carnival/notifications_list'
|
28
|
+
%div.salute
|
29
|
+
= link_to edit_admin_admin_user_path(:id => current_admin_user.id) do
|
30
|
+
.email
|
31
|
+
= current_admin_user.email
|
32
|
+
%figure
|
33
|
+
%img{:src => "#{current_admin_user.avatar.nil? ? '/assets/carnival/avatar.png' : current_admin_user.avatar}", :class => "#{current_admin_user.avatar.nil? ? 'default' : 'custom'}"}
|
34
|
+
|
35
|
+
#header_wrapper
|
36
|
+
#header
|
37
|
+
.logo_intranet= link_to "#{Rails.application.class.to_s.split('::').first} Admin", admin_root_url
|
38
|
+
#content_wrapper
|
39
|
+
= render '/layouts/carnival/menu'
|
40
|
+
#content
|
41
|
+
#main_column_wrapper
|
42
|
+
#main_column
|
43
|
+
:javascript
|
44
|
+
#{show_messages}
|
45
|
+
= yield
|
46
|
+
= render '/carnival/shared/application_popup_partial'
|
47
|
+
.clearfix
|
48
|
+
#footer_wrapper_app
|
49
|
+
#footer_app
|
50
|
+
#footer_title_app
|
51
|
+
#footer_logo_app
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Carnival::Config.menu = {
|
2
|
+
:admin => {
|
3
|
+
:label => "aaa",
|
4
|
+
:class => "ssss",
|
5
|
+
:link => "ddd",
|
6
|
+
:subs => [
|
7
|
+
{
|
8
|
+
:label => "menu.testes",
|
9
|
+
:class => "tst",
|
10
|
+
:link => "/admin/testes"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
:label => "55555",
|
14
|
+
:class => "66666",
|
15
|
+
:link => "777777"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
},
|
19
|
+
:locations => {
|
20
|
+
:label => "menu.locations",
|
21
|
+
:class => "",
|
22
|
+
:link => "#",
|
23
|
+
:subs => [
|
24
|
+
{
|
25
|
+
:label => "menu.countries",
|
26
|
+
:class => "countries",
|
27
|
+
:link => "/admin/countries"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
:label => "menu.states",
|
31
|
+
:class => "states",
|
32
|
+
:link => "/admin/states"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
:label => "menu.cities",
|
36
|
+
:class => "cities",
|
37
|
+
:link => "/admin/cities"
|
38
|
+
}
|
39
|
+
]
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,258 @@
|
|
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
|
+
config.secret_key = '34c7fc396b3c8671d7009261e6a6bc30a47d4f048b1d646b4fc868dc6666b58fe4e9087bf2462054b9677660de1592f88e2aefacd75bb47c7e2d1c770291620b'
|
8
|
+
|
9
|
+
# ==> Mailer Configuration
|
10
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
|
+
# note that it will be overwritten if you use your own mailer class
|
12
|
+
# with default "from" parameter.
|
13
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
14
|
+
|
15
|
+
# Configure the class responsible to send e-mails.
|
16
|
+
# config.mailer = 'Devise::Mailer'
|
17
|
+
|
18
|
+
# ==> ORM configuration
|
19
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
20
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
21
|
+
# available as additional gems.
|
22
|
+
require 'devise/orm/active_record'
|
23
|
+
|
24
|
+
# ==> Configuration for any authentication mechanism
|
25
|
+
# Configure which keys are used when authenticating a user. The default is
|
26
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
27
|
+
# authenticating a user, both parameters are required. Remember that those
|
28
|
+
# parameters are used only when authenticating and not when retrieving from
|
29
|
+
# session. If you need permissions, you should implement that in a before filter.
|
30
|
+
# You can also supply a hash where the value is a boolean determining whether
|
31
|
+
# or not authentication should be aborted when the value is not present.
|
32
|
+
# config.authentication_keys = [ :email ]
|
33
|
+
|
34
|
+
# Configure parameters from the request object used for authentication. Each entry
|
35
|
+
# given should be a request method and it will automatically be passed to the
|
36
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
37
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
38
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
39
|
+
# config.request_keys = []
|
40
|
+
|
41
|
+
# Configure which authentication keys should be case-insensitive.
|
42
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
43
|
+
# to authenticate or find a user. Default is :email.
|
44
|
+
config.case_insensitive_keys = [ :email ]
|
45
|
+
|
46
|
+
# Configure which authentication keys should have whitespace stripped.
|
47
|
+
# These keys will have whitespace before and after removed upon creating or
|
48
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
49
|
+
config.strip_whitespace_keys = [ :email ]
|
50
|
+
|
51
|
+
# Tell if authentication through request.params is enabled. True by default.
|
52
|
+
# It can be set to an array that will enable params authentication only for the
|
53
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
54
|
+
# enable it only for database (email + password) authentication.
|
55
|
+
# config.params_authenticatable = true
|
56
|
+
|
57
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
58
|
+
# It can be set to an array that will enable http authentication only for the
|
59
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
60
|
+
# enable it only for database authentication. The supported strategies are:
|
61
|
+
# :database = Support basic authentication with authentication key + password
|
62
|
+
# config.http_authenticatable = false
|
63
|
+
|
64
|
+
# If http headers should be returned for AJAX requests. True by default.
|
65
|
+
# config.http_authenticatable_on_xhr = true
|
66
|
+
|
67
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
68
|
+
# config.http_authentication_realm = 'Application'
|
69
|
+
|
70
|
+
# It will change confirmation, password recovery and other workflows
|
71
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
72
|
+
# Does not affect registerable.
|
73
|
+
# config.paranoid = true
|
74
|
+
|
75
|
+
# By default Devise will store the user in session. You can skip storage for
|
76
|
+
# particular strategies by setting this option.
|
77
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
78
|
+
# may want to disable generating routes to Devise's sessions controller by
|
79
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
80
|
+
config.skip_session_storage = [:http_auth]
|
81
|
+
|
82
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
83
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
84
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
85
|
+
# from the server. You can disable this option at your own risk.
|
86
|
+
# config.clean_up_csrf_token_on_authentication = true
|
87
|
+
|
88
|
+
# ==> Configuration for :database_authenticatable
|
89
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
90
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
91
|
+
#
|
92
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
93
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
94
|
+
# a value less than 10 in other environments.
|
95
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
96
|
+
|
97
|
+
# Setup a pepper to generate the encrypted password.
|
98
|
+
# config.pepper = 'f87de298ab9a4d0239a5409f8a780e8369a501e96a2629d62fc4f63ad0b139071896351c3e5200bedca5932c3f580a9c846a6f9d2e363af79329483f0ea975d7'
|
99
|
+
|
100
|
+
# ==> Configuration for :confirmable
|
101
|
+
# A period that the user is allowed to access the website even without
|
102
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
103
|
+
# able to access the website for two days without confirming his account,
|
104
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
105
|
+
# the user cannot access the website without confirming his account.
|
106
|
+
# config.allow_unconfirmed_access_for = 2.days
|
107
|
+
|
108
|
+
# A period that the user is allowed to confirm their account before their
|
109
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
110
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
111
|
+
# their account can't be confirmed with the token any more.
|
112
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
113
|
+
# before confirming their account.
|
114
|
+
# config.confirm_within = 3.days
|
115
|
+
|
116
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
117
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
118
|
+
# db field (see migrations). Until confirmed new email is stored in
|
119
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
120
|
+
config.reconfirmable = true
|
121
|
+
|
122
|
+
# Defines which key will be used when confirming an account
|
123
|
+
# config.confirmation_keys = [ :email ]
|
124
|
+
|
125
|
+
# ==> Configuration for :rememberable
|
126
|
+
# The time the user will be remembered without asking for credentials again.
|
127
|
+
# config.remember_for = 2.weeks
|
128
|
+
|
129
|
+
# If true, extends the user's remember period when remembered via cookie.
|
130
|
+
# config.extend_remember_period = false
|
131
|
+
|
132
|
+
# Options to be passed to the created cookie. For instance, you can set
|
133
|
+
# :secure => true in order to force SSL only cookies.
|
134
|
+
# config.rememberable_options = {}
|
135
|
+
|
136
|
+
# ==> Configuration for :validatable
|
137
|
+
# Range for password length. Default is 8..128.
|
138
|
+
config.password_length = 8..128
|
139
|
+
|
140
|
+
# Email regex used to validate email formats. It simply asserts that
|
141
|
+
# one (and only one) @ exists in the given string. This is mainly
|
142
|
+
# to give user feedback and not to assert the e-mail validity.
|
143
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
144
|
+
|
145
|
+
# ==> Configuration for :timeoutable
|
146
|
+
# The time you want to timeout the user session without activity. After this
|
147
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
148
|
+
# config.timeout_in = 30.minutes
|
149
|
+
|
150
|
+
# If true, expires auth token on session timeout.
|
151
|
+
# config.expire_auth_token_on_timeout = false
|
152
|
+
|
153
|
+
# ==> Configuration for :lockable
|
154
|
+
# Defines which strategy will be used to lock an account.
|
155
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
156
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
157
|
+
# config.lock_strategy = :failed_attempts
|
158
|
+
|
159
|
+
# Defines which key will be used when locking and unlocking an account
|
160
|
+
# config.unlock_keys = [ :email ]
|
161
|
+
|
162
|
+
# Defines which strategy will be used to unlock an account.
|
163
|
+
# :email = Sends an unlock link to the user email
|
164
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
165
|
+
# :both = Enables both strategies
|
166
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
167
|
+
# config.unlock_strategy = :both
|
168
|
+
|
169
|
+
# Number of authentication tries before locking an account if lock_strategy
|
170
|
+
# is failed attempts.
|
171
|
+
# config.maximum_attempts = 20
|
172
|
+
|
173
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
174
|
+
# config.unlock_in = 1.hour
|
175
|
+
|
176
|
+
# Warn on the last attempt before the account is locked.
|
177
|
+
# config.last_attempt_warning = false
|
178
|
+
|
179
|
+
# ==> Configuration for :recoverable
|
180
|
+
#
|
181
|
+
# Defines which key will be used when recovering the password for an account
|
182
|
+
# config.reset_password_keys = [ :email ]
|
183
|
+
|
184
|
+
# Time interval you can reset your password with a reset password key.
|
185
|
+
# Don't put a too small interval or your users won't have the time to
|
186
|
+
# change their passwords.
|
187
|
+
config.reset_password_within = 6.hours
|
188
|
+
|
189
|
+
# ==> Configuration for :encryptable
|
190
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
191
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
192
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
193
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
194
|
+
# REST_AUTH_SITE_KEY to pepper).
|
195
|
+
#
|
196
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
197
|
+
# config.encryptor = :sha512
|
198
|
+
|
199
|
+
# ==> Scopes configuration
|
200
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
201
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
202
|
+
# are using only default views.
|
203
|
+
# config.scoped_views = false
|
204
|
+
|
205
|
+
# Configure the default scope given to Warden. By default it's the first
|
206
|
+
# devise role declared in your routes (usually :user).
|
207
|
+
# config.default_scope = :user
|
208
|
+
|
209
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
210
|
+
# only the current scope. By default, Devise signs out all scopes.
|
211
|
+
# config.sign_out_all_scopes = true
|
212
|
+
|
213
|
+
# ==> Navigation configuration
|
214
|
+
# Lists the formats that should be treated as navigational. Formats like
|
215
|
+
# :html, should redirect to the sign in page when the user does not have
|
216
|
+
# access, but formats like :xml or :json, should return 401.
|
217
|
+
#
|
218
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
219
|
+
# should add them to the navigational formats lists.
|
220
|
+
#
|
221
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
222
|
+
# config.navigational_formats = ['*/*', :html]
|
223
|
+
|
224
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
225
|
+
config.sign_out_via = :delete
|
226
|
+
|
227
|
+
# ==> OmniAuth
|
228
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
229
|
+
# up on your models and hooks.
|
230
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
231
|
+
|
232
|
+
# ==> Warden configuration
|
233
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
234
|
+
# change the failure app, you can configure them inside the config.warden block.
|
235
|
+
#
|
236
|
+
# config.warden do |manager|
|
237
|
+
# manager.intercept_401 = false
|
238
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
239
|
+
# end
|
240
|
+
|
241
|
+
# ==> Mountable engine configurations
|
242
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
243
|
+
# is mountable, there are some extra configurations to be taken into account.
|
244
|
+
# The following options are available, assuming the engine is mounted as:
|
245
|
+
#
|
246
|
+
# mount MyEngine, at: '/my_engine'
|
247
|
+
#
|
248
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
249
|
+
# config.router_name = :my_engine
|
250
|
+
#
|
251
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
252
|
+
# so you need to do it manually. For the users scope, it would be:
|
253
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
254
|
+
|
255
|
+
require "omniauth-facebook"
|
256
|
+
config.omniauth :facebook, "324810390938005", "3c16625e74189a3708cc586dc050a6b2"
|
257
|
+
config.omniauth :google_oauth2, '431077382019-mumumjahr5cn6cooubtskc6ohael7923.apps.googleusercontent.com', 'ilH4B-KXN3tqG6qF9gGN1F_J'
|
258
|
+
end
|