torba-rails 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.ruby-version +1 -0
- data/.travis.yml +24 -2
- data/CHANGELOG.md +7 -0
- data/CONTRIBUTING.md +7 -1
- data/README.md +1 -1
- data/Rakefile +9 -17
- data/lib/torba/rails.rb +7 -3
- data/test/3.2/Gemfile +2 -1
- data/test/3.2/Torbafile +1 -0
- data/test/3.2/app/assets/javascripts/application.js +1 -0
- data/test/3.2/app/assets/stylesheets/application.scss +1 -0
- data/test/3.2/bin/rails +1 -0
- data/test/4.1/Gemfile +2 -1
- data/test/4.1/Torbafile +1 -0
- data/test/4.1/app/assets/javascripts/application.js +1 -0
- data/test/4.1/app/assets/stylesheets/application.scss +1 -0
- data/test/4.2/Gemfile +2 -1
- data/test/4.2/Torbafile +1 -0
- data/test/4.2/app/assets/javascripts/application.js +1 -0
- data/test/4.2/app/assets/stylesheets/application.scss +1 -0
- data/test/5.0/Gemfile +2 -1
- data/test/5.0/Torbafile +1 -0
- data/test/5.0/app/assets/javascripts/application.js +1 -0
- data/test/5.0/app/assets/stylesheets/application.scss +1 -0
- data/test/5.1/.gitignore +14 -0
- data/test/5.1/Gemfile +11 -0
- data/test/5.1/Rakefile +6 -0
- data/test/5.1/Torbafile +1 -0
- data/test/5.1/app/assets/config/manifest.js +3 -0
- data/test/5.1/app/assets/javascripts/application.js +1 -0
- data/test/5.1/app/assets/stylesheets/application.scss +1 -0
- data/test/5.1/app/controllers/application_controller.rb +3 -0
- data/test/5.1/app/helpers/application_helper.rb +2 -0
- data/test/5.1/app/views/layouts/application.html.erb +14 -0
- data/test/5.1/bin/rails +4 -0
- data/test/5.1/config.ru +5 -0
- data/test/5.1/config/application.rb +23 -0
- data/test/5.1/config/boot.rb +3 -0
- data/test/5.1/config/environment.rb +5 -0
- data/test/5.1/config/environments/development.rb +46 -0
- data/test/5.1/config/environments/production.rb +79 -0
- data/test/5.1/config/environments/test.rb +36 -0
- data/test/5.1/config/initializers/application_controller_renderer.rb +8 -0
- data/test/5.1/config/initializers/assets.rb +12 -0
- data/test/5.1/config/initializers/backtrace_silencers.rb +7 -0
- data/test/5.1/config/initializers/cookies_serializer.rb +5 -0
- data/test/5.1/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/5.1/config/initializers/inflections.rb +16 -0
- data/test/5.1/config/initializers/mime_types.rb +4 -0
- data/test/5.1/config/initializers/wrap_parameters.rb +9 -0
- data/test/5.1/config/locales/en.yml +33 -0
- data/test/5.1/config/routes.rb +3 -0
- data/test/5.1/config/secrets.yml +32 -0
- data/test/acceptance_test.rb +6 -1
- data/test/compiled_assets/3.2/{application-406b208e73b83fe37135274c5157c8e3.css → application-%2A.css} +0 -0
- data/test/compiled_assets/3.2/application-%2A.js +1 -0
- data/test/compiled_assets/3.2/trumbowyg/{icons-0b2826fbd974348c269c2b8017a14314.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
- data/test/compiled_assets/3.2/trumbowyg/{icons-2x-cc69d8bc62651602e75c2f7097cf5187.png → icons-2x-%2A.png} +0 -0
- data/test/compiled_assets/4.1/{application-b93806e6555eb26989308c4d06311423.css → application-%2A.css} +0 -0
- data/test/compiled_assets/4.1/application-%2A.js +1 -0
- data/test/compiled_assets/4.1/trumbowyg/{icons-60fe5a8fdf8b247fe07ca2454df66f80.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
- data/test/compiled_assets/4.1/trumbowyg/{icons-2x-0977e4f2195ed320a8dcc57e194af523.png → icons-2x-%2A.png} +0 -0
- data/test/compiled_assets/4.2+/{application-7cdb22c682ee9bf44774492034be6952becd2c75184c101017152af1476b12a8.css → application-%2A.css} +0 -0
- data/test/compiled_assets/4.2+/application-%2A.js +1 -0
- data/test/compiled_assets/4.2+/trumbowyg/{icons-efc940454e4e764063875def5c909a2f9c8b2c4d2a41c6a98dc41fb111868f1f.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
- data/test/compiled_assets/4.2+/trumbowyg/{icons-2x-39fe92cd396082eb94f0c92103537209ba97ffa3079377bbe55fea857abe5341.png → icons-2x-%2A.png} +0 -0
- data/test/environment.rb +6 -0
- data/test/rake_injector/lib/rake_injector.rb +6 -0
- data/test/rake_injector/rake_injector.gemspec +13 -0
- data/test/test_helper.rb +1 -0
- data/torba-rails.gemspec +2 -2
- metadata +94 -38
- data/test/3.2/Gemfile.lock +0 -116
- data/test/3.2/Torbafile +0 -8
- data/test/3.2/app/assets/javascripts/application.js +0 -2
- data/test/3.2/app/assets/stylesheets/application.scss +0 -6
- data/test/3.2/bin/rails +0 -6
- data/test/4.1/Gemfile.lock +0 -113
- data/test/4.1/Torbafile +0 -8
- data/test/4.1/app/assets/javascripts/application.js +0 -2
- data/test/4.1/app/assets/stylesheets/application.scss +0 -6
- data/test/4.2/Gemfile.lock +0 -128
- data/test/4.2/Torbafile +0 -8
- data/test/4.2/app/assets/javascripts/application.js +0 -2
- data/test/4.2/app/assets/stylesheets/application.scss +0 -6
- data/test/5.0/Gemfile.lock +0 -138
- data/test/5.0/Torbafile +0 -8
- data/test/5.0/app/assets/javascripts/application.js +0 -2
- data/test/5.0/app/assets/stylesheets/application.scss +0 -6
- data/test/compiled_assets/3.2/application-32cc93d3c658f24842cdb4028d7f6a6a.js +0 -1
- data/test/compiled_assets/4.1/application-959396ba4d98dd11cf6ac10b43f7fa97.js +0 -1
- data/test/compiled_assets/4.2+/application-c7e50f0b91ececdd620e1c86789b65677d9bbe0f35ab4717a9a522e6c89a56f9.js +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fa6e4180bc8e6ef486787745874585fe35e17796
|
|
4
|
+
data.tar.gz: '0840a754a4592d8e23c4cae92d1d3846278b1264'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d7f88d6b6fd711668abb6c2866c26593f616a4c5885a6da0c68c9419abc3947c693a63a0710f0604ea2bcbc520257f815fcf2641a4377c5c9b655a1df4820051
|
|
7
|
+
data.tar.gz: 7c27b983b4974148ed8b3028671805806793f22b9edf37e050deedb9b58c7423baaff3d2784a8e15c0679b1dd14f8fa2dc1c8a4f936355c75c1b89de543f4723
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.3.3
|
data/.travis.yml
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
|
+
sudo: false
|
|
2
|
+
cache:
|
|
3
|
+
directories:
|
|
4
|
+
- vendor/bundle
|
|
5
|
+
- test/3.2/vendor/bundle
|
|
6
|
+
- test/4.1/vendor/bundle
|
|
7
|
+
- test/4.2/vendor/bundle
|
|
8
|
+
- test/5.0/vendor/bundle
|
|
9
|
+
- test/5.1/vendor/bundle
|
|
1
10
|
language: ruby
|
|
2
11
|
rvm:
|
|
3
|
-
- 2.2
|
|
4
|
-
|
|
12
|
+
- 2.2
|
|
13
|
+
- 2.3
|
|
14
|
+
- 2.4
|
|
15
|
+
bundler_args: --without doc debug --path=vendor/bundle
|
|
16
|
+
env:
|
|
17
|
+
- RAILS_VERSION=3.2
|
|
18
|
+
- RAILS_VERSION=4.1
|
|
19
|
+
- RAILS_VERSION=4.2
|
|
20
|
+
- RAILS_VERSION=5.0
|
|
21
|
+
- RAILS_VERSION=5.1
|
|
22
|
+
matrix:
|
|
23
|
+
exclude:
|
|
24
|
+
# https://github.com/rails/rails/issues/25125
|
|
25
|
+
- rvm: 2.4
|
|
26
|
+
env: RAILS_VERSION=4.1
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTING.md
CHANGED
|
@@ -36,7 +36,13 @@
|
|
|
36
36
|
## Running the tests
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
|
|
39
|
+
# Runs the test suite against the latest version of Rails.
|
|
40
|
+
bundle exec rake test
|
|
41
|
+
|
|
42
|
+
# Runs the test suite for a specific version of Rails.
|
|
43
|
+
bundle exec rake test RAILS_VERSION=4.2
|
|
44
|
+
|
|
45
|
+
# Runs the test suite for all supported versions of Rails.
|
|
40
46
|
bundle exec rake test_all
|
|
41
47
|
```
|
|
42
48
|
|
data/README.md
CHANGED
data/Rakefile
CHANGED
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
require "bundler/gem_tasks"
|
|
2
|
-
|
|
3
|
-
rails_versions = %w[3.2 4.1 4.2 5.0]
|
|
4
|
-
|
|
5
|
-
task :bundle do
|
|
6
|
-
rails_versions.each do |version|
|
|
7
|
-
Bundler.with_clean_env do
|
|
8
|
-
sh "BUNDLE_GEMFILE=test/#{version}/Gemfile bundle install"
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
2
|
+
require_relative "test/environment"
|
|
12
3
|
|
|
13
4
|
task :test do
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
Bundler.with_clean_env do
|
|
6
|
+
sh "bundle install --gemfile=test/#{Torba::Test::RAILS_VERSION}/Gemfile #{"--path=vendor/bundle" if ENV["TRAVIS"]}"
|
|
7
|
+
$LOAD_PATH.unshift("test")
|
|
8
|
+
require_relative "test/acceptance_test"
|
|
9
|
+
end
|
|
16
10
|
end
|
|
17
11
|
|
|
18
12
|
task :test_all do
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
sh "RAILS_VERSION=#{version} bundle exec rake test"
|
|
22
|
-
end
|
|
13
|
+
Torba::Test::SUPPORTED_RAILS_VERSIONS.each do |version|
|
|
14
|
+
exit 1 unless sh "bundle exec rake test RAILS_VERSION=#{version}"
|
|
23
15
|
end
|
|
24
16
|
end
|
|
25
17
|
|
|
26
|
-
task :default =>
|
|
18
|
+
task :default => :test
|
data/lib/torba/rails.rb
CHANGED
|
@@ -12,11 +12,15 @@ module Torba
|
|
|
12
12
|
ENV["RAILS_GROUPS"] == "assets" # Rails 3
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
def self.precompile_assets?
|
|
16
|
+
defined?(Rake.application) && Rake.application.top_level_tasks.include?("assets:precompile")
|
|
17
|
+
end
|
|
18
|
+
|
|
15
19
|
initializer "torba.assets" do
|
|
16
|
-
if Engine.
|
|
17
|
-
require "torba/verify"
|
|
20
|
+
if Engine.precompile_assets?
|
|
18
21
|
Engine.setup
|
|
19
|
-
elsif
|
|
22
|
+
elsif Engine.serve_static_files?
|
|
23
|
+
require "torba/verify"
|
|
20
24
|
Engine.setup
|
|
21
25
|
end
|
|
22
26
|
end
|
data/test/3.2/Gemfile
CHANGED
data/test/3.2/Torbafile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/3.2/../Torbafile
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/3.2/app/assets/javascripts/../../../../application.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/3.2/app/assets/stylesheets/../../../../application.scss
|
data/test/3.2/bin/rails
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/3.2/bin/../script/rails
|
data/test/4.1/Gemfile
CHANGED
data/test/4.1/Torbafile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.1/../Torbafile
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.1/app/assets/javascripts/../../../../application.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.1/app/assets/stylesheets/../../../../application.scss
|
data/test/4.2/Gemfile
CHANGED
data/test/4.2/Torbafile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.2/../Torbafile
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.2/app/assets/javascripts/../../../../application.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/4.2/app/assets/stylesheets/../../../../application.scss
|
data/test/5.0/Gemfile
CHANGED
data/test/5.0/Torbafile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.0/../Torbafile
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.0/app/assets/javascripts/../../../../application.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.0/app/assets/stylesheets/../../../../application.scss
|
data/test/5.1/.gitignore
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
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 all logfiles and tempfiles.
|
|
11
|
+
/log/*
|
|
12
|
+
/tmp/*
|
|
13
|
+
|
|
14
|
+
.byebug_history
|
data/test/5.1/Gemfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
gem 'rails', '5.1.4'
|
|
4
|
+
gem 'sass-rails', '~> 5.0'
|
|
5
|
+
gem 'uglifier', '>= 1.3.0'
|
|
6
|
+
gem 'torba-rails', path: '../..'
|
|
7
|
+
gem 'rake_injector', path: '../rake_injector'
|
|
8
|
+
|
|
9
|
+
group :development do
|
|
10
|
+
gem 'listen', '>= 3.0.5', '< 3.2'
|
|
11
|
+
end
|
data/test/5.1/Rakefile
ADDED
data/test/5.1/Torbafile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.1/../Torbafile
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.1/app/assets/javascripts/../../../../application.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
test/5.1/app/assets/stylesheets/../../../../application.scss
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>TorbaTest</title>
|
|
5
|
+
<%= csrf_meta_tags %>
|
|
6
|
+
|
|
7
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<%= yield %>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
data/test/5.1/bin/rails
ADDED
data/test/5.1/config.ru
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require_relative 'boot'
|
|
2
|
+
|
|
3
|
+
require "rails"
|
|
4
|
+
require "action_controller/railtie"
|
|
5
|
+
require "sprockets/railtie"
|
|
6
|
+
|
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
|
8
|
+
# you've limited to :test, :development, or :production.
|
|
9
|
+
Bundler.require(*Rails.groups)
|
|
10
|
+
|
|
11
|
+
module TorbaTest
|
|
12
|
+
class Application < Rails::Application
|
|
13
|
+
# Initialize configuration defaults for originally generated Rails version.
|
|
14
|
+
config.load_defaults 5.1
|
|
15
|
+
|
|
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
|
+
# Don't generate system test files.
|
|
21
|
+
config.generators.system_tests = nil
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
|
|
15
|
+
# Enable/disable caching. By default caching is disabled.
|
|
16
|
+
if Rails.root.join('tmp/caching-dev.txt').exist?
|
|
17
|
+
config.action_controller.perform_caching = true
|
|
18
|
+
|
|
19
|
+
config.cache_store = :memory_store
|
|
20
|
+
config.public_file_server.headers = {
|
|
21
|
+
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
|
|
22
|
+
}
|
|
23
|
+
else
|
|
24
|
+
config.action_controller.perform_caching = false
|
|
25
|
+
|
|
26
|
+
config.cache_store = :null_store
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Print deprecation notices to the Rails logger.
|
|
30
|
+
config.active_support.deprecation = :log
|
|
31
|
+
|
|
32
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
|
33
|
+
# This option may cause significant delays in view rendering with a large
|
|
34
|
+
# number of complex assets.
|
|
35
|
+
config.assets.debug = true
|
|
36
|
+
|
|
37
|
+
# Suppress logger output for asset requests.
|
|
38
|
+
config.assets.quiet = true
|
|
39
|
+
|
|
40
|
+
# Raises error for missing translations
|
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
|
42
|
+
|
|
43
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
|
44
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
|
45
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
|
46
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
|
|
18
|
+
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
|
|
19
|
+
# `config/secrets.yml.key`.
|
|
20
|
+
config.read_encrypted_secrets = true
|
|
21
|
+
|
|
22
|
+
# Disable serving static files from the `/public` folder by default since
|
|
23
|
+
# Apache or NGINX already handles this.
|
|
24
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
25
|
+
|
|
26
|
+
# Compress JavaScripts and CSS.
|
|
27
|
+
config.assets.js_compressor = :uglifier
|
|
28
|
+
# config.assets.css_compressor = :sass
|
|
29
|
+
|
|
30
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
31
|
+
config.assets.compile = false
|
|
32
|
+
|
|
33
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
34
|
+
|
|
35
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
36
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
37
|
+
|
|
38
|
+
# Specifies the header that your server uses for sending files.
|
|
39
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
44
|
+
# config.force_ssl = true
|
|
45
|
+
|
|
46
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
|
47
|
+
# when problems arise.
|
|
48
|
+
config.log_level = :debug
|
|
49
|
+
|
|
50
|
+
# Prepend all log lines with the following tags.
|
|
51
|
+
config.log_tags = [ :request_id ]
|
|
52
|
+
|
|
53
|
+
# Use a different cache store in production.
|
|
54
|
+
# config.cache_store = :mem_cache_store
|
|
55
|
+
|
|
56
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
|
57
|
+
# config.active_job.queue_adapter = :resque
|
|
58
|
+
# config.active_job.queue_name_prefix = "torba_test_#{Rails.env}"
|
|
59
|
+
|
|
60
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
61
|
+
# the I18n.default_locale when a translation cannot be found).
|
|
62
|
+
config.i18n.fallbacks = true
|
|
63
|
+
|
|
64
|
+
# Send deprecation notices to registered listeners.
|
|
65
|
+
config.active_support.deprecation = :notify
|
|
66
|
+
|
|
67
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
68
|
+
config.log_formatter = ::Logger::Formatter.new
|
|
69
|
+
|
|
70
|
+
# Use a different logger for distributed setups.
|
|
71
|
+
# require 'syslog/logger'
|
|
72
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
|
73
|
+
|
|
74
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
75
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
|
76
|
+
logger.formatter = config.log_formatter
|
|
77
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
|
78
|
+
end
|
|
79
|
+
end
|