latexpdf 0.4.11 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/action_view/template_handlers/tex.rb +4 -4
- data/lib/latexpdf/version.rb +1 -1
- data/test/dummy/{README.rdoc → README.md} +1 -5
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/config/manifest.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +5 -5
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/views/layouts/application.html.erb +9 -9
- data/test/dummy/bin/rails +1 -1
- data/test/dummy/bin/setup +15 -11
- data/test/dummy/config.ru +2 -1
- data/test/dummy/config/application.rb +18 -15
- data/test/dummy/config/credentials.yml.enc +1 -0
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +22 -19
- data/test/dummy/config/environments/production.rb +40 -30
- data/test/dummy/config/environments/test.rb +13 -17
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/content_security_policy.rb +28 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +2 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +1 -6
- data/test/dummy/config/locales/en.yml +11 -1
- data/test/dummy/config/routes.rb +3 -1
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/log/test.log +72 -1107
- data/test/dummy/public/404.html +6 -6
- data/test/dummy/public/422.html +6 -6
- data/test/dummy/public/500.html +6 -6
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/robots.txt +1 -0
- data/test/dummy/tmp/development_secret.txt +1 -0
- data/test/test_helper.rb +1 -1
- metadata +27 -61
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/initializers/assets.rb +0 -11
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/log/development.log +0 -54
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Al/Al8B-MlRXLmvveOkSiQtTH7Mnx87ww6TKPPkXQkDCfA.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/El/Elvl8FhrIcCHSvOVJ4mlw98G_x77dIhDO7ncklgb9o8.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Eo/EoGXUuweaJggMJEhq_PIGuHGezpQHVeyR5Tnle6g0Zk.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Iv/IvDM1j8-H1H6kEjVCsyIW8N2zla-aIp9q_OE9PVZtVw.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OH/OHv3xxmOjKcBMS0Y_yTmyfrhpGoi7AbGMBAcCFsH1vg.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ol/OlBX9JIv9SAOmK2t35x1SYDx1sxCXF0yvqpna3WMyH0.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/TG/TGzz_qJLZNCMGy25pS4Lm-8Vj71mxCyy5TNmGoF9mUk.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Yr/YrZ0OIHu42cExs1kqngMA6ShVDKhfGmhyW-E9haNo5Y.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gp/gpiWtnqpufka8lRtMznM6Ko0aWJrcH_j8cfZwdYmzNI.cache +0 -1
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hZ/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/jo/jozGBeLU1Q4eVAsw_A_nyY994iqcnwgTZWiFbVsYmBs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pE/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +0 -2
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sU/sU_vk26h2xIJpI3d-zhVgF2iTwOCAFk7zHPYuvqWNk0.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/sp/sp2aS0gBrj1ZVPgX0e8j11TaSSz3qpMGjtFv6soZ0KM.cache +0 -0
- data/test/dummy/tmp/f49fc320-ad78-44cc-81a2-967d69f703a7/input.aux +0 -1
- data/test/dummy/tmp/f49fc320-ad78-44cc-81a2-967d69f703a7/input.log +0 -417
- data/test/dummy/tmp/f49fc320-ad78-44cc-81a2-967d69f703a7/input.pdf +0 -0
- data/test/dummy/tmp/f49fc320-ad78-44cc-81a2-967d69f703a7/input.tex +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 964946a4b83e913c0b28461e5a52ae1265c509bbe872a46af2fb3263eb3198b7
|
4
|
+
data.tar.gz: 4b89c2375ea54fa62705dc10cbc181a4a0f82241cf8a7f689fda05892007a4bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51fd7a52568ffa55c67b0889e35fc526fe414622f4a8862782ab98f8a2f156cc0aaecaf910fc63509772b2def3a93c1c28387f385c89bbe608c03eeaffa81beb
|
7
|
+
data.tar.gz: ec9493d37701209642d76e5a09bae026215284b07c98ced9b93305cbb3e12d692914389c853dbeb908df2bb842051209d78c1d0708fc973d41165cd76ce8b8f1
|
@@ -11,12 +11,12 @@ module ActionView
|
|
11
11
|
@@erb_handler ||= ActionView::Template.registered_template_handler(:erb)
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.call(template)
|
15
|
-
new.call(template)
|
14
|
+
def self.call(template, source)
|
15
|
+
new.call(template, source)
|
16
16
|
end
|
17
17
|
|
18
|
-
def call(template)
|
19
|
-
compiled_source = erb_handler.call(template)
|
18
|
+
def call(template, source)
|
19
|
+
compiled_source = erb_handler.call(template, source)
|
20
20
|
|
21
21
|
"Latexpdf::compile(begin;#{compiled_source};end)"
|
22
22
|
end
|
data/lib/latexpdf/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
# README
|
2
2
|
|
3
3
|
This README would normally document whatever steps are necessary to get the
|
4
4
|
application up and running.
|
@@ -22,7 +22,3 @@ Things you may want to cover:
|
|
22
22
|
* Deployment instructions
|
23
23
|
|
24
24
|
* ...
|
25
|
-
|
26
|
-
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
|
4
|
+
require_relative 'config/application'
|
5
5
|
|
6
6
|
Rails.application.load_tasks
|
@@ -2,13 +2,13 @@
|
|
2
2
|
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
3
|
* listed below.
|
4
4
|
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets,
|
6
|
-
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
|
6
|
+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
7
|
*
|
8
8
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any
|
10
|
-
*
|
11
|
-
* file per style scope.
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
+
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
+
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
13
|
*= require_tree .
|
14
14
|
*= require_self
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class ApplicationJob < ActiveJob::Base
|
2
|
+
# Automatically retry jobs that encountered a deadlock
|
3
|
+
# retry_on ActiveRecord::Deadlocked
|
4
|
+
|
5
|
+
# Most jobs are safe to ignore if the underlying records are no longer available
|
6
|
+
# discard_on ActiveJob::DeserializationError
|
7
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= csrf_meta_tags %>
|
6
|
+
<%= csp_meta_tag %>
|
10
7
|
|
11
|
-
<%=
|
8
|
+
<%= stylesheet_link_tag 'application', media: 'all' %>
|
9
|
+
</head>
|
12
10
|
|
13
|
-
|
11
|
+
<body>
|
12
|
+
<%= yield %>
|
13
|
+
</body>
|
14
14
|
</html>
|
data/test/dummy/bin/rails
CHANGED
data/test/dummy/bin/setup
CHANGED
@@ -1,21 +1,25 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
2
|
+
require 'fileutils'
|
3
3
|
|
4
4
|
# path to your application root.
|
5
|
-
APP_ROOT =
|
5
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
def system!(*args)
|
8
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
9
|
+
end
|
10
|
+
|
11
|
+
FileUtils.chdir APP_ROOT do
|
12
|
+
# This script is a way to setup or update your development environment automatically.
|
13
|
+
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
14
|
+
# Add necessary setup steps to this file.
|
10
15
|
|
11
|
-
puts
|
12
|
-
system
|
13
|
-
system
|
16
|
+
puts '== Installing dependencies =='
|
17
|
+
system! 'gem install bundler --conservative'
|
18
|
+
system('bundle check') || system!('bundle install')
|
14
19
|
|
15
20
|
puts "\n== Removing old logs and tempfiles =="
|
16
|
-
system
|
17
|
-
system "rm -rf tmp/cache"
|
21
|
+
system! 'bin/rails log:clear tmp:clear'
|
18
22
|
|
19
23
|
puts "\n== Restarting application server =="
|
20
|
-
system
|
24
|
+
system! 'bin/rails restart'
|
21
25
|
end
|
data/test/dummy/config.ru
CHANGED
@@ -1,32 +1,35 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
3
|
require "rails"
|
4
4
|
# Pick the frameworks you want:
|
5
5
|
require "active_model/railtie"
|
6
6
|
require "active_job/railtie"
|
7
7
|
# require "active_record/railtie"
|
8
|
+
# require "active_storage/engine"
|
8
9
|
require "action_controller/railtie"
|
9
|
-
require "action_mailer/railtie"
|
10
|
+
# require "action_mailer/railtie"
|
11
|
+
# require "action_mailbox/engine"
|
12
|
+
# require "action_text/engine"
|
10
13
|
require "action_view/railtie"
|
11
|
-
require "
|
12
|
-
require "
|
14
|
+
# require "action_cable/engine"
|
15
|
+
# require "sprockets/railtie"
|
16
|
+
# require "rails/test_unit/railtie"
|
13
17
|
|
18
|
+
# Require the gems listed in Gemfile, including any gems
|
19
|
+
# you've limited to :test, :development, or :production.
|
14
20
|
Bundler.require(*Rails.groups)
|
15
|
-
require "latexpdf"
|
16
21
|
|
17
22
|
module Dummy
|
18
23
|
class Application < Rails::Application
|
19
|
-
#
|
20
|
-
|
21
|
-
# -- all .rb files in that directory are automatically loaded.
|
24
|
+
# Initialize configuration defaults for originally generated Rails version.
|
25
|
+
config.load_defaults 6.0
|
22
26
|
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
27
|
+
# Settings in config/environments/* take precedence over those specified here.
|
28
|
+
# Application configuration can go into files in config/initializers
|
29
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
30
|
+
# the framework and any gems in your application.
|
26
31
|
|
27
|
-
#
|
28
|
-
|
29
|
-
# config.i18n.default_locale = :de
|
32
|
+
# Don't generate system test files.
|
33
|
+
config.generators.system_tests = nil
|
30
34
|
end
|
31
35
|
end
|
32
|
-
|
@@ -0,0 +1 @@
|
|
1
|
+
at+JRX1ngewxk270DMOHbbhn1Oe+bcVTOuXg4SgY1QjjG87tElfVcI2LhEmVZYG3XCNjw9CdO+jTiwnwymasvEfM7THsQYFw4Dbz9rF2bZXRF2jkiHkTXj/skLrtEOmK8vy1tEKf1p1dVXXVIG9DFmmPDmrNAOEo1hpmocl0clZEIPQLzGr125hcStH03YXXMnwTuJdEroZc6MsmtIpx2Z0F977z9HS5mCqhXeECEflhFrHVh0EJDsFyZ+JU14IytjERHb3nREOYUdB8mpTLOmW0I4VrelDMGiM410ChLSKbadVk9xgwF8TVLrjiU/Rxy3fV2ccTLRzn838n5NxUJU4IIDiqNDcz0v15+5XYkDSjo8olf40Rm7+v6LMMZWhkrux+YxZ4xqEVpBV2dzF99Vbozv+4LZpjtsqB--Dz95BDOi0o9WX3v3--+Hpi8Q/hMA6tgI4hxbi1FA==
|
@@ -9,30 +9,33 @@ Rails.application.configure do
|
|
9
9
|
# Do not eager load code on boot.
|
10
10
|
config.eager_load = false
|
11
11
|
|
12
|
-
# Show full error reports
|
13
|
-
config.consider_all_requests_local
|
14
|
-
config.action_controller.perform_caching = false
|
12
|
+
# Show full error reports.
|
13
|
+
config.consider_all_requests_local = true
|
15
14
|
|
16
|
-
#
|
17
|
-
|
15
|
+
# Enable/disable caching. By default caching is disabled.
|
16
|
+
# Run rails dev:cache to toggle caching.
|
17
|
+
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
18
|
+
config.action_controller.perform_caching = true
|
19
|
+
config.action_controller.enable_fragment_cache_logging = true
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
+
config.cache_store = :memory_store
|
22
|
+
config.public_file_server.headers = {
|
23
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
24
|
+
}
|
25
|
+
else
|
26
|
+
config.action_controller.perform_caching = false
|
21
27
|
|
22
|
-
|
23
|
-
|
24
|
-
# number of complex assets.
|
25
|
-
config.assets.debug = true
|
28
|
+
config.cache_store = :null_store
|
29
|
+
end
|
26
30
|
|
27
|
-
#
|
28
|
-
|
29
|
-
config.assets.digest = true
|
31
|
+
# Print deprecation notices to the Rails logger.
|
32
|
+
config.active_support.deprecation = :log
|
30
33
|
|
31
|
-
# Adds additional error checking when serving assets at runtime.
|
32
|
-
# Checks for improperly declared sprockets dependencies.
|
33
|
-
# Raises helpful error messages.
|
34
|
-
config.assets.raise_runtime_errors = true
|
35
34
|
|
36
|
-
# Raises error for missing translations
|
35
|
+
# Raises error for missing translations.
|
37
36
|
# config.action_view.raise_on_missing_translations = true
|
37
|
+
|
38
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
39
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
40
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
38
41
|
end
|
@@ -14,28 +14,16 @@ Rails.application.configure do
|
|
14
14
|
config.consider_all_requests_local = false
|
15
15
|
config.action_controller.perform_caching = true
|
16
16
|
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# NGINX, varnish or squid.
|
21
|
-
# config.action_dispatch.rack_cache = true
|
17
|
+
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
18
|
+
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
19
|
+
# config.require_master_key = true
|
22
20
|
|
23
21
|
# Disable serving static files from the `/public` folder by default since
|
24
22
|
# Apache or NGINX already handles this.
|
25
|
-
config.
|
23
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
24
|
|
27
|
-
#
|
28
|
-
config.
|
29
|
-
# config.assets.css_compressor = :sass
|
30
|
-
|
31
|
-
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
-
config.assets.compile = false
|
33
|
-
|
34
|
-
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
-
# yet still be able to expire them through the digest params.
|
36
|
-
config.assets.digest = true
|
37
|
-
|
38
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
25
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
26
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
39
27
|
|
40
28
|
# Specifies the header that your server uses for sending files.
|
41
29
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
@@ -49,20 +37,14 @@ Rails.application.configure do
|
|
49
37
|
config.log_level = :debug
|
50
38
|
|
51
39
|
# Prepend all log lines with the following tags.
|
52
|
-
|
53
|
-
|
54
|
-
# Use a different logger for distributed setups.
|
55
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
40
|
+
config.log_tags = [ :request_id ]
|
56
41
|
|
57
42
|
# Use a different cache store in production.
|
58
43
|
# config.cache_store = :mem_cache_store
|
59
44
|
|
60
|
-
#
|
61
|
-
# config.
|
62
|
-
|
63
|
-
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
-
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
-
# config.action_mailer.raise_delivery_errors = false
|
45
|
+
# Use a real queuing backend for Active Job (and separate queues per environment).
|
46
|
+
# config.active_job.queue_adapter = :resque
|
47
|
+
# config.active_job.queue_name_prefix = "dummy_production"
|
66
48
|
|
67
49
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
50
|
# the I18n.default_locale when a translation cannot be found).
|
@@ -74,6 +56,34 @@ Rails.application.configure do
|
|
74
56
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
57
|
config.log_formatter = ::Logger::Formatter.new
|
76
58
|
|
77
|
-
#
|
78
|
-
|
59
|
+
# Use a different logger for distributed setups.
|
60
|
+
# require 'syslog/logger'
|
61
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
62
|
+
|
63
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
64
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
65
|
+
logger.formatter = config.log_formatter
|
66
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Inserts middleware to perform automatic connection switching.
|
70
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
71
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
72
|
+
# to send a subsequent read to the primary.
|
73
|
+
#
|
74
|
+
# The `database_resolver` class is used by the middleware to determine which
|
75
|
+
# database is appropriate to use based on the time delay.
|
76
|
+
#
|
77
|
+
# The `database_resolver_context` class is used by the middleware to set
|
78
|
+
# timestamps for the last write to the primary. The resolver uses the context
|
79
|
+
# class timestamps to determine how long to wait before reading from the
|
80
|
+
# replica.
|
81
|
+
#
|
82
|
+
# By default Rails will store a last write timestamp in the session. The
|
83
|
+
# DatabaseSelector middleware is designed as such you can define your own
|
84
|
+
# strategy for connection switching and pass that into the middleware through
|
85
|
+
# these configuration options.
|
86
|
+
# config.active_record.database_selector = { delay: 2.seconds }
|
87
|
+
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
88
|
+
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
79
89
|
end
|
@@ -1,24 +1,28 @@
|
|
1
|
+
# The test environment is used exclusively to run your application's
|
2
|
+
# test suite. You never need to work with it otherwise. Remember that
|
3
|
+
# your test database is "scratch space" for the test suite and is wiped
|
4
|
+
# and recreated between test runs. Don't rely on the data there!
|
5
|
+
|
1
6
|
Rails.application.configure do
|
2
7
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
8
|
|
4
|
-
|
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
|
+
config.cache_classes = false
|
9
10
|
|
10
11
|
# Do not eager load code on boot. This avoids loading your whole application
|
11
12
|
# just for the purpose of running a single test. If you are using a tool that
|
12
13
|
# preloads Rails for running tests, you may have to set it to true.
|
13
14
|
config.eager_load = false
|
14
15
|
|
15
|
-
# Configure
|
16
|
-
config.
|
17
|
-
config.
|
16
|
+
# Configure public file server for tests with Cache-Control for performance.
|
17
|
+
config.public_file_server.enabled = true
|
18
|
+
config.public_file_server.headers = {
|
19
|
+
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
20
|
+
}
|
18
21
|
|
19
22
|
# Show full error reports and disable caching.
|
20
23
|
config.consider_all_requests_local = true
|
21
24
|
config.action_controller.perform_caching = false
|
25
|
+
config.cache_store = :null_store
|
22
26
|
|
23
27
|
# Raise exceptions instead of rendering exception templates.
|
24
28
|
config.action_dispatch.show_exceptions = false
|
@@ -26,17 +30,9 @@ Rails.application.configure do
|
|
26
30
|
# Disable request forgery protection in test environment.
|
27
31
|
config.action_controller.allow_forgery_protection = false
|
28
32
|
|
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
|
-
# Randomize the order test cases are executed.
|
35
|
-
config.active_support.test_order = :random
|
36
|
-
|
37
33
|
# Print deprecation notices to the stderr.
|
38
34
|
config.active_support.deprecation = :stderr
|
39
35
|
|
40
|
-
# Raises error for missing translations
|
36
|
+
# Raises error for missing translations.
|
41
37
|
# config.action_view.raise_on_missing_translations = true
|
42
38
|
end
|