xing-framework 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/default_configuration/base_app/API_DOC/README +23 -0
- data/default_configuration/base_app/API_DOC/admin-menus +167 -0
- data/default_configuration/base_app/API_DOC/admin-pages +173 -0
- data/default_configuration/base_app/API_DOC/content-block +10 -0
- data/default_configuration/base_app/API_DOC/navigation +54 -0
- data/default_configuration/base_app/API_DOC/page +38 -0
- data/default_configuration/base_app/CHANGELOG.md +122 -0
- data/default_configuration/base_app/Capfile +26 -0
- data/default_configuration/base_app/Gemfile +7 -0
- data/default_configuration/base_app/Gemfile.lock +155 -0
- data/default_configuration/base_app/README.md +24 -0
- data/default_configuration/base_app/Rakefile +25 -0
- data/default_configuration/base_app/backend/Gemfile +45 -0
- data/default_configuration/base_app/backend/Gemfile.lock +292 -0
- data/default_configuration/base_app/backend/README +12 -0
- data/default_configuration/base_app/backend/Rakefile +10 -0
- data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
- data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
- data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
- data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
- data/default_configuration/base_app/backend/app/models/user.rb +43 -0
- data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
- data/default_configuration/base_app/backend/bin/bundle +3 -0
- data/default_configuration/base_app/backend/bin/rails +4 -0
- data/default_configuration/base_app/backend/bin/rake +4 -0
- data/default_configuration/base_app/backend/config.ru +6 -0
- data/default_configuration/base_app/backend/config/application.rb +71 -0
- data/default_configuration/base_app/backend/config/boot.rb +4 -0
- data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
- data/default_configuration/base_app/backend/config/database.yml.example +22 -0
- data/default_configuration/base_app/backend/config/environment.rb +5 -0
- data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
- data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
- data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
- data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
- data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
- data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
- data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
- data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
- data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
- data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
- data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
- data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
- data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
- data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
- data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
- data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
- data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
- data/default_configuration/base_app/backend/config/routes.rb +33 -0
- data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
- data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
- data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
- data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
- data/default_configuration/base_app/backend/db/seeds.rb +14 -0
- data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
- data/default_configuration/base_app/backend/public/404.html +26 -0
- data/default_configuration/base_app/backend/public/422.html +26 -0
- data/default_configuration/base_app/backend/public/500.html +26 -0
- data/default_configuration/base_app/backend/public/favicon.ico +0 -0
- data/default_configuration/base_app/backend/public/index.html +0 -0
- data/default_configuration/base_app/backend/public/robots.txt +5 -0
- data/default_configuration/base_app/backend/script/rails +6 -0
- data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
- data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
- data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
- data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
- data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
- data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
- data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
- data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
- data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
- data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
- data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
- data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
- data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
- data/default_configuration/base_app/backend/static-app.ru +3 -0
- data/default_configuration/base_app/codeclimate.yml +7 -0
- data/default_configuration/base_app/config/compass.rb +21 -0
- data/default_configuration/base_app/config/deploy.rb +157 -0
- data/default_configuration/base_app/config/deploy/bundle-config +4 -0
- data/default_configuration/base_app/config/deploy/production.rb +7 -0
- data/default_configuration/base_app/config/deploy/staging.rb +6 -0
- data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
- data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
- data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
- data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
- data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
- data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
- data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
- data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
- data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
- data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
- data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
- data/default_configuration/base_app/dummy-api/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
- data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
- data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
- data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
- data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
- data/default_configuration/base_app/dump.rdb +0 -0
- data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
- data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
- data/default_configuration/base_app/frontend/Gemfile +5 -0
- data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
- data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
- data/default_configuration/base_app/frontend/LICENSE +19 -0
- data/default_configuration/base_app/frontend/README.md +5 -0
- data/default_configuration/base_app/frontend/bin/index.html +0 -0
- data/default_configuration/base_app/frontend/build.config.js +110 -0
- data/default_configuration/base_app/frontend/changelog.tpl +23 -0
- data/default_configuration/base_app/frontend/config/compass.rb +33 -0
- data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
- data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
- data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
- data/default_configuration/base_app/frontend/create +0 -0
- data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
- data/default_configuration/base_app/frontend/module.prefix +1 -0
- data/default_configuration/base_app/frontend/module.suffix +1 -0
- data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
- data/default_configuration/base_app/frontend/package.json +75 -0
- data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
- data/default_configuration/base_app/frontend/src/README.md +48 -0
- data/default_configuration/base_app/frontend/src/app/README.md +68 -0
- data/default_configuration/base_app/frontend/src/app/app.js +47 -0
- data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
- data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
- data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
- data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
- data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
- data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
- data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
- data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
- data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
- data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
- data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
- data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
- data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
- data/default_configuration/base_app/frontend/src/common/README.md +19 -0
- data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
- data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
- data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
- data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
- data/default_configuration/base_app/frontend/src/common/config.js +27 -0
- data/default_configuration/base_app/frontend/src/index.html +86 -0
- data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
- data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
- data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
- data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
- data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
- data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
- data/default_configuration/base_app/frontend/test/app.js +24 -0
- data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
- data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
- data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
- data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
- data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
- data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
- data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
- data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
- data/default_configuration/base_app/frontend/tools.md +223 -0
- data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
- data/default_configuration/base_app/static-app.ru +3 -0
- data/default_configuration/base_app/tmux-windows +68 -0
- data/default_configuration/base_app/tmux-windows.txt +53 -0
- data/lib/xing/cli.rb +8 -3
- data/lib/xing/cli/generators/new_project.rb +48 -13
- metadata +219 -7
@@ -0,0 +1,47 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = false
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
|
37
|
+
# Raises error for missing translations
|
38
|
+
# config.action_view.raise_on_missing_translations = true
|
39
|
+
|
40
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
41
|
+
# XXXXX
|
42
|
+
# Currently, in development, this needs to be set to the backend server
|
43
|
+
config.action_controller.asset_host = Rails.application.secrets[:asset_host]
|
44
|
+
|
45
|
+
config.middleware.use(Xing::Services::LogJsonResponses)
|
46
|
+
config.middleware.use(Xing::Services::LogJsonRequests)
|
47
|
+
end
|
@@ -0,0 +1,8 @@
|
|
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
|
+
# Precompile additional assets.
|
7
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
8
|
+
# 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 @@
|
|
1
|
+
BACKEND_SUBDOMAIN = "api"
|
@@ -0,0 +1,241 @@
|
|
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
|
+
# ==> Mailer Configuration
|
5
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
6
|
+
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
7
|
+
config.mailer_sender = Rails.application.secrets.email['from']
|
8
|
+
config.secret_key = Rails.application.secrets.devise_secret_key
|
9
|
+
|
10
|
+
# Configure the class responsible to send e-mails.
|
11
|
+
# config.mailer = "Devise::Mailer"
|
12
|
+
|
13
|
+
# ==> ORM configuration
|
14
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
15
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
16
|
+
# available as additional gems.
|
17
|
+
require 'devise/orm/active_record'
|
18
|
+
|
19
|
+
# ==> Configuration for any authentication mechanism
|
20
|
+
# Configure which keys are used when authenticating a user. The default is
|
21
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
22
|
+
# authenticating a user, both parameters are required. Remember that those
|
23
|
+
# parameters are used only when authenticating and not when retrieving from
|
24
|
+
# session. If you need permissions, you should implement that in a before filter.
|
25
|
+
# You can also supply a hash where the value is a boolean determining whether
|
26
|
+
# or not authentication should be aborted when the value is not present.
|
27
|
+
config.authentication_keys = [ :email ]
|
28
|
+
|
29
|
+
# Configure parameters from the request object used for authentication. Each entry
|
30
|
+
# given should be a request method and it will automatically be passed to the
|
31
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
32
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
33
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
34
|
+
# config.request_keys = []
|
35
|
+
|
36
|
+
# Configure which authentication keys should be case-insensitive.
|
37
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
38
|
+
# to authenticate or find a user. Default is :email.
|
39
|
+
config.case_insensitive_keys = [ :login, :email ]
|
40
|
+
|
41
|
+
# Configure which authentication keys should have whitespace stripped.
|
42
|
+
# These keys will have whitespace before and after removed upon creating or
|
43
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
44
|
+
config.strip_whitespace_keys = [ :login, :email ]
|
45
|
+
|
46
|
+
# Tell if authentication through request.params is enabled. True by default.
|
47
|
+
# It can be set to an array that will enable params authentication only for the
|
48
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
49
|
+
# enable it only for database (email + password) authentication.
|
50
|
+
# config.params_authenticatable = true
|
51
|
+
|
52
|
+
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
53
|
+
# It can be set to an array that will enable http authentication only for the
|
54
|
+
# given strategies, for example, `config.http_authenticatable = [:token]` will
|
55
|
+
# enable it only for token authentication.
|
56
|
+
# config.http_authenticatable = false
|
57
|
+
|
58
|
+
# If http headers should be returned for AJAX requests. True by default.
|
59
|
+
config.http_authenticatable_on_xhr = true
|
60
|
+
|
61
|
+
# The realm used in Http Basic Authentication. "Application" by default.
|
62
|
+
# config.http_authentication_realm = "Application"
|
63
|
+
|
64
|
+
# It will change confirmation, password recovery and other workflows
|
65
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
66
|
+
# Does not affect registerable.
|
67
|
+
# config.paranoid = true
|
68
|
+
|
69
|
+
# By default Devise will store the user in session. You can skip storage for
|
70
|
+
# :http_auth and :token_auth by adding those symbols to the array below.
|
71
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
72
|
+
# may want to disable generating routes to Devise's sessions controller by
|
73
|
+
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
74
|
+
config.skip_session_storage = [:http_auth]
|
75
|
+
|
76
|
+
# ==> Configuration for :database_authenticatable
|
77
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
78
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
79
|
+
#
|
80
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
81
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
82
|
+
# a value less than 10 in other environments.
|
83
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
84
|
+
|
85
|
+
# Setup a pepper to generate the encrypted password.
|
86
|
+
# config.pepper = "3737e01bb1d22a3507b66444e7365f257e9d29ff76617c64bdb7d53d54d3bc72a8d46c45e5ba575a271f20f03dc59950f41af06d52b40832bb64bc6c03475667"
|
87
|
+
|
88
|
+
# ==> Configuration for :confirmable
|
89
|
+
# A period that the user is allowed to access the website even without
|
90
|
+
# confirming his account. For instance, if set to 2.days, the user will be
|
91
|
+
# able to access the website for two days without confirming his account,
|
92
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
93
|
+
# the user cannot access the website without confirming his account.
|
94
|
+
# config.allow_unconfirmed_access_for = 2.days
|
95
|
+
|
96
|
+
# A period that the user is allowed to confirm their account before their
|
97
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
98
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
99
|
+
# their account can't be confirmed with the token any more.
|
100
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
101
|
+
# before confirming their account.
|
102
|
+
# config.confirm_within = 3.days
|
103
|
+
|
104
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
105
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
106
|
+
# db field (see migrations). Until confirmed new email is stored in
|
107
|
+
# unconfirmed email column, and copied to email column on successful confirmation.
|
108
|
+
config.reconfirmable = false
|
109
|
+
|
110
|
+
# Defines which key will be used when confirming an account
|
111
|
+
# config.confirmation_keys = [ :email ]
|
112
|
+
|
113
|
+
# ==> Configuration for :rememberable
|
114
|
+
# The time the user will be remembered without asking for credentials again.
|
115
|
+
# config.remember_for = 2.weeks
|
116
|
+
|
117
|
+
# If true, extends the user's remember period when remembered via cookie.
|
118
|
+
# config.extend_remember_period = false
|
119
|
+
|
120
|
+
# Options to be passed to the created cookie. For instance, you can set
|
121
|
+
# :secure => true in order to force SSL only cookies.
|
122
|
+
# config.rememberable_options = {}
|
123
|
+
|
124
|
+
# ==> Configuration for :validatable
|
125
|
+
# Range for password length. Default is 8..128.
|
126
|
+
config.password_length = 4..128
|
127
|
+
|
128
|
+
# Email regex used to validate email formats. It simply asserts that
|
129
|
+
# an one (and only one) @ exists in the given string. This is mainly
|
130
|
+
# to give user feedback and not to assert the e-mail validity.
|
131
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
132
|
+
|
133
|
+
# ==> Configuration for :timeoutable
|
134
|
+
# The time you want to timeout the user session without activity. After this
|
135
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
136
|
+
# config.timeout_in = 30.minutes
|
137
|
+
|
138
|
+
# If true, expires auth token on session timeout.
|
139
|
+
# config.expire_auth_token_on_timeout = false
|
140
|
+
|
141
|
+
# ==> Configuration for :lockable
|
142
|
+
# Defines which strategy will be used to lock an account.
|
143
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
144
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
145
|
+
# config.lock_strategy = :failed_attempts
|
146
|
+
|
147
|
+
# Defines which key will be used when locking and unlocking an account
|
148
|
+
# config.unlock_keys = [ :email ]
|
149
|
+
|
150
|
+
# Defines which strategy will be used to unlock an account.
|
151
|
+
# :email = Sends an unlock link to the user email
|
152
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
153
|
+
# :both = Enables both strategies
|
154
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
155
|
+
# config.unlock_strategy = :both
|
156
|
+
|
157
|
+
# Number of authentication tries before locking an account if lock_strategy
|
158
|
+
# is failed attempts.
|
159
|
+
# config.maximum_attempts = 20
|
160
|
+
|
161
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
162
|
+
# config.unlock_in = 1.hour
|
163
|
+
|
164
|
+
# ==> Configuration for :recoverable
|
165
|
+
#
|
166
|
+
# Defines which key will be used when recovering the password for an account
|
167
|
+
# config.reset_password_keys = [ :email ]
|
168
|
+
|
169
|
+
# Time interval you can reset your password with a reset password key.
|
170
|
+
# Don't put a too small interval or your users won't have the time to
|
171
|
+
# change their passwords.
|
172
|
+
config.reset_password_within = 6.hours
|
173
|
+
|
174
|
+
# ==> Configuration for :encryptable
|
175
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
176
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
177
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
178
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
179
|
+
# REST_AUTH_SITE_KEY to pepper)
|
180
|
+
# config.encryptor = :sha512
|
181
|
+
|
182
|
+
# ==> Configuration for :token_authenticatable
|
183
|
+
# Defines name of the authentication token params key
|
184
|
+
# config.token_authentication_key = :auth_token
|
185
|
+
|
186
|
+
# ==> Scopes configuration
|
187
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
188
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
189
|
+
# are using only default views.
|
190
|
+
# config.scoped_views = false
|
191
|
+
|
192
|
+
# Configure the default scope given to Warden. By default it's the first
|
193
|
+
# devise role declared in your routes (usually :user).
|
194
|
+
# config.default_scope = :user
|
195
|
+
|
196
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
197
|
+
# only the current scope. By default, Devise signs out all scopes.
|
198
|
+
# config.sign_out_all_scopes = true
|
199
|
+
|
200
|
+
# ==> Navigation configuration
|
201
|
+
# Lists the formats that should be treated as navigational. Formats like
|
202
|
+
# :html, should redirect to the sign in page when the user does not have
|
203
|
+
# access, but formats like :xml or :json, should return 401.
|
204
|
+
#
|
205
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
206
|
+
# should add them to the navigational formats lists.
|
207
|
+
#
|
208
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
209
|
+
config.navigational_formats = ["*/*", :html, :json]
|
210
|
+
|
211
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
212
|
+
config.sign_out_via = :delete
|
213
|
+
|
214
|
+
# ==> OmniAuth
|
215
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
216
|
+
# up on your models and hooks.
|
217
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
218
|
+
|
219
|
+
# ==> Warden configuration
|
220
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
221
|
+
# change the failure app, you can configure them inside the config.warden block.
|
222
|
+
#
|
223
|
+
# config.warden do |manager|
|
224
|
+
# manager.intercept_401 = false
|
225
|
+
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
226
|
+
# end
|
227
|
+
|
228
|
+
# ==> Mountable engine configurations
|
229
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
230
|
+
# is mountable, there are some extra configurations to be taken into account.
|
231
|
+
# The following options are available, assuming the engine is mounted as:
|
232
|
+
#
|
233
|
+
# mount MyEngine, at: "/my_engine"
|
234
|
+
#
|
235
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
236
|
+
# config.router_name = :my_engine
|
237
|
+
#
|
238
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
239
|
+
# so you need to do it manually. For the users scope, it would be:
|
240
|
+
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
241
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
DeviseTokenAuth.setup do |config|
|
2
|
+
# By default the authorization headers will change after each request. The
|
3
|
+
# client is responsible for keeping track of the changing tokens. Change
|
4
|
+
# this to false to prevent the Authorization header from changing after
|
5
|
+
# each request.
|
6
|
+
config.change_headers_on_each_request = false
|
7
|
+
|
8
|
+
# By default, users will need to re-authenticate after 2 weeks. This setting
|
9
|
+
# determines how long tokens will remain valid after they are issued.
|
10
|
+
#config.token_lifespan = 2.weeks
|
11
|
+
|
12
|
+
# Sometimes it's necessary to make several requests to the API at the same
|
13
|
+
# time. In this case, each request in the batch will need to share the same
|
14
|
+
# auth token. This setting determines how far apart the requests can be while
|
15
|
+
# still using the same auth token.
|
16
|
+
#config.batch_request_buffer_throttle = 5.seconds
|
17
|
+
|
18
|
+
# This route will be the prefix for all oauth2 redirect callbacks. For
|
19
|
+
# example, using the default '/omniauth', the github oauth2 provider will
|
20
|
+
# redirect successful authentications to '/omniauth/github/callback'
|
21
|
+
#config.omniauth_prefix = "/omniauth"
|
22
|
+
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,25 @@
|
|
1
|
+
FROM_ADDRESS = Rails.application.secrets.email['from']
|
2
|
+
REPLY_TO_ADDRESS = Rails.application.secrets.email['reply_to'] ||
|
3
|
+
Rails.application.secrets.email['from']
|
4
|
+
|
5
|
+
ActionMailer::Base.smtp_settings = {
|
6
|
+
:address => Rails.application.secrets.smtp['address'],
|
7
|
+
:port => Rails.application.secrets.smtp['port'],
|
8
|
+
:domain => Rails.application.secrets.smtp['domain'],
|
9
|
+
:user_name => Rails.application.secrets.smtp['user_name'],
|
10
|
+
:password => Rails.application.secrets.smtp['password'],
|
11
|
+
:authentication => :plain,
|
12
|
+
:raise_delivery_errors => (Rails.env.development?),
|
13
|
+
:enable_starttls_auto => true
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
class DevelopmentMailInterceptor
|
18
|
+
def self.delivering_email(message)
|
19
|
+
message.subject = "#{message.to} #{message.subject}"
|
20
|
+
message.to = Rails.application.secrets.email['test'] rescue "test@lrdesign.com"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
ActionMailer::Base.default_url_options[:host] = Rails.application.secrets.email['from_domain']
|
25
|
+
ActionMailer::Base.register_interceptor(DevelopmentMailInterceptor) if Rails.env.development?
|
@@ -0,0 +1,12 @@
|
|
1
|
+
my_formats = {
|
2
|
+
:short_date => '%-m/%-d/%Y', # 3/2/2010
|
3
|
+
:time => "%-I:%M %p ", # 2:06 pm
|
4
|
+
:month_year => "%b %Y", # Mar 2010
|
5
|
+
:month_day_year => "%B %-d, %Y", # March 2, 2010
|
6
|
+
:sync => '%m/%d/%Y %T', # 3/2/2010 02:06:00 ( or 3/2/2010 02:06:00 for morning)
|
7
|
+
:date_and_time => "%B %-d, %Y %l:%M %p", # March 2, 2010 2:06 pm
|
8
|
+
:date => "%B %-d, %Y", # March 2, 2010,
|
9
|
+
:weekday_month_day_year => "%A, %B %-d, %Y", # Tuesday, March 2, 2010
|
10
|
+
}
|
11
|
+
Time::DATE_FORMATS.merge!(my_formats)
|
12
|
+
Date::DATE_FORMATS.merge!(my_formats)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|