dump 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/.travis.yml +9 -6
- data/Gemfile +5 -1
- data/LICENSE.txt +1 -1
- data/README.markdown +7 -5
- data/dump.gemspec +2 -2
- data/lib/dump_rake/dump_reader.rb +2 -0
- data/spec/.tmignore +1 -0
- data/spec/cycle_spec.rb +22 -16
- data/spec/dummy-4.1/.gitignore +16 -0
- data/spec/dummy-4.1/config.ru +4 -0
- data/spec/dummy-4.1/config/application.rb +30 -0
- data/spec/dummy-4.1/config/boot.rb +4 -0
- data/spec/dummy-4.1/config/database.yml +25 -0
- data/spec/dummy-4.1/config/environment.rb +5 -0
- data/spec/dummy-4.1/config/environments/development.rb +28 -0
- data/spec/dummy-4.1/config/environments/production.rb +67 -0
- data/spec/dummy-4.1/config/environments/test.rb +39 -0
- data/spec/dummy-4.1/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy-4.1/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy-4.1/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy-4.1/config/initializers/inflections.rb +16 -0
- data/spec/dummy-4.1/config/initializers/mime_types.rb +4 -0
- data/spec/dummy-4.1/config/initializers/session_store.rb +3 -0
- data/spec/dummy-4.1/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy-4.1/config/locales/en.yml +23 -0
- data/spec/dummy-4.1/config/routes.rb +56 -0
- data/spec/dummy-4.1/config/secrets.yml +22 -0
- data/spec/dummy-4.1/db/seeds.rb +7 -0
- data/spec/dummy-4.1/log/.keep +0 -0
- data/spec/lib/dump_rake/dump_reader_spec.rb +223 -181
- data/spec/lib/dump_rake/dump_spec.rb +78 -78
- data/spec/lib/dump_rake/dump_writer_spec.rb +110 -110
- data/spec/lib/dump_rake/env/filter_spec.rb +24 -24
- data/spec/lib/dump_rake/env_spec.rb +33 -33
- data/spec/lib/dump_rake/rails_root_spec.rb +6 -6
- data/spec/lib/dump_rake/table_manipulation_spec.rb +60 -60
- data/spec/lib/dump_rake_spec.rb +93 -93
- data/spec/recipes/dump_spec.rb +128 -128
- data/spec/tasks/assets_spec.rb +18 -18
- data/spec/tasks/dump_spec.rb +9 -9
- metadata +49 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGMzMDVmMTc4YzIyN2IyMjBhMTlhODM1NjdlMzIxMjYzNTc5M2EwNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
ZmEwODViYTNjMzcxOWM3N2E1YzY2NmQ5MDQ1YTJjM2RlMzFkZWZhZA==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDZhMGNjY2JjODcwOGI1ZmFjMjJiYWIyYWJmMjkwYzVmZDE3NDU3N2ZhZDBi
|
10
|
+
NTE1OWJmM2VjNjYxNDNiYTBmZTIxMzk1ZGU4MjMwNDkxMTJlM2YwNDcxNTE5
|
11
|
+
YzI1YjY3ZWM3ZjY5M2Q3OTg3NjIzNWQ3YjAxOTg0ZTA4MDRkMDk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzc5NzZkYjk3MzlmMWNmYjk0NTYwMTM2ZTEyMWZlMWYzOWJhYTQxYjY5Yzlm
|
14
|
+
OGJkZDRjOTAwOTBkMWM5ZWM2NzdkYjgwY2I2NWQ0NGM0OTUyNzU3ZmIzYTYx
|
15
|
+
ZjYwNWNkMTVkZTg3ODhlZTg0ZjVlZjRlMmM0YjZmYWM0NzZmNjc=
|
data/.travis.yml
CHANGED
@@ -2,29 +2,32 @@ language: ruby
|
|
2
2
|
rvm:
|
3
3
|
- 1.8.7
|
4
4
|
- 1.9.3
|
5
|
-
- 2.0
|
5
|
+
- '2.0'
|
6
|
+
- '2.1'
|
6
7
|
- jruby-19mode
|
7
|
-
- rbx-19mode
|
8
|
-
- ree
|
9
8
|
env:
|
10
9
|
- RAILS_VERSION='~> 2.3.0'
|
11
10
|
# - RAILS_VERSION='~> 3.0.0' # conflicting adapters for postgresql and mysql2
|
12
11
|
- RAILS_VERSION='~> 3.1.0'
|
13
12
|
- RAILS_VERSION='~> 3.2.0'
|
14
13
|
- RAILS_VERSION='~> 4.0.0'
|
14
|
+
- RAILS_VERSION='~> 4.1.0'
|
15
15
|
script: "bundle exec rspec"
|
16
16
|
before_install:
|
17
|
+
- sudo /etc/init.d/postgresql stop
|
18
|
+
- sudo /etc/init.d/postgresql start
|
17
19
|
- mysql -e 'create database myapp_test;'
|
18
20
|
- psql -c 'create database myapp_test;' -U postgres
|
19
21
|
- cp .travis.database.yml spec/db/database.yml
|
20
22
|
matrix:
|
21
23
|
allow_failures:
|
22
24
|
- rvm: jruby-19mode
|
23
|
-
- rvm: rbx-19mode
|
24
25
|
exclude:
|
25
26
|
- rvm: 1.8.7 # not supported by rails 4
|
26
27
|
env: RAILS_VERSION='~> 4.0.0'
|
27
|
-
- rvm:
|
28
|
-
env: RAILS_VERSION='~> 4.
|
28
|
+
- rvm: 1.8.7 # not supported by rails 4
|
29
|
+
env: RAILS_VERSION='~> 4.1.0'
|
29
30
|
- rvm: 2.0.0 # problems with iconv
|
30
31
|
env: RAILS_VERSION='~> 2.3.0'
|
32
|
+
- rvm: 2.1.0
|
33
|
+
env: RAILS_VERSION='~> 2.3.0'
|
data/Gemfile
CHANGED
@@ -14,7 +14,11 @@ else
|
|
14
14
|
if rails_version =~ /(^|[^.\d])(2|3\.0)\.\d+/
|
15
15
|
gem 'activerecord-mysql2-adapter'
|
16
16
|
end
|
17
|
+
if rails_version =~ /(^|[^.\d])2\.\d+/ && RUBY_VERSION >= '2.0'
|
18
|
+
gem 'iconv', '~> 1.0.4'
|
19
|
+
end
|
17
20
|
end
|
18
21
|
|
19
|
-
gem 'capistrano'
|
22
|
+
gem 'capistrano', '~> 2.0'
|
23
|
+
|
20
24
|
gemspec
|
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
+
[![Gem Version](https://img.shields.io/gem/v/dump.svg?style=flat)](https://rubygems.org/gems/dump)
|
2
|
+
[![Build Status](https://img.shields.io/travis/toy/dump/master.svg?style=flat)](https://travis-ci.org/toy/dump)
|
3
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/toy/dump.svg?style=flat)](https://codeclimate.com/github/toy/dump)
|
4
|
+
|
1
5
|
# DumpRake
|
2
6
|
|
3
7
|
Rails app rake and capistrano tasks to create and restore dumps of database and assets.
|
4
8
|
|
5
|
-
Tested against rails 2.3, 3.0, 3.1, 3.2
|
6
|
-
|
7
|
-
Works with ruby 1.8.7, ree, 1.9, 2.0 (rails 4.0 requires at least ruby 1.9).
|
9
|
+
Tested against rails 2.3, 3.0, 3.1, 3.2, 4.0, 4.1 (rails 2.3 has problems on ruby 2.0 and 2.1).
|
8
10
|
|
9
|
-
|
11
|
+
Works with ruby 1.8.7, ree, 1.9, 2.0, 2.1 (rails 4.0 requires at least ruby 1.9).
|
10
12
|
|
11
13
|
## Install
|
12
14
|
|
@@ -249,4 +251,4 @@ restore backup (upload dump and restore on remote):
|
|
249
251
|
|
250
252
|
## Copyright
|
251
253
|
|
252
|
-
Copyright (c) 2008-
|
254
|
+
Copyright (c) 2008-2014 Ivan Kuchin. See LICENSE.txt for details.
|
data/dump.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'dump'
|
5
|
-
s.version = '1.0.
|
5
|
+
s.version = '1.0.4'
|
6
6
|
s.summary = %q{Rails app rake and capistrano tasks to create and restore dumps of database and assets}
|
7
7
|
s.homepage = "http://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
s.add_dependency 'archive-tar-minitar', '= 0.5.2'
|
19
19
|
s.add_dependency 'progress', '~> 2.4.0'
|
20
|
-
s.add_development_dependency 'rspec'
|
20
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
21
21
|
end
|
@@ -169,6 +169,7 @@ class DumpRake
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def read_tables
|
172
|
+
return if DumpRake::Env[:restore_tables] && DumpRake::Env[:restore_tables].empty?
|
172
173
|
verify_connection
|
173
174
|
config[:tables].with_progress('Tables') do |table, rows|
|
174
175
|
if (restore_schema? && schema_tables.include?(table)) || DumpRake::Env.filter(:restore_tables).pass?(table)
|
@@ -207,6 +208,7 @@ class DumpRake
|
|
207
208
|
end
|
208
209
|
|
209
210
|
def read_assets
|
211
|
+
return if DumpRake::Env[:restore_assets] && DumpRake::Env[:restore_assets].empty?
|
210
212
|
unless config[:assets].blank?
|
211
213
|
assets = config[:assets]
|
212
214
|
if Hash === assets
|
data/spec/.tmignore
CHANGED
data/spec/cycle_spec.rb
CHANGED
@@ -2,6 +2,8 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|
2
2
|
|
3
3
|
require File.dirname(__FILE__) + '/../lib/dump_rake'
|
4
4
|
|
5
|
+
require 'tmpdir'
|
6
|
+
|
5
7
|
def database_configs
|
6
8
|
YAML::load(IO.read(PLUGIN_SPEC_DIR + "/db/database.yml"))
|
7
9
|
end
|
@@ -51,13 +53,12 @@ end
|
|
51
53
|
|
52
54
|
def in_temp_rails_app
|
53
55
|
old_rails_root = DumpRake::RailsRoot.dup
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
Dir.mktmpdir do |dir|
|
57
|
+
DumpRake::RailsRoot.replace(dir)
|
58
|
+
allow(Progress).to receive(:io).and_return(StringIO.new)
|
59
|
+
yield
|
60
|
+
end
|
59
61
|
ensure
|
60
|
-
FileUtils.remove_entry(DumpRake::RailsRoot) if File.exist?(DumpRake::RailsRoot)
|
61
62
|
DumpRake::RailsRoot.replace(old_rails_root)
|
62
63
|
end
|
63
64
|
|
@@ -152,18 +153,18 @@ describe 'full cycle' do
|
|
152
153
|
|
153
154
|
#clear database
|
154
155
|
load_schema
|
155
|
-
Chicken.all.
|
156
|
+
expect(Chicken.all).to eq([])
|
156
157
|
|
157
158
|
#restore dump and verify equality
|
158
159
|
call_rake_restore(:version => 'chickens')
|
159
|
-
chicken_data.
|
160
|
+
expect(chicken_data).to eq(saved_chicken_data)
|
160
161
|
|
161
162
|
# go throught create/restore cycle and verify equality
|
162
163
|
call_rake_create
|
163
164
|
load_schema
|
164
|
-
Chicken.all.
|
165
|
+
expect(Chicken.all).to be_empty
|
165
166
|
call_rake_restore
|
166
|
-
chicken_data.
|
167
|
+
expect(chicken_data).to eq(saved_chicken_data)
|
167
168
|
end
|
168
169
|
end
|
169
170
|
end
|
@@ -188,7 +189,7 @@ describe 'full cycle' do
|
|
188
189
|
in_temp_rails_app do
|
189
190
|
saved_chicken_data = nil
|
190
191
|
use_adapter(adapter_src) do
|
191
|
-
Chicken.all.
|
192
|
+
expect(Chicken.all).to be_empty
|
192
193
|
|
193
194
|
create_chickens!(:random => 100)
|
194
195
|
saved_chicken_data = chicken_data
|
@@ -196,10 +197,10 @@ describe 'full cycle' do
|
|
196
197
|
end
|
197
198
|
|
198
199
|
use_adapter(adapter_dst) do
|
199
|
-
Chicken.all.
|
200
|
+
expect(Chicken.all).to be_empty
|
200
201
|
|
201
202
|
call_rake_restore
|
202
|
-
chicken_data.
|
203
|
+
expect(chicken_data).to eq(saved_chicken_data)
|
203
204
|
end
|
204
205
|
end
|
205
206
|
end
|
@@ -217,7 +218,12 @@ describe 'full cycle' do
|
|
217
218
|
Zlib::GzipReader.open(dump_path) do |gzip|
|
218
219
|
Archive::Tar::Minitar.open(gzip, 'r') do |stream|
|
219
220
|
stream.each do |entry|
|
220
|
-
|
221
|
+
entry_data = if entry.full_name == 'schema.rb'
|
222
|
+
entry.read
|
223
|
+
else
|
224
|
+
Marshal.load(entry.read)
|
225
|
+
end
|
226
|
+
data << [entry.full_name, entry_data]
|
221
227
|
end
|
222
228
|
end
|
223
229
|
end
|
@@ -226,8 +232,8 @@ describe 'full cycle' do
|
|
226
232
|
end
|
227
233
|
|
228
234
|
dumps.combination(2) do |dump_a, dump_b|
|
229
|
-
dump_a[:path].
|
230
|
-
dump_a[:data].
|
235
|
+
expect(dump_a[:path]).not_to eq(dump_b[:path])
|
236
|
+
expect(dump_a[:data]).to eq(dump_b[:data])
|
231
237
|
end
|
232
238
|
end
|
233
239
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore bundler config.
|
8
|
+
/.bundle
|
9
|
+
|
10
|
+
# Ignore the default SQLite database.
|
11
|
+
/db/*.sqlite3
|
12
|
+
/db/*.sqlite3-journal
|
13
|
+
|
14
|
+
# Ignore all logfiles and tempfiles.
|
15
|
+
/log/*.log
|
16
|
+
/tmp
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_model/railtie"
|
5
|
+
require "active_record/railtie"
|
6
|
+
require "action_controller/railtie"
|
7
|
+
require "action_mailer/railtie"
|
8
|
+
require "action_view/railtie"
|
9
|
+
# require "sprockets/railtie"
|
10
|
+
# require "rails/test_unit/railtie"
|
11
|
+
|
12
|
+
# Require the gems listed in Gemfile, including any gems
|
13
|
+
# you've limited to :test, :development, or :production.
|
14
|
+
Bundler.require(*Rails.groups)
|
15
|
+
|
16
|
+
module Dummy41
|
17
|
+
class Application < Rails::Application
|
18
|
+
# Settings in config/environments/* take precedence over those specified here.
|
19
|
+
# Application configuration should go into files in config/initializers
|
20
|
+
# -- all .rb files in that directory are automatically loaded.
|
21
|
+
|
22
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
23
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
24
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
25
|
+
|
26
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
27
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
28
|
+
# config.i18n.default_locale = :de
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Rails.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
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
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
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
|
26
|
+
# Raises error for missing translations
|
27
|
+
# config.action_view.raise_on_missing_translations = true
|
28
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files.
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# Set to :debug to see everything in the log.
|
34
|
+
config.log_level = :info
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags.
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups.
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production.
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
49
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
50
|
+
# config.action_mailer.raise_delivery_errors = false
|
51
|
+
|
52
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
53
|
+
# the I18n.default_locale when a translation cannot be found).
|
54
|
+
config.i18n.fallbacks = true
|
55
|
+
|
56
|
+
# Send deprecation notices to registered listeners.
|
57
|
+
config.active_support.deprecation = :notify
|
58
|
+
|
59
|
+
# Disable automatic flushing of the log to improve performance.
|
60
|
+
# config.autoflush_log = false
|
61
|
+
|
62
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
63
|
+
config.log_formatter = ::Logger::Formatter.new
|
64
|
+
|
65
|
+
# Do not dump schema after migrations.
|
66
|
+
config.active_record.dump_schema_after_migration = false
|
67
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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_assets = true
|
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
|
+
end
|