torba-rails 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +24 -2
  5. data/CHANGELOG.md +7 -0
  6. data/CONTRIBUTING.md +7 -1
  7. data/README.md +1 -1
  8. data/Rakefile +9 -17
  9. data/lib/torba/rails.rb +7 -3
  10. data/test/3.2/Gemfile +2 -1
  11. data/test/3.2/Torbafile +1 -0
  12. data/test/3.2/app/assets/javascripts/application.js +1 -0
  13. data/test/3.2/app/assets/stylesheets/application.scss +1 -0
  14. data/test/3.2/bin/rails +1 -0
  15. data/test/4.1/Gemfile +2 -1
  16. data/test/4.1/Torbafile +1 -0
  17. data/test/4.1/app/assets/javascripts/application.js +1 -0
  18. data/test/4.1/app/assets/stylesheets/application.scss +1 -0
  19. data/test/4.2/Gemfile +2 -1
  20. data/test/4.2/Torbafile +1 -0
  21. data/test/4.2/app/assets/javascripts/application.js +1 -0
  22. data/test/4.2/app/assets/stylesheets/application.scss +1 -0
  23. data/test/5.0/Gemfile +2 -1
  24. data/test/5.0/Torbafile +1 -0
  25. data/test/5.0/app/assets/javascripts/application.js +1 -0
  26. data/test/5.0/app/assets/stylesheets/application.scss +1 -0
  27. data/test/5.1/.gitignore +14 -0
  28. data/test/5.1/Gemfile +11 -0
  29. data/test/5.1/Rakefile +6 -0
  30. data/test/5.1/Torbafile +1 -0
  31. data/test/5.1/app/assets/config/manifest.js +3 -0
  32. data/test/5.1/app/assets/javascripts/application.js +1 -0
  33. data/test/5.1/app/assets/stylesheets/application.scss +1 -0
  34. data/test/5.1/app/controllers/application_controller.rb +3 -0
  35. data/test/5.1/app/helpers/application_helper.rb +2 -0
  36. data/test/5.1/app/views/layouts/application.html.erb +14 -0
  37. data/test/5.1/bin/rails +4 -0
  38. data/test/5.1/config.ru +5 -0
  39. data/test/5.1/config/application.rb +23 -0
  40. data/test/5.1/config/boot.rb +3 -0
  41. data/test/5.1/config/environment.rb +5 -0
  42. data/test/5.1/config/environments/development.rb +46 -0
  43. data/test/5.1/config/environments/production.rb +79 -0
  44. data/test/5.1/config/environments/test.rb +36 -0
  45. data/test/5.1/config/initializers/application_controller_renderer.rb +8 -0
  46. data/test/5.1/config/initializers/assets.rb +12 -0
  47. data/test/5.1/config/initializers/backtrace_silencers.rb +7 -0
  48. data/test/5.1/config/initializers/cookies_serializer.rb +5 -0
  49. data/test/5.1/config/initializers/filter_parameter_logging.rb +4 -0
  50. data/test/5.1/config/initializers/inflections.rb +16 -0
  51. data/test/5.1/config/initializers/mime_types.rb +4 -0
  52. data/test/5.1/config/initializers/wrap_parameters.rb +9 -0
  53. data/test/5.1/config/locales/en.yml +33 -0
  54. data/test/5.1/config/routes.rb +3 -0
  55. data/test/5.1/config/secrets.yml +32 -0
  56. data/test/acceptance_test.rb +6 -1
  57. data/test/compiled_assets/3.2/{application-406b208e73b83fe37135274c5157c8e3.css → application-%2A.css} +0 -0
  58. data/test/compiled_assets/3.2/application-%2A.js +1 -0
  59. data/test/compiled_assets/3.2/trumbowyg/{icons-0b2826fbd974348c269c2b8017a14314.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
  60. data/test/compiled_assets/3.2/trumbowyg/{icons-2x-cc69d8bc62651602e75c2f7097cf5187.png → icons-2x-%2A.png} +0 -0
  61. data/test/compiled_assets/4.1/{application-b93806e6555eb26989308c4d06311423.css → application-%2A.css} +0 -0
  62. data/test/compiled_assets/4.1/application-%2A.js +1 -0
  63. data/test/compiled_assets/4.1/trumbowyg/{icons-60fe5a8fdf8b247fe07ca2454df66f80.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
  64. data/test/compiled_assets/4.1/trumbowyg/{icons-2x-0977e4f2195ed320a8dcc57e194af523.png → icons-2x-%2A.png} +0 -0
  65. data/test/compiled_assets/4.2+/{application-7cdb22c682ee9bf44774492034be6952becd2c75184c101017152af1476b12a8.css → application-%2A.css} +0 -0
  66. data/test/compiled_assets/4.2+/application-%2A.js +1 -0
  67. data/test/compiled_assets/4.2+/trumbowyg/{icons-efc940454e4e764063875def5c909a2f9c8b2c4d2a41c6a98dc41fb111868f1f.png → icons-%3F%3F%5B%5E-%5D%2A.png} +0 -0
  68. data/test/compiled_assets/4.2+/trumbowyg/{icons-2x-39fe92cd396082eb94f0c92103537209ba97ffa3079377bbe55fea857abe5341.png → icons-2x-%2A.png} +0 -0
  69. data/test/environment.rb +6 -0
  70. data/test/rake_injector/lib/rake_injector.rb +6 -0
  71. data/test/rake_injector/rake_injector.gemspec +13 -0
  72. data/test/test_helper.rb +1 -0
  73. data/torba-rails.gemspec +2 -2
  74. metadata +94 -38
  75. data/test/3.2/Gemfile.lock +0 -116
  76. data/test/3.2/Torbafile +0 -8
  77. data/test/3.2/app/assets/javascripts/application.js +0 -2
  78. data/test/3.2/app/assets/stylesheets/application.scss +0 -6
  79. data/test/3.2/bin/rails +0 -6
  80. data/test/4.1/Gemfile.lock +0 -113
  81. data/test/4.1/Torbafile +0 -8
  82. data/test/4.1/app/assets/javascripts/application.js +0 -2
  83. data/test/4.1/app/assets/stylesheets/application.scss +0 -6
  84. data/test/4.2/Gemfile.lock +0 -128
  85. data/test/4.2/Torbafile +0 -8
  86. data/test/4.2/app/assets/javascripts/application.js +0 -2
  87. data/test/4.2/app/assets/stylesheets/application.scss +0 -6
  88. data/test/5.0/Gemfile.lock +0 -138
  89. data/test/5.0/Torbafile +0 -8
  90. data/test/5.0/app/assets/javascripts/application.js +0 -2
  91. data/test/5.0/app/assets/stylesheets/application.scss +0 -6
  92. data/test/compiled_assets/3.2/application-32cc93d3c658f24842cdb4028d7f6a6a.js +0 -1
  93. data/test/compiled_assets/4.1/application-959396ba4d98dd11cf6ac10b43f7fa97.js +0 -1
  94. 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: 981cd8ea885a6e8ba1a44fed014840c60cb45969
4
- data.tar.gz: b666342634267351cd25f18f9dd6fce158d3f20c
3
+ metadata.gz: fa6e4180bc8e6ef486787745874585fe35e17796
4
+ data.tar.gz: '0840a754a4592d8e23c4cae92d1d3846278b1264'
5
5
  SHA512:
6
- metadata.gz: 68f3edd0ce2257ed2b5b738f2ef37c8bcc07c52ad78ec99a4940c2660f5bb380942094c6ad6c73c598d5329255d99f58200bce9593f5d5c79cb306998896b074
7
- data.tar.gz: c3997338dc61a69ff134e79a533e26b9ff92e39f1ef16178978a9ba7349e9e47aceaf442eba80740dbed07cb8f4410416ccafb6c1eff6a69970f0bb94ec4d0e8
6
+ metadata.gz: d7f88d6b6fd711668abb6c2866c26593f616a4c5885a6da0c68c9419abc3947c693a63a0710f0604ea2bcbc520257f815fcf2641a4377c5c9b655a1df4820051
7
+ data.tar.gz: 7c27b983b4974148ed8b3028671805806793f22b9edf37e050deedb9b58c7423baaff3d2784a8e15c0679b1dd14f8fa2dc1c8a4f936355c75c1b89de543f4723
data/.gitignore CHANGED
@@ -1,6 +1,6 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
3
+ Gemfile.lock
4
4
  /_yardoc/
5
5
  /coverage/
6
6
  /doc/
@@ -0,0 +1 @@
1
+ 2.3.3
@@ -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.2
4
- bundler_args: --without doc debug
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
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
2
 
3
+ ## Version 1.0.2
4
+
5
+ ### Bug fixes
6
+
7
+ * Fix broken Heroku deploy
8
+ * Fix "undefined method `application' for Rake:Module"
9
+
3
10
  ## Version 1.0.1
4
11
 
5
12
  ### Bug fixes
@@ -36,7 +36,13 @@
36
36
  ## Running the tests
37
37
 
38
38
  ```
39
- bundle exec rake bundle
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
@@ -11,7 +11,7 @@ Production ready.
11
11
 
12
12
  ## Documentation
13
13
 
14
- [Released version](http://rubydoc.info/gems/torba-rails/1.0.1)
14
+ [Released version](http://rubydoc.info/gems/torba-rails/1.0.2)
15
15
 
16
16
  ## Installation
17
17
 
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
- $LOAD_PATH.unshift("test")
15
- Dir.glob("./test/**/*_test.rb").each { |file| require file}
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
- rails_versions.each do |version|
20
- Bundler.with_clean_env do
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 => [:bundle, :test_all]
18
+ task :default => :test
@@ -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.serve_static_files?
17
- require "torba/verify"
20
+ if Engine.precompile_assets?
18
21
  Engine.setup
19
- elsif defined?(Rake) && Rake.application.top_level_tasks.include?("assets:precompile")
22
+ elsif Engine.serve_static_files?
23
+ require "torba/verify"
20
24
  Engine.setup
21
25
  end
22
26
  end
@@ -1,7 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '3.2.22.2'
3
+ gem 'rails', '3.2.22.5'
4
4
  gem 'torba-rails', path: '../..'
5
+ gem 'rake_injector', path: '../rake_injector'
5
6
 
6
7
  # Gems used only for assets and not required
7
8
  # in production environments by default.
@@ -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
@@ -0,0 +1 @@
1
+ test/3.2/bin/../script/rails
@@ -1,7 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '4.1.15'
3
+ gem 'rails', '4.1.16'
4
4
  gem 'sass-rails', '~> 4.0.3'
5
5
  gem 'uglifier', '>= 1.3.0'
6
6
  gem 'coffee-rails', '~> 4.0.0'
7
7
  gem 'torba-rails', path: '../..'
8
+ gem 'rake_injector', path: '../rake_injector'
@@ -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
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '4.2.6'
3
+ gem 'rails', '4.2.10'
4
4
  gem 'torba-rails', path: '../..'
5
5
  gem 'sass-rails', '~> 5.0'
6
6
  gem 'uglifier', '>= 1.3.0'
7
+ gem 'rake_injector', path: '../rake_injector'
@@ -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
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '5.0.0.beta3'
3
+ gem 'rails', '5.0.6'
4
4
  gem 'sass-rails', '~> 5.0'
5
5
  gem 'uglifier', '>= 1.3.0'
6
6
  gem 'torba-rails', path: '../..'
7
+ gem 'rake_injector', path: '../rake_injector'
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1 @@
1
+ test/5.1/../Torbafile
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -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,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -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>
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -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,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -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