refinerycms-copywriting 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/{refinerycms-copywriting-tab.css.scss → refinery/copywriting/backend.css.scss} +4 -0
- data/app/models/refinery/copywriting/phrase.rb +3 -3
- data/app/views/refinery/copywriting/admin/phrases/_form.html.erb +8 -13
- data/app/views/refinery/copywriting/admin/phrases/_locale_filters.html.erb +0 -2
- data/app/views/refinery/copywriting/admin/phrases/_phrases.html.erb +1 -1
- data/app/views/refinery/copywriting/admin/phrases/edit.html.erb +1 -1
- data/app/views/refinery/copywriting/admin/phrases/index.html.erb +4 -4
- data/app/views/refinery/pages/admin/tabs/_copywriting.html.erb +2 -2
- data/config/locales/pl.yml +24 -0
- data/config/locales/ru.yml +24 -0
- data/config/routes.rb +1 -5
- data/db/migrate/2_create_copywriting_translation_table.rb +14 -1
- data/lib/refinery/copywriting/engine.rb +2 -2
- data/spec/models/copywriting_phrase_spec.rb +7 -2
- metadata +5 -67
- data/app/assets/stylesheets/refinerycms-copywriting.css.scss +0 -3
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/views/sitemap/index.xml.builder +0 -25
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -62
- data/spec/dummy/config/boot.rb +0 -6
- data/spec/dummy/config/database.yml +0 -18
- data/spec/dummy/config/database.yml.mysql +0 -20
- data/spec/dummy/config/database.yml.postgresql +0 -58
- data/spec/dummy/config/database.yml.sqlite3 +0 -18
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -37
- data/spec/dummy/config/environments/production.rb +0 -71
- data/spec/dummy/config/environments/test.rb +0 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/devise.rb +0 -229
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/refinery/core.rb +0 -48
- data/spec/dummy/config/initializers/refinery/images.rb +0 -41
- data/spec/dummy/config/initializers/refinery/pages.rb +0 -44
- data/spec/dummy/config/initializers/refinery/resources.rb +0 -26
- data/spec/dummy/config/initializers/secret_token.rb +0 -7
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/db/migrate/20120416115049_create_copywritings.refinery_copywriting.rb +0 -24
- data/spec/dummy/db/migrate/20120416115050_create_copywriting_translation_table.refinery_copywriting.rb +0 -42
- data/spec/dummy/db/migrate/20120416115051_add_phrase_type.refinery_copywriting.rb +0 -12
- data/spec/dummy/db/migrate/20120416115052_add_refinery_prefix_to_tables.refinery_copywriting.rb +0 -14
- data/spec/dummy/db/migrate/20120416115053_add_phrase_last_access_at.refinery_copywriting.rb +0 -12
- data/spec/dummy/db/migrate/20120416115054_create_refinerycms_authentication_schema.refinery_authentication.rb +0 -44
- data/spec/dummy/db/migrate/20120416115055_create_refinerycms_images_schema.refinery_images.rb +0 -16
- data/spec/dummy/db/migrate/20120416115056_create_refinerycms_resources_schema.refinery_resources.rb +0 -14
- data/spec/dummy/db/migrate/20120416115057_create_refinerycms_pages_schema.refinery_pages.rb +0 -59
- data/spec/dummy/db/migrate/20120416115058_create_seo_meta.seo_meta_engine.rb +0 -24
- data/spec/dummy/db/schema.rb +0 -177
- data/spec/dummy/db/seeds.rb +0 -10
- data/spec/dummy/dummy_dev +0 -0
- data/spec/dummy/dummy_test +0 -0
- data/spec/dummy/log/development.log +0 -389
- data/spec/dummy/log/test.log +0 -1894
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/tmp/index/development/refinery/page/102_111_117.ind +0 -2
- data/spec/dummy/tmp/index/development/refinery/page/104_111_109.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/110_111_116.ind +0 -1
- data/spec/dummy/tmp/index/development/refinery/page/112_97_103.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/97_98_111.ind +0 -0
- data/spec/dummy/tmp/index/development/refinery/page/size +0 -1
- data/spec/dummy/tmp/index/development/refinery/page/version +0 -1
- data/spec/dummy/tmp/index/test/refinery/page/112_97_103.ind +0 -1
- data/spec/dummy/tmp/index/test/refinery/page/116_101_115.ind +0 -0
- data/spec/dummy/tmp/index/test/refinery/page/size +0 -1
- data/spec/dummy/tmp/index/test/refinery/page/version +0 -1
data/spec/dummy/Rakefile
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
#!/usr/bin/env rake
|
2
|
-
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
-
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
-
|
5
|
-
require File.expand_path('../config/application', __FILE__)
|
6
|
-
|
7
|
-
Dummy::Application.load_tasks
|
@@ -1,15 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// the compiled file.
|
9
|
-
//
|
10
|
-
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
-
// GO AFTER THE REQUIRES BELOW.
|
12
|
-
//
|
13
|
-
//= require jquery
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require_tree .
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
-
*
|
11
|
-
*= require_self
|
12
|
-
*= require_tree .
|
13
|
-
*/
|
@@ -1,25 +0,0 @@
|
|
1
|
-
xml.instruct!
|
2
|
-
|
3
|
-
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
4
|
-
|
5
|
-
@locales.each do |locale|
|
6
|
-
::I18n.locale = locale
|
7
|
-
::Refinery::Page.live.in_menu.includes(:parts).each do |page|
|
8
|
-
# exclude sites that are external to our own domain.
|
9
|
-
page_url = if page.url.is_a?(Hash)
|
10
|
-
# This is how most pages work without being overriden by link_url
|
11
|
-
page.url.merge({:only_path => false})
|
12
|
-
elsif page.url.to_s !~ /^http/
|
13
|
-
# handle relative link_url addresses.
|
14
|
-
[request.protocol, request.host_with_port, page.url].join
|
15
|
-
end
|
16
|
-
|
17
|
-
# Add XML entry only if there is a valid page_url found above.
|
18
|
-
xml.url do
|
19
|
-
xml.loc url_for(page_url)
|
20
|
-
xml.lastmod page.updated_at.to_date
|
21
|
-
end if page_url.present? and page.show_in_menu?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
data/spec/dummy/config.ru
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
require 'bundler/setup'
|
6
|
-
|
7
|
-
# If you have a Gemfile, require the default gems, the ones in the
|
8
|
-
# current environment and also include :assets gems if in development
|
9
|
-
# or test environments.
|
10
|
-
Bundler.require *Rails.groups(:assets)
|
11
|
-
|
12
|
-
require 'refinerycms'
|
13
|
-
|
14
|
-
module Dummy
|
15
|
-
class Application < Rails::Application
|
16
|
-
# Settings in config/environments/* take precedence over those specified here.
|
17
|
-
# Application configuration should go into files in config/initializers
|
18
|
-
# -- all .rb files in that directory are automatically loaded.
|
19
|
-
|
20
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
21
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
22
|
-
|
23
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
24
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
25
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
26
|
-
|
27
|
-
# Activate observers that should always be running.
|
28
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
29
|
-
|
30
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
31
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
32
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
33
|
-
|
34
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
35
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
36
|
-
# config.i18n.default_locale = :de
|
37
|
-
|
38
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
39
|
-
config.encoding = "utf-8"
|
40
|
-
|
41
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
42
|
-
config.filter_parameters += [:password]
|
43
|
-
|
44
|
-
# Use SQL instead of Active Record's schema dumper when creating the database.
|
45
|
-
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
46
|
-
# like if you have constraints or database-specific column types
|
47
|
-
# config.active_record.schema_format = :sql
|
48
|
-
|
49
|
-
# Enforce whitelist mode for mass assignment.
|
50
|
-
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
51
|
-
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
52
|
-
# parameters by using an attr_accessible or attr_protected declaration.
|
53
|
-
# config.active_record.whitelist_attributes = true
|
54
|
-
|
55
|
-
# Enable the asset pipeline
|
56
|
-
config.assets.enabled = true
|
57
|
-
|
58
|
-
# Version of your assets, change this if you want to expire all your assets
|
59
|
-
config.assets.version = '1.0'
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
data/spec/dummy/config/boot.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
development: &development
|
2
|
-
adapter: mysql2
|
3
|
-
host: localhost
|
4
|
-
username: root
|
5
|
-
password:
|
6
|
-
database: your_local_database
|
7
|
-
|
8
|
-
test: &test
|
9
|
-
adapter: mysql2
|
10
|
-
host: localhost
|
11
|
-
username: root
|
12
|
-
password:
|
13
|
-
database: your_test_database
|
14
|
-
|
15
|
-
production: &production
|
16
|
-
adapter: mysql2
|
17
|
-
host: localhost
|
18
|
-
database: your_production_database
|
19
|
-
username: your_production_database_login
|
20
|
-
password: your_production_database_password
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# PostgreSQL. Versions 7.4 and 8.x are supported.
|
2
|
-
#
|
3
|
-
# Install the pg driver:
|
4
|
-
# gem install pg
|
5
|
-
# On Mac OS X with macports:
|
6
|
-
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
|
7
|
-
# On Windows:
|
8
|
-
# gem install pg
|
9
|
-
# Choose the win32 build.
|
10
|
-
# Install PostgreSQL and put its /bin directory on your path.
|
11
|
-
#
|
12
|
-
# Configure Using Gemfile
|
13
|
-
# gem 'pg'
|
14
|
-
#
|
15
|
-
development:
|
16
|
-
adapter: postgresql
|
17
|
-
encoding: unicode
|
18
|
-
database: refinery_database_development
|
19
|
-
pool: 5
|
20
|
-
username: postgres
|
21
|
-
password: postgres
|
22
|
-
min_messages: warning
|
23
|
-
|
24
|
-
# Connect on a TCP socket. Omitted by default since the client uses a
|
25
|
-
# domain socket that doesn't need configuration. Windows does not have
|
26
|
-
# domain sockets, so uncomment these lines.
|
27
|
-
#host: localhost
|
28
|
-
#port: 5432
|
29
|
-
|
30
|
-
# Schema search path. The server defaults to $user,public
|
31
|
-
#schema_search_path: myapp,sharedapp,public
|
32
|
-
|
33
|
-
# Minimum log levels, in increasing order:
|
34
|
-
# debug5, debug4, debug3, debug2, debug1,
|
35
|
-
# log, notice, warning, error, fatal, and panic
|
36
|
-
# The server defaults to notice.
|
37
|
-
#min_messages: warning
|
38
|
-
|
39
|
-
# Warning: The database defined as "test" will be erased and
|
40
|
-
# re-generated from your development database when you run "rake".
|
41
|
-
# Do not set this db to the same as development or production.
|
42
|
-
test:
|
43
|
-
adapter: postgresql
|
44
|
-
encoding: unicode
|
45
|
-
database: refinery_database_test
|
46
|
-
pool: 5
|
47
|
-
username: postgres
|
48
|
-
password: postgres
|
49
|
-
min_messages: warning
|
50
|
-
|
51
|
-
production:
|
52
|
-
adapter: postgresql
|
53
|
-
encoding: unicode
|
54
|
-
database: refinery_database_production
|
55
|
-
pool: 5
|
56
|
-
username: postgres
|
57
|
-
password: postgres
|
58
|
-
min_messages: warning
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
development:
|
3
|
-
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
4
|
-
database: db/development.sqlite3
|
5
|
-
timeout: 5000
|
6
|
-
|
7
|
-
# Warning: The database defined as 'test' will be erased and
|
8
|
-
# re-generated from your development database when you run 'rake'.
|
9
|
-
# Do not set this db to the same as development or production.
|
10
|
-
test:
|
11
|
-
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
12
|
-
database: db/test.sqlite3
|
13
|
-
timeout: 5000
|
14
|
-
|
15
|
-
production:
|
16
|
-
adapter: <%= "jdbc" if defined?(JRUBY_PLATFORM) %>sqlite3
|
17
|
-
database: db/production.sqlite3
|
18
|
-
timeout: 5000
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
3
|
-
|
4
|
-
# In the development environment your application's code is reloaded on
|
5
|
-
# every request. This slows down response time but is perfect for development
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
7
|
-
config.cache_classes = false
|
8
|
-
|
9
|
-
# Log error messages when you accidentally call methods on nil.
|
10
|
-
config.whiny_nils = true
|
11
|
-
|
12
|
-
# Show full error reports and disable caching
|
13
|
-
config.consider_all_requests_local = true
|
14
|
-
config.action_controller.perform_caching = false
|
15
|
-
|
16
|
-
# Don't care if the mailer can't send
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
|
-
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
|
-
# Do not compress assets
|
33
|
-
config.assets.compress = false
|
34
|
-
|
35
|
-
# Expands the lines which load the assets
|
36
|
-
config.assets.debug = true
|
37
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
Dummy::Application.configure do
|
2
|
-
|
3
|
-
# Refinery has set config.assets.initialize_on_precompile = false by default.
|
4
|
-
config.assets.initialize_on_precompile = false
|
5
|
-
|
6
|
-
# Settings specified here will take precedence over those in config/application.rb
|
7
|
-
|
8
|
-
# Code is not reloaded between requests
|
9
|
-
config.cache_classes = true
|
10
|
-
|
11
|
-
# Full error reports are disabled and caching is turned on
|
12
|
-
config.consider_all_requests_local = false
|
13
|
-
config.action_controller.perform_caching = true
|
14
|
-
|
15
|
-
# Disable Rails's static asset server (Apache or nginx will already do this)
|
16
|
-
config.serve_static_assets = false
|
17
|
-
|
18
|
-
# Compress JavaScripts and CSS
|
19
|
-
config.assets.compress = true
|
20
|
-
|
21
|
-
# Don't fallback to assets pipeline if a precompiled asset is missed
|
22
|
-
config.assets.compile = true
|
23
|
-
|
24
|
-
# Generate digests for assets URLs
|
25
|
-
config.assets.digest = true
|
26
|
-
|
27
|
-
# Defaults to Rails.root.join("public/assets")
|
28
|
-
# config.assets.manifest = YOUR_PATH
|
29
|
-
|
30
|
-
# Specifies the header that your server uses for sending files
|
31
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
32
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
33
|
-
|
34
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
35
|
-
# config.force_ssl = true
|
36
|
-
|
37
|
-
# See everything in the log (default is :info)
|
38
|
-
# config.log_level = :debug
|
39
|
-
|
40
|
-
# Prepend all log lines with the following tags
|
41
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
42
|
-
|
43
|
-
# Use a different logger for distributed setups
|
44
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
45
|
-
|
46
|
-
# Use a different cache store in production
|
47
|
-
# config.cache_store = :mem_cache_store
|
48
|
-
|
49
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
50
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
51
|
-
|
52
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
53
|
-
# config.assets.precompile += %w( search.js )
|
54
|
-
|
55
|
-
# Disable delivery errors, bad email addresses will be ignored
|
56
|
-
# config.action_mailer.raise_delivery_errors = false
|
57
|
-
|
58
|
-
# Enable threaded mode
|
59
|
-
# config.threadsafe!
|
60
|
-
|
61
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
62
|
-
# the I18n.default_locale when a translation can not be found)
|
63
|
-
config.i18n.fallbacks = true
|
64
|
-
|
65
|
-
# Send deprecation notices to registered listeners
|
66
|
-
config.active_support.deprecation = :notify
|
67
|
-
|
68
|
-
# Log the query plan for queries taking more than this (works
|
69
|
-
# with SQLite, MySQL, and PostgreSQL)
|
70
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
71
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
Dummy::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
|
-
# Configure static asset server for tests with Cache-Control for performance
|
11
|
-
config.serve_static_assets = true
|
12
|
-
config.static_cache_control = "public, max-age=3600"
|
13
|
-
|
14
|
-
# Log error messages when you accidentally call methods on nil
|
15
|
-
config.whiny_nils = true
|
16
|
-
|
17
|
-
# Show full error reports and disable caching
|
18
|
-
config.consider_all_requests_local = true
|
19
|
-
config.action_controller.perform_caching = false
|
20
|
-
|
21
|
-
# Raise exceptions instead of rendering exception templates
|
22
|
-
config.action_dispatch.show_exceptions = false
|
23
|
-
|
24
|
-
# Disable request forgery protection in test environment
|
25
|
-
config.action_controller.allow_forgery_protection = false
|
26
|
-
|
27
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
-
# The :test delivery method accumulates sent emails in the
|
29
|
-
# ActionMailer::Base.deliveries array.
|
30
|
-
config.action_mailer.delivery_method = :test
|
31
|
-
|
32
|
-
# Raise exception on mass assignment protection for Active Record models
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
-
|
35
|
-
# Print deprecation notices to the stderr
|
36
|
-
config.active_support.deprecation = :stderr
|
37
|
-
end
|
@@ -1,7 +0,0 @@
|
|
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!
|
@@ -1,229 +0,0 @@
|
|
1
|
-
require 'devise'
|
2
|
-
|
3
|
-
# Use this hook to configure devise mailer, warden hooks and so forth.
|
4
|
-
# Many of these configuration options can be set straight in your model.
|
5
|
-
Devise.setup do |config|
|
6
|
-
# ==> Mailer Configuration
|
7
|
-
# Configure the e-mail address which will be shown in Devise::Mailer,
|
8
|
-
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
9
|
-
# config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
10
|
-
|
11
|
-
# Configure the class responsible to send e-mails.
|
12
|
-
# config.mailer = "Devise::Mailer"
|
13
|
-
|
14
|
-
# Automatically apply schema changes in tableless databases
|
15
|
-
config.apply_schema = false
|
16
|
-
|
17
|
-
# ==> ORM configuration
|
18
|
-
# Load and configure the ORM. Supports :active_record (default) and
|
19
|
-
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
20
|
-
# available as additional gems.
|
21
|
-
require 'devise/orm/active_record'
|
22
|
-
|
23
|
-
# ==> Configuration for any authentication mechanism
|
24
|
-
# Configure which keys are used when authenticating a user. The default is
|
25
|
-
# just :email. You can configure it to use [:username, :subdomain], so for
|
26
|
-
# authenticating a user, both parameters are required. Remember that those
|
27
|
-
# parameters are used only when authenticating and not when retrieving from
|
28
|
-
# session. If you need permissions, you should implement that in a before filter.
|
29
|
-
# You can also supply a hash where the value is a boolean determining whether
|
30
|
-
# or not authentication should be aborted when the value is not present.
|
31
|
-
config.authentication_keys = [ :login ]
|
32
|
-
|
33
|
-
# Configure parameters from the request object used for authentication. Each entry
|
34
|
-
# given should be a request method and it will automatically be passed to the
|
35
|
-
# find_for_authentication method and considered in your model lookup. For instance,
|
36
|
-
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
37
|
-
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
38
|
-
# config.request_keys = []
|
39
|
-
|
40
|
-
# Configure which authentication keys should be case-insensitive.
|
41
|
-
# These keys will be downcased upon creating or modifying a user and when used
|
42
|
-
# to authenticate or find a user. Default is :email.
|
43
|
-
config.case_insensitive_keys = []
|
44
|
-
|
45
|
-
# Configure which authentication keys should have whitespace stripped.
|
46
|
-
# These keys will have whitespace before and after removed upon creating or
|
47
|
-
# modifying a user and when used to authenticate or find a user. Default is :email.
|
48
|
-
# config.strip_whitespace_keys = [ :email ]
|
49
|
-
|
50
|
-
# Tell if authentication through request.params is enabled. True by default.
|
51
|
-
# It can be set to an array that will enable params authentication only for the
|
52
|
-
# given stratragies, for example, `config.params_authenticatable = [:database]` will
|
53
|
-
# enable it only for database (email + password) authentication.
|
54
|
-
# config.params_authenticatable = true
|
55
|
-
|
56
|
-
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
|
57
|
-
# It can be set to an array that will enable http authentication only for the
|
58
|
-
# given stratragies, for example, `config.http_authenticatable = [:token]` will
|
59
|
-
# enable it only for token authentication.
|
60
|
-
# config.http_authenticatable = false
|
61
|
-
|
62
|
-
# If http headers should be returned for AJAX requests. True by default.
|
63
|
-
# config.http_authenticatable_on_xhr = true
|
64
|
-
|
65
|
-
# The realm used in Http Basic Authentication. "Application" by default.
|
66
|
-
# config.http_authentication_realm = "Application"
|
67
|
-
|
68
|
-
# It will change confirmation, password recovery and other workflows
|
69
|
-
# to behave the same regardless if the e-mail provided was right or wrong.
|
70
|
-
# Does not affect registerable.
|
71
|
-
# config.paranoid = true
|
72
|
-
|
73
|
-
# By default Devise will store the user in session. You can skip storage for
|
74
|
-
# :http_auth and :token_auth by adding those symbols to the array below.
|
75
|
-
# Notice that if you are skipping storage for all authentication paths, you
|
76
|
-
# may want to disable generating routes to Devise's sessions controller by
|
77
|
-
# passing :skip => :sessions to `devise_for` in your config/routes.rb
|
78
|
-
config.skip_session_storage = [:http_auth]
|
79
|
-
|
80
|
-
# ==> Configuration for :database_authenticatable
|
81
|
-
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
82
|
-
# using other encryptors, it sets how many times you want the password re-encrypted.
|
83
|
-
#
|
84
|
-
# Limiting the stretches to just one in testing will increase the performance of
|
85
|
-
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
86
|
-
# a value less than 10 in other environments.
|
87
|
-
config.stretches = Rails.env.test? ? 1 : 10
|
88
|
-
|
89
|
-
# Setup a pepper to generate the encrypted password.
|
90
|
-
# config.pepper = <%= SecureRandom.hex(64).inspect %>
|
91
|
-
|
92
|
-
# ==> Configuration for :confirmable
|
93
|
-
# A period that the user is allowed to access the website even without
|
94
|
-
# confirming his account. For instance, if set to 2.days, the user will be
|
95
|
-
# able to access the website for two days without confirming his account,
|
96
|
-
# access will be blocked just in the third day. Default is 0.days, meaning
|
97
|
-
# the user cannot access the website without confirming his account.
|
98
|
-
# config.allow_unconfirmed_access_for = 2.days
|
99
|
-
|
100
|
-
# If true, requires any email changes to be confirmed (exctly the same way as
|
101
|
-
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
102
|
-
# db field (see migrations). Until confirmed new email is stored in
|
103
|
-
# unconfirmed email column, and copied to email column on successful confirmation.
|
104
|
-
# config.reconfirmable = true
|
105
|
-
|
106
|
-
# Defines which key will be used when confirming an account
|
107
|
-
# config.confirmation_keys = [ :email ]
|
108
|
-
|
109
|
-
# ==> Configuration for :rememberable
|
110
|
-
# The time the user will be remembered without asking for credentials again.
|
111
|
-
# config.remember_for = 2.weeks
|
112
|
-
|
113
|
-
# If true, extends the user's remember period when remembered via cookie.
|
114
|
-
# config.extend_remember_period = false
|
115
|
-
|
116
|
-
# If true, uses the password salt as remember token. This should be turned
|
117
|
-
# to false if you are not using database authenticatable.
|
118
|
-
config.use_salt_as_remember_token = true
|
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.cookie_options = {}
|
123
|
-
|
124
|
-
# ==> Configuration for :validatable
|
125
|
-
# Range for password length. Default is 6..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
|
-
# ==> Configuration for :lockable
|
139
|
-
# Defines which strategy will be used to lock an account.
|
140
|
-
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
141
|
-
# :none = No lock strategy. You should handle locking by yourself.
|
142
|
-
# config.lock_strategy = :failed_attempts
|
143
|
-
|
144
|
-
# Defines which key will be used when locking and unlocking an account
|
145
|
-
# config.unlock_keys = [ :email ]
|
146
|
-
|
147
|
-
# Defines which strategy will be used to unlock an account.
|
148
|
-
# :email = Sends an unlock link to the user email
|
149
|
-
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
150
|
-
# :both = Enables both strategies
|
151
|
-
# :none = No unlock strategy. You should handle unlocking by yourself.
|
152
|
-
# config.unlock_strategy = :both
|
153
|
-
|
154
|
-
# Number of authentication tries before locking an account if lock_strategy
|
155
|
-
# is failed attempts.
|
156
|
-
# config.maximum_attempts = 20
|
157
|
-
|
158
|
-
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
159
|
-
# config.unlock_in = 1.hour
|
160
|
-
|
161
|
-
# ==> Configuration for :recoverable
|
162
|
-
#
|
163
|
-
# Defines which key will be used when recovering the password for an account
|
164
|
-
# config.reset_password_keys = [ :email ]
|
165
|
-
|
166
|
-
# Time interval you can reset your password with a reset password key.
|
167
|
-
# Don't put a too small interval or your users won't have the time to
|
168
|
-
# change their passwords.
|
169
|
-
config.reset_password_within = 6.hours
|
170
|
-
|
171
|
-
# ==> Configuration for :encryptable
|
172
|
-
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
173
|
-
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
174
|
-
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
175
|
-
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
176
|
-
# REST_AUTH_SITE_KEY to pepper)
|
177
|
-
# config.encryptor = :sha512
|
178
|
-
|
179
|
-
# ==> Configuration for :token_authenticatable
|
180
|
-
# Defines name of the authentication token params key
|
181
|
-
# config.token_authentication_key = :auth_token
|
182
|
-
|
183
|
-
# ==> Scopes configuration
|
184
|
-
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
185
|
-
# "users/sessions/new". It's turned off by default because it's slower if you
|
186
|
-
# are using only default views.
|
187
|
-
# config.scoped_views = false
|
188
|
-
|
189
|
-
# Configure the default scope given to Warden. By default it's the first
|
190
|
-
# devise role declared in your routes (usually :user).
|
191
|
-
# config.default_scope = :user
|
192
|
-
|
193
|
-
# Configure sign_out behavior.
|
194
|
-
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
|
195
|
-
# The default is true, which means any logout action will sign out all active scopes.
|
196
|
-
# config.sign_out_all_scopes = true
|
197
|
-
|
198
|
-
# ==> Navigation configuration
|
199
|
-
# Lists the formats that should be treated as navigational. Formats like
|
200
|
-
# :html, should redirect to the sign in page when the user does not have
|
201
|
-
# access, but formats like :xml or :json, should return 401.
|
202
|
-
#
|
203
|
-
# If you have any extra navigational formats, like :iphone or :mobile, you
|
204
|
-
# should add them to the navigational formats lists.
|
205
|
-
#
|
206
|
-
# The "*/*" below is required to match Internet Explorer requests.
|
207
|
-
# config.navigational_formats = ["*/*", :html]
|
208
|
-
|
209
|
-
# The default HTTP method used to sign out a resource. Default is :delete.
|
210
|
-
config.sign_out_via = :delete
|
211
|
-
|
212
|
-
# ==> OmniAuth
|
213
|
-
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
214
|
-
# up on your models and hooks.
|
215
|
-
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
|
216
|
-
|
217
|
-
# ==> Warden configuration
|
218
|
-
# If you want to use other strategies, that are not supported by Devise, or
|
219
|
-
# change the failure app, you can configure them inside the config.warden block.
|
220
|
-
#
|
221
|
-
# config.warden do |manager|
|
222
|
-
# manager.intercept_401 = false
|
223
|
-
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
224
|
-
# end
|
225
|
-
|
226
|
-
# Please do not change the router_name away from :refinery
|
227
|
-
# otherwise Refinery may not function properly. Thanks!
|
228
|
-
config.router_name = :refinery
|
229
|
-
end
|