decko 0.11.7 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/card_controller.rb +4 -0
- data/lib/card_controller/errors.rb +11 -13
- data/lib/decko.rb +2 -15
- data/lib/decko/all.rb +2 -0
- data/lib/decko/application.rb +22 -56
- data/lib/decko/cli.rb +1 -7
- data/lib/decko/commands.rb +17 -110
- data/lib/decko/commands/application.rb +2 -2
- data/lib/decko/commands/cucumber_command.rb +8 -7
- data/lib/decko/commands/cucumber_command/parser.rb +2 -2
- data/lib/decko/engine.rb +3 -14
- data/lib/decko/generators.rb +17 -0
- data/lib/decko/mods_spec_helper.rb +1 -1
- data/lib/decko/script_decko_loader.rb +5 -38
- data/lib/decko/tasks/cucumber.rake +25 -16
- data/lib/decko/tasks/decko.rake +1 -2
- data/lib/decko/tasks/decko/seed.rake +5 -3
- data/lib/generators/deck/deck_generator.rb +12 -0
- metadata +23 -65
- data/lib/decko/commands/command.rb +0 -28
- data/lib/decko/commands/rake_command.rb +0 -42
- data/lib/decko/commands/rake_command/parser.rb +0 -35
- data/lib/decko/commands/rspec_command.rb +0 -36
- data/lib/decko/commands/rspec_command/parser.rb +0 -97
- data/lib/decko/config/environments/cucumber.rb +0 -41
- data/lib/decko/config/environments/cypress.rb +0 -100
- data/lib/decko/config/environments/development.rb +0 -95
- data/lib/decko/config/environments/production.rb +0 -75
- data/lib/decko/config/environments/profile.rb +0 -33
- data/lib/decko/config/environments/test.rb +0 -69
- data/lib/decko/config/initializers/secret_token.rb +0 -15
- data/lib/decko/config/initializers/sedate_parser.rb +0 -8
- data/lib/decko/config/initializers/session_store.rb +0 -2
- data/lib/decko/generators/deck/USAGE +0 -9
- data/lib/decko/generators/deck/deck_generator.rb +0 -134
- data/lib/decko/generators/deck/deck_generator/deck_helper.rb +0 -110
- data/lib/decko/generators/deck/deck_generator/interactive.rb +0 -120
- data/lib/decko/generators/deck/deck_generator/rails_overrides.rb +0 -54
- data/lib/decko/generators/deck/templates/Gemfile.erb +0 -56
- data/lib/decko/generators/deck/templates/Rakefile.erb +0 -6
- data/lib/decko/generators/deck/templates/bin/spring.erb +0 -20
- data/lib/decko/generators/deck/templates/config.ru.erb +0 -11
- data/lib/decko/generators/deck/templates/config/application.rb.erb +0 -107
- data/lib/decko/generators/deck/templates/config/boot.rb.erb +0 -11
- data/lib/decko/generators/deck/templates/config/cucumber.yml +0 -1
- data/lib/decko/generators/deck/templates/config/databases/frontbase.yml +0 -34
- data/lib/decko/generators/deck/templates/config/databases/ibm_db.yml +0 -89
- data/lib/decko/generators/deck/templates/config/databases/jdbc.yml +0 -65
- data/lib/decko/generators/deck/templates/config/databases/jdbcmysql.yml +0 -36
- data/lib/decko/generators/deck/templates/config/databases/jdbcpostgresql.yml +0 -46
- data/lib/decko/generators/deck/templates/config/databases/jdbcsqlite3.yml +0 -23
- data/lib/decko/generators/deck/templates/config/databases/mysql.yml +0 -37
- data/lib/decko/generators/deck/templates/config/databases/oracle.yml +0 -42
- data/lib/decko/generators/deck/templates/config/databases/postgresql.yml +0 -39
- data/lib/decko/generators/deck/templates/config/databases/sqlite3.yml +0 -21
- data/lib/decko/generators/deck/templates/config/deck.yml +0 -10
- data/lib/decko/generators/deck/templates/config/environment.rb.erb +0 -5
- data/lib/decko/generators/deck/templates/config/initializers/cypress.rb +0 -12
- data/lib/decko/generators/deck/templates/config/puma.rb +0 -16
- data/lib/decko/generators/deck/templates/config/routes.rb.erb +0 -11
- data/lib/decko/generators/deck/templates/config/storage.yml +0 -0
- data/lib/decko/generators/deck/templates/gitignore +0 -18
- data/lib/decko/generators/deck/templates/pryrc +0 -6
- data/lib/decko/generators/deck/templates/public/files/htaccess +0 -9
- data/lib/decko/generators/deck/templates/public/robots.txt +0 -13
- data/lib/decko/generators/deck/templates/rspec.erb +0 -6
- data/lib/decko/generators/deck/templates/script/decko +0 -6
- data/lib/decko/generators/deck/templates/script/decko_cucumber +0 -8
- data/lib/decko/generators/deck/templates/script/decko_rspec +0 -8
- data/lib/decko/generators/deck/templates/script/delayed_job +0 -5
- data/lib/decko/generators/deck/templates/simplecov.rb.erb +0 -34
- data/lib/decko/generators/deck/templates/spec/javascripts/support/deck_jasmine.yml.erb +0 -56
- data/lib/decko/generators/deck/templates/spec/javascripts/support/decko_jasmine.yml.erb +0 -74
- data/lib/decko/generators/deck/templates/spec/spec_helper.rb +0 -1
- data/script/autospec +0 -4
- data/script/decko +0 -6
- data/script/rails +0 -6
@@ -1,35 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
require "optparse"
|
4
|
-
|
5
|
-
module Decko
|
6
|
-
module Commands
|
7
|
-
class RakeCommand
|
8
|
-
class Parser < OptionParser
|
9
|
-
def initialize command, opts
|
10
|
-
super() do |parser|
|
11
|
-
parser.banner = "Usage: decko #{command} [options]\n\n" \
|
12
|
-
"Run decko:#{command} task on the production "\
|
13
|
-
" database specified in config/database.yml\n\n"
|
14
|
-
parser.on("--production", "-p",
|
15
|
-
"#{command} production database (default)") do
|
16
|
-
opts[:envs] = ["production"]
|
17
|
-
end
|
18
|
-
parser.on("--test", "-t",
|
19
|
-
"#{command} test database") do
|
20
|
-
opts[:envs] = ["test"]
|
21
|
-
end
|
22
|
-
parser.on("--development", "-d",
|
23
|
-
"#{command} development database") do
|
24
|
-
opts[:envs] = ["development"]
|
25
|
-
end
|
26
|
-
parser.on("--all", "-a",
|
27
|
-
"#{command} production, test, and development database") do
|
28
|
-
opts[:envs] = %w[production development test]
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
require File.expand_path("command", __dir__)
|
2
|
-
|
3
|
-
module Decko
|
4
|
-
module Commands
|
5
|
-
class RspecCommand < Command
|
6
|
-
def initialize args
|
7
|
-
require "rspec/core"
|
8
|
-
require "decko/application"
|
9
|
-
|
10
|
-
@decko_args, @rspec_args = split_args args
|
11
|
-
@opts = {}
|
12
|
-
Parser.new(@opts).parse!(@decko_args)
|
13
|
-
end
|
14
|
-
|
15
|
-
def command
|
16
|
-
"#{env_args} #{@opts[:executer]} #{@opts[:rescue]}" \
|
17
|
-
"rspec #{@rspec_args.shelljoin} #{@opts[:files]}"
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def env_args
|
23
|
-
["RAILS_ROOT=.", coverage].compact.join " "
|
24
|
-
end
|
25
|
-
|
26
|
-
def coverage
|
27
|
-
# no coverage if rspec was started with file argument
|
28
|
-
return unless @opts[:files] || @rspec_args.present?
|
29
|
-
|
30
|
-
"COVERAGE=false"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
require File.expand_path("rspec_command/parser", __dir__)
|
@@ -1,97 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
require "optparse"
|
4
|
-
|
5
|
-
module Decko
|
6
|
-
module Commands
|
7
|
-
class RspecCommand
|
8
|
-
class Parser < OptionParser
|
9
|
-
RSPEC_PATH_MESSAGE = <<-EOT
|
10
|
-
|
11
|
-
DECKO ARGS
|
12
|
-
|
13
|
-
You don't have to give a full path for FILENAME; the basename is enough.
|
14
|
-
If FILENAME does not include '_spec', then rspec searches for the
|
15
|
-
corresponding spec file.
|
16
|
-
The line number always refers to the example in the spec file.
|
17
|
-
|
18
|
-
EOT
|
19
|
-
|
20
|
-
def initialize opts
|
21
|
-
super() do |parser|
|
22
|
-
parser.banner = "Usage: decko rspec [DECKO ARGS] -- [RSPEC ARGS]\n\n" \
|
23
|
-
"RSPEC ARGS"
|
24
|
-
parser.separator RSPEC_PATH_MESSAGE
|
25
|
-
|
26
|
-
parser.on("-d", "--spec FILENAME(:LINE)",
|
27
|
-
"Run spec for a Decko deck file") do |file|
|
28
|
-
opts[:files] = find_spec_file(file, "#{Decko.root}/mod")
|
29
|
-
end
|
30
|
-
parser.on("-c", "--core-spec FILENAME(:LINE)",
|
31
|
-
"Run spec for a Decko core file") do |file|
|
32
|
-
opts[:files] = find_spec_file(file, Cardio.gem_root)
|
33
|
-
end
|
34
|
-
parser.on("-m", "--mod MODNAME",
|
35
|
-
"Run all specs for a mod or matching a mod") do |file|
|
36
|
-
opts[:files] = find_mod_file(file, Cardio.gem_root)
|
37
|
-
end
|
38
|
-
parser.on("-s", "--[no-]simplecov", "Run with simplecov") do |s|
|
39
|
-
opts[:simplecov] = s ? "TMPSETS=true" : ""
|
40
|
-
end
|
41
|
-
parser.on("--rescue", "Run with pry-rescue") do
|
42
|
-
process_rescue_opts opts
|
43
|
-
end
|
44
|
-
parser.on("--[no-]spring", "Run with spring") do |spring|
|
45
|
-
process_spring_opts spring, opts
|
46
|
-
end
|
47
|
-
parser.separator "\n"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def process_rescue_opts opts
|
54
|
-
if opts[:executer] == "spring"
|
55
|
-
puts "Disabled pry-rescue. Not compatible with spring."
|
56
|
-
else
|
57
|
-
opts[:rescue] = "rescue "
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def process_spring_opts spring, opts
|
62
|
-
if spring
|
63
|
-
opts[:executer] = "spring"
|
64
|
-
if opts[:rescue]
|
65
|
-
opts[:rescue] = ""
|
66
|
-
puts "Disabled pry-rescue. Not compatible with spring."
|
67
|
-
end
|
68
|
-
else
|
69
|
-
opts[:executer] = "bundle exec"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
def find_mod_file filename, base_dir
|
74
|
-
if File.exist?("mod/#{filename}") || File.exist?("#{base_dir}/mod/#{filename}")
|
75
|
-
"#{base_dir}/mod/#{filename}"
|
76
|
-
elsif (files = find_spec_file(filename, "mod"))&.present?
|
77
|
-
files
|
78
|
-
else
|
79
|
-
find_spec_file(file, "#{base_dir}/mod")
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
def find_spec_file filename, base_dir
|
84
|
-
file, line = filename.split(":")
|
85
|
-
if file.include?("_spec.rb") && File.exist?(file)
|
86
|
-
filename
|
87
|
-
else
|
88
|
-
file = File.basename(file, ".rb").sub(/_spec$/, "")
|
89
|
-
Dir.glob("#{base_dir}/**/#{file}_spec.rb").flatten.map do |spec_file|
|
90
|
-
line ? "#{spec_file}:#{line}" : file
|
91
|
-
end.join(" ")
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
Decko.application.class.configure do
|
4
|
-
# Edit at your own peril - it's recommended to regenerate this file
|
5
|
-
# in the future when you upgrade to a newer version of Cucumber.
|
6
|
-
|
7
|
-
config.eager_load = false
|
8
|
-
|
9
|
-
config.machine_refresh = :never
|
10
|
-
|
11
|
-
# IMPORTANT: Setting config.cache_classes to false is known to
|
12
|
-
# break Cucumber's use_transactional_fixtures method.
|
13
|
-
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165
|
14
|
-
config.cache_classes = true
|
15
|
-
|
16
|
-
config.prepopulate_cache = true
|
17
|
-
|
18
|
-
# Log error messages when you accidentally call methods on nil.
|
19
|
-
config.whiny_nils = true
|
20
|
-
|
21
|
-
# Show full error reports and disable caching
|
22
|
-
config.consider_all_requests_local = true
|
23
|
-
config.action_controller.perform_caching = true
|
24
|
-
|
25
|
-
# Disable request forgery protection in test environment
|
26
|
-
config.action_controller.allow_forgery_protection = false
|
27
|
-
|
28
|
-
config.active_support.deprecation = :log
|
29
|
-
|
30
|
-
config.log_level = :debug
|
31
|
-
|
32
|
-
# Tell Action Mailer not to deliver emails to the real world.
|
33
|
-
# The :test delivery method accumulates sent emails in the
|
34
|
-
# ActionMailer::Base.deliveries array.
|
35
|
-
config.action_mailer.delivery_method = :test
|
36
|
-
|
37
|
-
config.use_transactional_fixtures = false
|
38
|
-
|
39
|
-
config.rescue_all_in_controller = false
|
40
|
-
config.raise_all_rendering_errors = true
|
41
|
-
end
|
@@ -1,100 +0,0 @@
|
|
1
|
-
Decko::Engine.configure do
|
2
|
-
config.cache_classes = false
|
3
|
-
end
|
4
|
-
|
5
|
-
# -*- encoding : utf-8 -*-
|
6
|
-
|
7
|
-
Decko.application.class.configure do
|
8
|
-
# Settings specified here will take precedence over those in config/application.rb
|
9
|
-
|
10
|
-
config.view_cache = false
|
11
|
-
|
12
|
-
config.eager_load = false
|
13
|
-
|
14
|
-
config.machine_refresh = :eager
|
15
|
-
config.compress_javascript = false
|
16
|
-
|
17
|
-
# In the development environment your application's code is reloaded on
|
18
|
-
# every request. This slows down response time but is perfect for development
|
19
|
-
# since you don't have to restart the web server when you make code changes.
|
20
|
-
config.cache_classes = false
|
21
|
-
config.reload_classes_only_on_change = false
|
22
|
-
|
23
|
-
# if defined?(RailsDevTweaks)
|
24
|
-
# config.dev_tweaks.autoload_rules do
|
25
|
-
# skip "/files"
|
26
|
-
# skip "/favicon.ico"
|
27
|
-
# skip /view\=status/
|
28
|
-
# end
|
29
|
-
# end
|
30
|
-
|
31
|
-
# Log error messages when you accidentally call methods on nil.
|
32
|
-
config.whiny_nils = true
|
33
|
-
|
34
|
-
# Show full error reports and disable caching
|
35
|
-
config.consider_all_requests_local = true
|
36
|
-
config.action_controller.perform_caching = false
|
37
|
-
|
38
|
-
# Don't care if the mailer can't send
|
39
|
-
config.action_mailer.raise_delivery_errors = false
|
40
|
-
|
41
|
-
# Print deprecation notices to the Rails logger
|
42
|
-
config.active_support.deprecation = :log
|
43
|
-
|
44
|
-
# See everything in the log (default is :info)
|
45
|
-
config.log_level = :debug
|
46
|
-
|
47
|
-
# if false, most rendering errors will be rescued and made visible only
|
48
|
-
# in the nest where the error occurred
|
49
|
-
config.raise_all_rendering_errors = true
|
50
|
-
|
51
|
-
# if false, application will raise errors that make it to controller.
|
52
|
-
config.rescue_all_in_controller = false
|
53
|
-
|
54
|
-
# config.performance_logger = {
|
55
|
-
# methods: [:event, :search, :fetch, :view], # choose methods to log
|
56
|
-
# min_time: 100, # show only method calls that are slower than 100ms
|
57
|
-
# max_depth: 3, # show nested method calls only up to depth 3
|
58
|
-
# details: true # show method arguments and sql
|
59
|
-
# log_level: :info
|
60
|
-
# }
|
61
|
-
|
62
|
-
# Only use best-standards-support built into browsers
|
63
|
-
config.action_dispatch.best_standards_support = :builtin
|
64
|
-
|
65
|
-
# Do not compress assets
|
66
|
-
# config.assets.compress = false
|
67
|
-
#
|
68
|
-
# # Expands the lines which load the assets
|
69
|
-
# config.assets.debug = false
|
70
|
-
#
|
71
|
-
# # This needs to be on for tinymce to work, because several important files (themes, etc) are only served statically
|
72
|
-
# config.serve_static_files = ENV['STATIC_ASSETS'] || true
|
73
|
-
#
|
74
|
-
# # Setting a bogus directory so rails won't find public/assets in dev mode.
|
75
|
-
# # Normally you could skip that by not serving static assets, but that breaks tinymce (see above)
|
76
|
-
# config.assets.prefix = "dynamic-assets"
|
77
|
-
|
78
|
-
# Log the query plan for queries taking more than this (works
|
79
|
-
# with SQLite, MySQL, and PostgreSQL)
|
80
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
81
|
-
|
82
|
-
# if File.exists?(File.join(Rails.root,'tmp', 'debug.txt'))
|
83
|
-
# require 'ruby-debug'
|
84
|
-
# Debugger.wait_connection = true
|
85
|
-
# Debugger.start_remote
|
86
|
-
# File.delete(File.join(Rails.root,'tmp', 'debug.txt'))
|
87
|
-
# end
|
88
|
-
|
89
|
-
config.action_mailer.perform_deliveries = false
|
90
|
-
|
91
|
-
# Use Pry instead of IRB
|
92
|
-
silence_warnings do
|
93
|
-
require "pry"
|
94
|
-
config.console = Pry
|
95
|
-
rescue LoadError
|
96
|
-
end
|
97
|
-
# config.session_store :cookie_store
|
98
|
-
end
|
99
|
-
|
100
|
-
# Paperclip.options[:command_path] = "/opt/local/bin"
|
@@ -1,95 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
Decko::Engine.configure do
|
4
|
-
config.cache_classes = false
|
5
|
-
end
|
6
|
-
|
7
|
-
Decko.application.class.configure do
|
8
|
-
# Settings specified here will take precedence over those in config/application.rb
|
9
|
-
|
10
|
-
config.view_cache = false
|
11
|
-
|
12
|
-
config.eager_load = false
|
13
|
-
|
14
|
-
config.machine_refresh = :eager
|
15
|
-
config.compress_javascript = false
|
16
|
-
|
17
|
-
# In the development environment your application's code is reloaded on
|
18
|
-
# every request. This slows down response time but is perfect for development
|
19
|
-
# since you don't have to restart the web server when you make code changes.
|
20
|
-
config.cache_classes = false
|
21
|
-
config.reload_classes_only_on_change = true
|
22
|
-
|
23
|
-
# Log error messages when you accidentally call methods on nil.
|
24
|
-
config.whiny_nils = true
|
25
|
-
|
26
|
-
# Show full error reports and disable caching
|
27
|
-
config.consider_all_requests_local = true
|
28
|
-
config.action_controller.perform_caching = false
|
29
|
-
|
30
|
-
# Don't care if the mailer can't send
|
31
|
-
config.action_mailer.raise_delivery_errors = false
|
32
|
-
|
33
|
-
# Print deprecation notices to the Rails logger
|
34
|
-
config.active_support.deprecation = :log
|
35
|
-
|
36
|
-
# See everything in the log (default is :info)
|
37
|
-
config.log_level = :debug
|
38
|
-
|
39
|
-
# if false, most rendering errors will be rescued and made visible only
|
40
|
-
# in the nest where the error occurred
|
41
|
-
config.raise_all_rendering_errors = true
|
42
|
-
|
43
|
-
# if false, application will raise errors that make it to controller.
|
44
|
-
config.rescue_all_in_controller = false
|
45
|
-
|
46
|
-
# config.performance_logger = {
|
47
|
-
# methods: [:event, :search, :fetch, :view], # choose methods to log
|
48
|
-
# min_time: 100, # show only method calls that are slower than 100ms
|
49
|
-
# max_depth: 3, # show nested method calls only up to depth 3
|
50
|
-
# details: true # show method arguments and sql
|
51
|
-
# log_level: :info
|
52
|
-
# }
|
53
|
-
|
54
|
-
# Only use best-standards-support built into browsers
|
55
|
-
config.action_dispatch.best_standards_support = :builtin
|
56
|
-
|
57
|
-
# Do not compress assets
|
58
|
-
# config.assets.compress = false
|
59
|
-
#
|
60
|
-
# # Expands the lines which load the assets
|
61
|
-
# config.assets.debug = false
|
62
|
-
#
|
63
|
-
# # This needs to be on for tinymce to work, because several important files
|
64
|
-
# (themes, etc) are only served statically
|
65
|
-
# config.serve_static_files = ENV['STATIC_ASSETS'] || true
|
66
|
-
#
|
67
|
-
# # Setting a bogus directory so rails won't find public/assets in dev mode.
|
68
|
-
# # Normally you could skip that by not serving static assets, but that breaks
|
69
|
-
# tinymce (see above)
|
70
|
-
# config.assets.prefix = "dynamic-assets"
|
71
|
-
|
72
|
-
# Log the query plan for queries taking more than this (works
|
73
|
-
# with SQLite, MySQL, and PostgreSQL)
|
74
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
75
|
-
|
76
|
-
# if File.exists?(File.join(Rails.root,'tmp', 'debug.txt'))
|
77
|
-
# require 'ruby-debug'
|
78
|
-
# Debugger.wait_connection = true
|
79
|
-
# Debugger.start_remote
|
80
|
-
# File.delete(File.join(Rails.root,'tmp', 'debug.txt'))
|
81
|
-
# end
|
82
|
-
|
83
|
-
config.action_mailer.perform_deliveries = false
|
84
|
-
|
85
|
-
# Use Pry instead of IRB
|
86
|
-
silence_warnings do
|
87
|
-
require "pry"
|
88
|
-
config.console = Pry
|
89
|
-
rescue LoadError
|
90
|
-
end
|
91
|
-
|
92
|
-
# config.session_store :cookie_store
|
93
|
-
end
|
94
|
-
|
95
|
-
# Paperclip.options[:command_path] = "/opt/local/bin"
|
@@ -1,75 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
|
3
|
-
Decko.application.class.configure do
|
4
|
-
# Settings specified here will take precedence over those in config/application.rb
|
5
|
-
|
6
|
-
config.eager_load = true
|
7
|
-
|
8
|
-
# temporary fix for formerly autoloaded files that stopped autoloading in Rails 5
|
9
|
-
# TODO: configure eager_load_paths explicitly (and remove this)
|
10
|
-
config.enable_dependency_loading = true
|
11
|
-
|
12
|
-
# Code is not reloaded between requests
|
13
|
-
config.cache_classes = true
|
14
|
-
|
15
|
-
# Full error reports are disabled and caching is turned on
|
16
|
-
config.consider_all_requests_local = false
|
17
|
-
config.action_controller.perform_caching = true
|
18
|
-
|
19
|
-
# Disable Rails's static asset server (Apache or nginx will already do this)
|
20
|
-
config.serve_static_files = defined?(Rails::Server)
|
21
|
-
|
22
|
-
# Compress JavaScripts and CSS
|
23
|
-
config.assets.compress = true
|
24
|
-
|
25
|
-
# Don't fallback to assets pipeline if a precompiled asset is missed
|
26
|
-
config.assets.compile = false
|
27
|
-
|
28
|
-
# Generate digests for assets URLs
|
29
|
-
config.assets.digest = true
|
30
|
-
|
31
|
-
# Defaults to Rails.root.join("public/assets")
|
32
|
-
# config.assets.manifest = File.join(Decko.gem_root, "public/assets")
|
33
|
-
|
34
|
-
# Specifies the header that your server uses for sending files
|
35
|
-
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
36
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
37
|
-
|
38
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
39
|
-
# config.force_ssl = true
|
40
|
-
|
41
|
-
# See everything in the log (default is :info)
|
42
|
-
config.log_level = :info
|
43
|
-
|
44
|
-
# Use a different logger for distributed setups
|
45
|
-
# config.logger = SyslogLogger.new
|
46
|
-
|
47
|
-
# Use a different cache store in production
|
48
|
-
# config.cache_store = :mem_cache_store
|
49
|
-
|
50
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
51
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
52
|
-
|
53
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
54
|
-
config.assets.precompile += %w[application-all.css application-print.css barebones.css
|
55
|
-
html5shiv-printshiv.js]
|
56
|
-
|
57
|
-
# Disable delivery errors, bad email addresses will be ignored
|
58
|
-
# config.action_mailer.raise_delivery_errors = false
|
59
|
-
|
60
|
-
# Enable threaded mode
|
61
|
-
# config.threadsafe!
|
62
|
-
|
63
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
64
|
-
# the I18n.default_locale when a translation can not be found)
|
65
|
-
config.i18n.fallbacks = true
|
66
|
-
|
67
|
-
# Send deprecation notices to registered listeners
|
68
|
-
config.active_support.deprecation = :notify
|
69
|
-
|
70
|
-
# cache the list of set module objects on card objects
|
71
|
-
config.cache_set_module_list = true
|
72
|
-
|
73
|
-
# if false, application will raise errors that make it to controller.
|
74
|
-
config.rescue_all_in_controller = true
|
75
|
-
end
|