tabular-text 0.0.2 → 0.1.0
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 +5 -5
- data/lib/tabular-text/handler.rb +2 -2
- data/lib/tabular-text/version.rb +1 -1
- data/test/dummy/{README.rdoc → README.md} +1 -5
- data/test/dummy/Rakefile +2 -2
- data/test/dummy/app/assets/config/manifest.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -5
- data/test/dummy/app/channels/application_cable/channel.rb +4 -0
- data/test/dummy/app/channels/application_cable/connection.rb +4 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -3
- data/test/dummy/app/javascript/channels/consumer.js +6 -0
- data/test/dummy/app/javascript/channels/index.js +5 -0
- data/test/dummy/app/javascript/packs/application.js +17 -0
- data/test/dummy/app/jobs/application_job.rb +7 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +10 -9
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +1 -1
- data/test/dummy/bin/setup +36 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config.ru +2 -1
- data/test/dummy/config/application.rb +9 -16
- data/test/dummy/config/boot.rb +2 -4
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/credentials.yml.enc +1 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +2 -2
- data/test/dummy/config/environments/development.rb +40 -4
- data/test/dummy/config/environments/production.rb +64 -32
- data/test/dummy/config/environments/test.rb +22 -9
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/content_security_policy.rb +30 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -1
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/test/dummy/config/locales/en.yml +11 -1
- data/test/dummy/config/master.key +1 -0
- data/test/dummy/config/puma.rb +38 -0
- data/test/dummy/config/routes.rb +1 -55
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config/storage.yml +34 -0
- data/test/dummy/db/seeds.rb +3 -3
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1066 -202
- data/test/dummy/package.json +11 -0
- data/test/dummy/public/404.html +24 -15
- data/test/dummy/public/422.html +24 -15
- data/test/dummy/public/500.html +23 -14
- 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 -5
- data/test/dummy/test/application_system_test_case.rb +5 -0
- data/test/dummy/test/channels/application_cable/connection_test.rb +11 -0
- data/test/dummy/test/test_helper.rb +4 -6
- data/test/dummy/tmp/development_secret.txt +1 -0
- data/test/integration/navigation_test.rb +6 -6
- data/test/test_helper.rb +2 -1
- metadata +104 -66
- data/test/dummy/Gemfile +0 -45
- data/test/dummy/Gemfile.lock +0 -119
- data/test/dummy/app/assets/javascripts/application.js +0 -16
- data/test/dummy/app/views/home/index.txt.tab +0 -3
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/config/initializers/secret_token.rb +0 -12
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +0 -16
- data/test/dummy/log/development.log +0 -3
- data/test/dummy/script/rails +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3c6ffe18bd56b6d37097bdb404b229727471fb026ad4ece34cac374ed2fe2547
|
4
|
+
data.tar.gz: e735eff8cbf065628da999a15024471ca2062e657e39220c5dbe79def6d46f64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '04149bb4c97e07e8f86f25a259dafbde99a696b9fe66cbfa6685cc6a43d9275a391a2c8a14e877a892174437960b245fe62232b2a944e12bba63205d100533e7'
|
7
|
+
data.tar.gz: e202f06902e89c37ae243a5a60618e126b8e240241b2ebd5c0c68ce82f8e15c86034d164b7e9b49bb404c80e07878a26f158c70ca0849b2e4ffed175e53a2455
|
data/lib/tabular-text/handler.rb
CHANGED
data/lib/tabular-text/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,12 +2,14 @@
|
|
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
|
-
* You're free to add application-wide styles to this file and they'll appear at the
|
9
|
-
* compiled file
|
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 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.
|
10
12
|
*
|
11
|
-
*= require_self
|
12
13
|
*= require_tree .
|
14
|
+
*= require_self
|
13
15
|
*/
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
+
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
+
|
4
|
+
import { createConsumer } from "@rails/actioncable"
|
5
|
+
|
6
|
+
export default createConsumer()
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// This file is automatically compiled by Webpack, along with any other files
|
2
|
+
// present in this directory. You're encouraged to place your actual application logic in
|
3
|
+
// a relevant structure within app/javascript and only use these pack files to reference
|
4
|
+
// that code so it'll be compiled.
|
5
|
+
|
6
|
+
require("@rails/ujs").start()
|
7
|
+
require("turbolinks").start()
|
8
|
+
require("@rails/activestorage").start()
|
9
|
+
require("channels")
|
10
|
+
|
11
|
+
|
12
|
+
// Uncomment to copy all static images under ../images to the output folder and reference
|
13
|
+
// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>)
|
14
|
+
// or the `imagePath` JavaScript helper below.
|
15
|
+
//
|
16
|
+
// const images = require.context('../images', true)
|
17
|
+
// const imagePath = (name) => images(name, true)
|
@@ -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,15 @@
|
|
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', 'data-turbolinks-track': 'reload' %>
|
9
|
+
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
10
|
+
</head>
|
12
11
|
|
13
|
-
|
12
|
+
<body>
|
13
|
+
<%= yield %>
|
14
|
+
</body>
|
14
15
|
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
data/test/dummy/bin/rails
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
6
|
+
|
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.
|
15
|
+
|
16
|
+
puts '== Installing dependencies =='
|
17
|
+
system! 'gem install bundler --conservative'
|
18
|
+
system('bundle check') || system!('bundle install')
|
19
|
+
|
20
|
+
# Install JavaScript dependencies
|
21
|
+
# system('bin/yarn')
|
22
|
+
|
23
|
+
# puts "\n== Copying sample files =="
|
24
|
+
# unless File.exist?('config/database.yml')
|
25
|
+
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
26
|
+
# end
|
27
|
+
|
28
|
+
puts "\n== Preparing database =="
|
29
|
+
system! 'bin/rails db:prepare'
|
30
|
+
|
31
|
+
puts "\n== Removing old logs and tempfiles =="
|
32
|
+
system! 'bin/rails log:clear tmp:clear'
|
33
|
+
|
34
|
+
puts "\n== Restarting application server =="
|
35
|
+
system! 'bin/rails restart'
|
36
|
+
end
|
data/test/dummy/bin/yarn
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(APP_ROOT) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg", *ARGV
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
8
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
data/test/dummy/config.ru
CHANGED
@@ -1,26 +1,19 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
|
-
require
|
4
|
-
require "action_mailer/railtie"
|
5
|
-
require "rails/test_unit/railtie"
|
6
|
-
require "sprockets/railtie"
|
3
|
+
require 'rails/all'
|
7
4
|
|
8
5
|
# Require the gems listed in Gemfile, including any gems
|
9
6
|
# you've limited to :test, :development, or :production.
|
10
|
-
Bundler.require(
|
7
|
+
Bundler.require(*Rails.groups)
|
11
8
|
|
12
9
|
module Dummy
|
13
10
|
class Application < Rails::Application
|
14
|
-
#
|
15
|
-
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
17
|
-
|
18
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
19
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
20
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
11
|
+
# Initialize configuration defaults for originally generated Rails version.
|
12
|
+
config.load_defaults 6.0
|
21
13
|
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
14
|
+
# Settings in config/environments/* take precedence over those specified here.
|
15
|
+
# Application configuration can go into files in config/initializers
|
16
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
17
|
+
# the framework and any gems in your application.
|
25
18
|
end
|
26
19
|
end
|
data/test/dummy/config/boot.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
3
|
-
|
4
|
-
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
1
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
5
2
|
|
3
|
+
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
@@ -0,0 +1 @@
|
|
1
|
+
qrzQC2Y8cY6Yrtq2vIRE+TIVrGk+8Z7aJZxVd7tIdRuYZcYQRAGNMoV/OD0YrXu2/YII6T2RAwg80pna9WxDBEtpUhNBRpUJNm5AcJ8xtMICHfGj0nKEY8DegP3dl+qksh0K/KqpMz1QdRXBc2tpOIFq/aWhSey4EIyDxdzL/JD5NEnVVWM5OVC5ByGQXbSwEnLlJdktnLyjpS3spwg3+EhtmpzlrNCgbILG6Y1aiaXCbVfv6QDv3G2ceWZmVRiNkplFagPgC9WqrbwmUKvz1dlbqW+HD+Yrunq5AILGrvYCz97DX33dtBcZgupfITF29bVJkFOXuqxG3l0xctQfY6u21XxqdAj3pIkWThKP9m1m+BmHtETWv0cLOhXGqPbFLNVYuJdTZLPRHEetbDBCY4nouKAKEHqNZHiy--7/qmUbB47ErDWHYO--GcKX+O1H0WQFxkBwf8QVRA==
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite. Versions 3.8.0 and up are supported.
|
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: <%= ENV.fetch("RAILS_MAX_THREADS") { 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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Rails.application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
@@ -9,18 +9,54 @@ Dummy::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
|
-
|
12
|
+
# Show full error reports.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
|
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
|
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
|
27
|
+
|
28
|
+
config.cache_store = :null_store
|
29
|
+
end
|
30
|
+
|
31
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
32
|
+
config.active_storage.service = :local
|
15
33
|
|
16
34
|
# Don't care if the mailer can't send.
|
17
35
|
config.action_mailer.raise_delivery_errors = false
|
18
36
|
|
37
|
+
config.action_mailer.perform_caching = false
|
38
|
+
|
19
39
|
# Print deprecation notices to the Rails logger.
|
20
40
|
config.active_support.deprecation = :log
|
21
41
|
|
42
|
+
# Raise an error on page load if there are pending migrations.
|
43
|
+
config.active_record.migration_error = :page_load
|
44
|
+
|
45
|
+
# Highlight code that triggered database queries in logs.
|
46
|
+
config.active_record.verbose_query_logs = true
|
47
|
+
|
22
48
|
# Debug mode disables concatenation and preprocessing of assets.
|
23
49
|
# This option may cause significant delays in view rendering with a large
|
24
50
|
# number of complex assets.
|
25
51
|
config.assets.debug = true
|
52
|
+
|
53
|
+
# Suppress logger output for asset requests.
|
54
|
+
config.assets.quiet = true
|
55
|
+
|
56
|
+
# Raises error for missing translations.
|
57
|
+
# config.action_view.raise_on_missing_translations = true
|
58
|
+
|
59
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
60
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
61
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
26
62
|
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
Rails.application.configure do
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
3
|
|
4
4
|
# Code is not reloaded between requests.
|
5
5
|
config.cache_classes = true
|
6
6
|
|
7
7
|
# Eager load code on boot. This eager loads most of Rails and
|
8
|
-
# your application in memory, allowing both
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
9
|
# and those relying on copy on write to perform better.
|
10
10
|
# Rake tasks automatically ignore this option for performance.
|
11
11
|
config.eager_load = true
|
@@ -14,67 +14,99 @@ Dummy::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
|
-
# 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
|
21
20
|
|
22
|
-
# Disable
|
23
|
-
|
21
|
+
# Disable serving static files from the `/public` folder by default since
|
22
|
+
# Apache or NGINX already handles this.
|
23
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
24
24
|
|
25
|
-
# Compress
|
26
|
-
config.assets.js_compressor = :uglifier
|
25
|
+
# Compress CSS using a preprocessor.
|
27
26
|
# config.assets.css_compressor = :sass
|
28
27
|
|
29
28
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
29
|
config.assets.compile = false
|
31
30
|
|
32
|
-
#
|
33
|
-
config.
|
34
|
-
|
35
|
-
# Version of your assets, change this if you want to expire all your assets.
|
36
|
-
config.assets.version = '1.0'
|
31
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
32
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
37
33
|
|
38
34
|
# Specifies the header that your server uses for sending files.
|
39
|
-
# config.action_dispatch.x_sendfile_header =
|
40
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for
|
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
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
39
|
+
config.active_storage.service = :local
|
40
|
+
|
41
|
+
# Mount Action Cable outside main process or domain.
|
42
|
+
# config.action_cable.mount_path = nil
|
43
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
44
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
41
45
|
|
42
46
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
47
|
# config.force_ssl = true
|
44
48
|
|
45
|
-
#
|
46
|
-
|
49
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
50
|
+
# when problems arise.
|
51
|
+
config.log_level = :debug
|
47
52
|
|
48
53
|
# Prepend all log lines with the following tags.
|
49
|
-
|
50
|
-
|
51
|
-
# Use a different logger for distributed setups.
|
52
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
54
|
+
config.log_tags = [ :request_id ]
|
53
55
|
|
54
56
|
# Use a different cache store in production.
|
55
57
|
# config.cache_store = :mem_cache_store
|
56
58
|
|
57
|
-
#
|
58
|
-
# config.
|
59
|
+
# Use a real queuing backend for Active Job (and separate queues per environment).
|
60
|
+
# config.active_job.queue_adapter = :resque
|
61
|
+
# config.active_job.queue_name_prefix = "dummy_production"
|
59
62
|
|
60
|
-
|
61
|
-
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
-
# config.assets.precompile += %w( search.js )
|
63
|
+
config.action_mailer.perform_caching = false
|
63
64
|
|
64
65
|
# Ignore bad email addresses and do not raise email delivery errors.
|
65
66
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
67
|
# config.action_mailer.raise_delivery_errors = false
|
67
68
|
|
68
69
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
-
# the I18n.default_locale when a translation
|
70
|
+
# the I18n.default_locale when a translation cannot be found).
|
70
71
|
config.i18n.fallbacks = true
|
71
72
|
|
72
73
|
# Send deprecation notices to registered listeners.
|
73
74
|
config.active_support.deprecation = :notify
|
74
75
|
|
75
|
-
# Disable automatic flushing of the log to improve performance.
|
76
|
-
# config.autoflush_log = false
|
77
|
-
|
78
76
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
77
|
config.log_formatter = ::Logger::Formatter.new
|
78
|
+
|
79
|
+
# Use a different logger for distributed setups.
|
80
|
+
# require 'syslog/logger'
|
81
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
82
|
+
|
83
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
84
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
85
|
+
logger.formatter = config.log_formatter
|
86
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Do not dump schema after migrations.
|
90
|
+
config.active_record.dump_schema_after_migration = false
|
91
|
+
|
92
|
+
# Inserts middleware to perform automatic connection switching.
|
93
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
94
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
95
|
+
# to send a subsequent read to the primary.
|
96
|
+
#
|
97
|
+
# The `database_resolver` class is used by the middleware to determine which
|
98
|
+
# database is appropriate to use based on the time delay.
|
99
|
+
#
|
100
|
+
# The `database_resolver_context` class is used by the middleware to set
|
101
|
+
# timestamps for the last write to the primary. The resolver uses the context
|
102
|
+
# class timestamps to determine how long to wait before reading from the
|
103
|
+
# replica.
|
104
|
+
#
|
105
|
+
# By default Rails will store a last write timestamp in the session. The
|
106
|
+
# DatabaseSelector middleware is designed as such you can define your own
|
107
|
+
# strategy for connection switching and pass that into the middleware through
|
108
|
+
# these configuration options.
|
109
|
+
# config.active_record.database_selector = { delay: 2.seconds }
|
110
|
+
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
111
|
+
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
80
112
|
end
|