latexpdf 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/latexpdf/railtie.rb +3 -3
  3. data/lib/latexpdf/version.rb +1 -1
  4. data/test/dummy/Rakefile +1 -1
  5. data/test/dummy/app/assets/config/manifest.js +1 -0
  6. data/test/dummy/app/assets/stylesheets/application.css +2 -2
  7. data/test/dummy/app/controllers/tex_controller.rb +2 -2
  8. data/test/dummy/app/views/layouts/application.html.erb +2 -1
  9. data/test/dummy/bin/rails +3 -3
  10. data/test/dummy/bin/rake +2 -2
  11. data/test/dummy/bin/setup +18 -10
  12. data/test/dummy/config/application.rb +21 -22
  13. data/test/dummy/config/boot.rb +3 -3
  14. data/test/dummy/config/environment.rb +1 -1
  15. data/test/dummy/config/environments/development.rb +44 -9
  16. data/test/dummy/config/environments/production.rb +59 -51
  17. data/test/dummy/config/environments/test.rb +36 -10
  18. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  19. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  20. data/test/dummy/config/initializers/inflections.rb +4 -4
  21. data/test/dummy/config/locales/en.yml +13 -15
  22. data/test/dummy/config.ru +2 -1
  23. data/test/dummy/log/test.log +116 -80
  24. data/test/dummy/tmp/local_secret.txt +1 -0
  25. data/test/latexpdf/configuration_test.rb +2 -2
  26. data/test/latexpdf/escaper_test.rb +1 -1
  27. metadata +56 -59
  28. data/test/dummy/README.md +0 -24
  29. data/test/dummy/config/credentials.yml.enc +0 -1
  30. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  31. data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
  32. data/test/dummy/config/initializers/wrap_parameters.rb +0 -9
  33. data/test/dummy/config/spring.rb +0 -6
  34. data/test/dummy/log/development.log +0 -0
  35. data/test/dummy/public/robots.txt +0 -1
  36. data/test/dummy/tmp/development_secret.txt +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b9c3708b4566f7736bd5823111b86fd9e5703f5ccd697a867929b71eeb3bd6e
4
- data.tar.gz: b1ae2f1e27633e5993aebc8d5776e5ab2957905dacf86b443b6863c5f45e264e
3
+ metadata.gz: 8b6deda219b32192b1fe5e45f132b7934b5ad45b740afaaf0f582dfe7f95ed66
4
+ data.tar.gz: 7b5d2422f6ce0d1ac22bd6866b51307076c60a076dd76f341fb046079a6eb0ac
5
5
  SHA512:
6
- metadata.gz: b9f04e62f6eba957bf58ec535c8a7afff6383019a3fdf2dce8774289fc05515092f804848db661b70aa7e8c25c004d0da969061080162b692bb4707e82662896
7
- data.tar.gz: d0667fe0fa4cf98b72eb8b12a85df225ec68d1f30471c19613f3a52838231e53714a9c80831b40719e2364e1e86d002377ac70dad8a867dfd103df8348d3bf3c
6
+ metadata.gz: 26234dd41a223e8c7b1aa5b5583cecc785f3d754d9699c1de180b2f9032f3c9b4015f3541b3379c5fab4e7a5ebe223050b5aa6fccb27bff0bde965ce833efaf0
7
+ data.tar.gz: aa717117ae014281191d66cb4db382609840545c866dcbe438d972d5334a7c638b20eef211b3ba2d439304acc3a68bf9962533883c1786b18300a6c70b1b8bcc
@@ -4,12 +4,12 @@ module Latexpdf
4
4
  class Railtie < Rails::Railtie
5
5
  config.to_prepare do
6
6
  begin
7
- Mime::Type.lookup(:tex)
7
+ Mime::Type.lookup("application/x-tex")
8
8
  rescue Mime::Type::InvalidMimeType
9
- Mime::Type.register('application/x-tex', :tex)
9
+ Mime::Type.register('application/x-tex', "tex")
10
10
  end
11
11
 
12
- ActionView::Template.register_template_handler :tex, ActionView::Template::Handlers::Tex
12
+ ActionView::Template.register_template_handler "tex", ActionView::Template::Handlers::Tex
13
13
  Latexpdf.configure do |c|
14
14
  c.build_path = Rails.configuration.paths['tmp'].first
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Latexpdf
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
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
- require_relative 'config/application'
4
+ require_relative "config/application"
5
5
 
6
6
  Rails.application.load_tasks
@@ -1,2 +1,3 @@
1
1
  //= link_tree ../images
2
2
  //= link_directory ../stylesheets .css
3
+ //= link latexpdf_manifest.js
@@ -2,8 +2,8 @@
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, or any plugin's
6
- * vendor/assets/stylesheets directory can be referenced here using a relative path.
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's 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
9
  * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
@@ -2,10 +2,10 @@ class TexController < ApplicationController
2
2
  layout false
3
3
 
4
4
  def example
5
- render "example.pdf.tex"
5
+ render "example"
6
6
  end
7
7
 
8
8
  def example2
9
- render "example2.pdf.tex"
9
+ render "example2"
10
10
  end
11
11
  end
@@ -2,10 +2,11 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>Dummy</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
5
6
  <%= csrf_meta_tags %>
6
7
  <%= csp_meta_tag %>
7
8
 
8
- <%= stylesheet_link_tag 'application', media: 'all' %>
9
+ <%= stylesheet_link_tag "application" %>
9
10
  </head>
10
11
 
11
12
  <body>
data/test/dummy/bin/rails CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
2
+ APP_PATH = File.expand_path("../config/application", __dir__)
3
+ require_relative "../config/boot"
4
+ require "rails/commands"
data/test/dummy/bin/rake CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
2
+ require_relative "../config/boot"
3
+ require "rake"
4
4
  Rake.application.run
data/test/dummy/bin/setup CHANGED
@@ -1,25 +1,33 @@
1
1
  #!/usr/bin/env ruby
2
- require 'fileutils'
2
+ require "fileutils"
3
3
 
4
4
  # path to your application root.
5
- APP_ROOT = File.expand_path('..', __dir__)
5
+ APP_ROOT = File.expand_path("..", __dir__)
6
6
 
7
7
  def system!(*args)
8
- system(*args) || abort("\n== Command #{args} failed ==")
8
+ system(*args, exception: true)
9
9
  end
10
10
 
11
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.
12
+ # This script is a way to set up or update your development environment automatically.
13
+ # This script is idempotent, so that you can run it at any time and get an expectable outcome.
14
14
  # Add necessary setup steps to this file.
15
15
 
16
- puts '== Installing dependencies =='
17
- system! 'gem install bundler --conservative'
18
- system('bundle check') || system!('bundle install')
16
+ puts "== Installing dependencies =="
17
+ system! "gem install bundler --conservative"
18
+ system("bundle check") || system!("bundle install")
19
+
20
+ # puts "\n== Copying sample files =="
21
+ # unless File.exist?("config/database.yml")
22
+ # FileUtils.cp "config/database.yml.sample", "config/database.yml"
23
+ # end
24
+
25
+ puts "\n== Preparing database =="
26
+ system! "bin/rails db:prepare"
19
27
 
20
28
  puts "\n== Removing old logs and tempfiles =="
21
- system! 'bin/rails log:clear tmp:clear'
29
+ system! "bin/rails log:clear tmp:clear"
22
30
 
23
31
  puts "\n== Restarting application server =="
24
- system! 'bin/rails restart'
32
+ system! "bin/rails restart"
25
33
  end
@@ -1,19 +1,11 @@
1
- require_relative 'boot'
2
-
3
- require "rails"
4
- # Pick the frameworks you want:
5
- require "active_model/railtie"
6
- require "active_job/railtie"
7
- # require "active_record/railtie"
8
- # require "active_storage/engine"
1
+ require_relative "boot"
2
+
3
+ require "sprockets/railtie"
4
+
9
5
  require "action_controller/railtie"
10
- # require "action_mailer/railtie"
11
- # require "action_mailbox/engine"
12
- # require "action_text/engine"
13
6
  require "action_view/railtie"
14
- # require "action_cable/engine"
15
- # require "sprockets/railtie"
16
- # require "rails/test_unit/railtie"
7
+ require "rails/test_unit/railtie"
8
+
17
9
 
18
10
  # Require the gems listed in Gemfile, including any gems
19
11
  # you've limited to :test, :development, or :production.
@@ -21,15 +13,22 @@ Bundler.require(*Rails.groups)
21
13
 
22
14
  module Dummy
23
15
  class Application < Rails::Application
24
- # Initialize configuration defaults for originally generated Rails version.
25
- config.load_defaults 6.0
16
+ config.load_defaults Rails::VERSION::STRING.to_f
17
+
18
+ # For compatibility with applications that use this config
19
+ config.action_controller.include_all_helpers = false
26
20
 
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.
21
+ # Please, add to the `ignore` list any other `lib` subdirectories that do
22
+ # not contain `.rb` files, or that should not be reloaded or eager loaded.
23
+ # Common ones are `templates`, `generators`, or `middleware`, for example.
24
+ config.autoload_lib(ignore: %w(assets tasks))
31
25
 
32
- # Don't generate system test files.
33
- config.generators.system_tests = nil
26
+ # Configuration for the application, engines, and railties goes here.
27
+ #
28
+ # These settings can be overridden in specific environments using the files
29
+ # in config/environments, which are processed later.
30
+ #
31
+ # config.time_zone = "Central Time (US & Canada)"
32
+ # config.eager_load_paths << Rails.root.join("extras")
34
33
  end
35
34
  end
@@ -1,5 +1,5 @@
1
1
  # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
2
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
3
3
 
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
4
+ require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
5
+ $LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require_relative 'application'
2
+ require_relative "application"
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,10 +1,12 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
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
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
6
8
  # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
9
+ config.enable_reloading = true
8
10
 
9
11
  # Do not eager load code on boot.
10
12
  config.eager_load = false
@@ -12,15 +14,18 @@ Rails.application.configure do
12
14
  # Show full error reports.
13
15
  config.consider_all_requests_local = true
14
16
 
17
+ # Enable server timing
18
+ config.server_timing = true
19
+
15
20
  # Enable/disable caching. By default caching is disabled.
16
21
  # Run rails dev:cache to toggle caching.
17
- if Rails.root.join('tmp', 'caching-dev.txt').exist?
22
+ if Rails.root.join("tmp/caching-dev.txt").exist?
18
23
  config.action_controller.perform_caching = true
19
24
  config.action_controller.enable_fragment_cache_logging = true
20
25
 
21
26
  config.cache_store = :memory_store
22
27
  config.public_file_server.headers = {
23
- 'Cache-Control' => "public, max-age=#{2.days.to_i}"
28
+ "Cache-Control" => "public, max-age=#{2.days.to_i}"
24
29
  }
25
30
  else
26
31
  config.action_controller.perform_caching = false
@@ -28,14 +33,44 @@ Rails.application.configure do
28
33
  config.cache_store = :null_store
29
34
  end
30
35
 
36
+ # Store uploaded files on the local file system (see config/storage.yml for options).
37
+ config.active_storage.service = :local
38
+
39
+ # Don't care if the mailer can't send.
40
+ config.action_mailer.raise_delivery_errors = false
41
+
42
+ config.action_mailer.perform_caching = false
43
+
31
44
  # Print deprecation notices to the Rails logger.
32
45
  config.active_support.deprecation = :log
33
46
 
47
+ # Raise exceptions for disallowed deprecations.
48
+ config.active_support.disallowed_deprecation = :raise
49
+
50
+ # Tell Active Support which deprecation messages to disallow.
51
+ config.active_support.disallowed_deprecation_warnings = []
52
+
53
+ # Raise an error on page load if there are pending migrations.
54
+ config.active_record.migration_error = :page_load
55
+
56
+ # Highlight code that triggered database queries in logs.
57
+ config.active_record.verbose_query_logs = true
58
+
59
+ # Highlight code that enqueued background job in logs.
60
+ config.active_job.verbose_enqueue_logs = true
61
+
62
+ # Suppress logger output for asset requests.
63
+ config.assets.quiet = true
34
64
 
35
65
  # Raises error for missing translations.
36
- # config.action_view.raise_on_missing_translations = true
66
+ # config.i18n.raise_on_missing_translations = true
67
+
68
+ # Annotate rendered view with file names.
69
+ # config.action_view.annotate_rendered_view_with_filenames = true
70
+
71
+ # Uncomment if you wish to allow Action Cable access from any origin.
72
+ # config.action_cable.disable_request_forgery_protection = true
37
73
 
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
74
+ # Raise error when a before_action's only/except options reference missing actions
75
+ config.action_controller.raise_on_missing_callback_actions = true
41
76
  end
@@ -1,8 +1,10 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  Rails.application.configure do
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
6
  # Code is not reloaded between requests.
5
- config.cache_classes = true
7
+ config.enable_reloading = false
6
8
 
7
9
  # Eager load code on boot. This eager loads most of Rails and
8
10
  # your application in memory, allowing both threaded web servers
@@ -11,79 +13,85 @@ Rails.application.configure do
11
13
  config.eager_load = true
12
14
 
13
15
  # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
16
+ config.consider_all_requests_local = false
15
17
  config.action_controller.perform_caching = true
16
18
 
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
+ # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
20
+ # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
19
21
  # config.require_master_key = true
20
22
 
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?
23
+ # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
24
+ # config.public_file_server.enabled = false
25
+
26
+ # Compress CSS using a preprocessor.
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fall back to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
24
31
 
25
32
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
26
- # config.action_controller.asset_host = 'http://assets.example.com'
33
+ # config.asset_host = "http://assets.example.com"
27
34
 
28
35
  # Specifies the header that your server uses for sending files.
29
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
30
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
37
+ # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
38
+
39
+ # Store uploaded files on the local file system (see config/storage.yml for options).
40
+ config.active_storage.service = :local
41
+
42
+ # Mount Action Cable outside main process or domain.
43
+ # config.action_cable.mount_path = nil
44
+ # config.action_cable.url = "wss://example.com/cable"
45
+ # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
46
+
47
+ # Assume all access to the app is happening through a SSL-terminating reverse proxy.
48
+ # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
49
+ # config.assume_ssl = true
31
50
 
32
51
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
33
- # config.force_ssl = true
52
+ config.force_ssl = true
34
53
 
35
- # Use the lowest log level to ensure availability of diagnostic information
36
- # when problems arise.
37
- config.log_level = :debug
54
+ # Log to STDOUT by default
55
+ config.logger = ActiveSupport::Logger.new(STDOUT)
56
+ .tap { |logger| logger.formatter = ::Logger::Formatter.new }
57
+ .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
38
58
 
39
59
  # Prepend all log lines with the following tags.
40
60
  config.log_tags = [ :request_id ]
41
61
 
62
+ # "info" includes generic and useful information about system operation, but avoids logging too much
63
+ # information to avoid inadvertent exposure of personally identifiable information (PII). If you
64
+ # want to log everything, set the level to "debug".
65
+ config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
66
+
42
67
  # Use a different cache store in production.
43
68
  # config.cache_store = :mem_cache_store
44
69
 
45
70
  # Use a real queuing backend for Active Job (and separate queues per environment).
46
- # config.active_job.queue_adapter = :resque
71
+ # config.active_job.queue_adapter = :resque
47
72
  # config.active_job.queue_name_prefix = "dummy_production"
48
73
 
74
+ config.action_mailer.perform_caching = false
75
+
76
+ # Ignore bad email addresses and do not raise email delivery errors.
77
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
78
+ # config.action_mailer.raise_delivery_errors = false
79
+
49
80
  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
50
81
  # the I18n.default_locale when a translation cannot be found).
51
82
  config.i18n.fallbacks = true
52
83
 
53
- # Send deprecation notices to registered listeners.
54
- config.active_support.deprecation = :notify
55
-
56
- # Use default logging formatter so that PID and timestamp are not suppressed.
57
- config.log_formatter = ::Logger::Formatter.new
58
-
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
84
+ # Don't log any deprecations.
85
+ config.active_support.report_deprecations = false
86
+
87
+ # Do not dump schema after migrations.
88
+ config.active_record.dump_schema_after_migration = false
89
+
90
+ # Enable DNS rebinding protection and other `Host` header attacks.
91
+ # config.hosts = [
92
+ # "example.com", # Allow requests from example.com
93
+ # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
94
+ # ]
95
+ # Skip DNS rebinding protection for the default health check endpoint.
96
+ # config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
89
97
  end
@@ -1,3 +1,5 @@
1
+ require "active_support/core_ext/integer/time"
2
+
1
3
  # The test environment is used exclusively to run your application's
2
4
  # test suite. You never need to work with it otherwise. Remember that
3
5
  # your test database is "scratch space" for the test suite and is wiped
@@ -6,33 +8,57 @@
6
8
  Rails.application.configure do
7
9
  # Settings specified here will take precedence over those in config/application.rb.
8
10
 
9
- config.cache_classes = false
11
+ # While tests run files are not watched, reloading is not necessary.
12
+ config.enable_reloading = false
10
13
 
11
- # Do not eager load code on boot. This avoids loading your whole application
12
- # just for the purpose of running a single test. If you are using a tool that
13
- # preloads Rails for running tests, you may have to set it to true.
14
- config.eager_load = false
14
+ # Eager loading loads your entire application. When running a single test locally,
15
+ # this is usually not necessary, and can slow down your test suite. However, it's
16
+ # recommended that you enable it in continuous integration systems to ensure eager
17
+ # loading is working properly before deploying your code.
18
+ config.eager_load = ENV["CI"].present?
15
19
 
16
20
  # Configure public file server for tests with Cache-Control for performance.
17
21
  config.public_file_server.enabled = true
18
22
  config.public_file_server.headers = {
19
- 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
23
+ "Cache-Control" => "public, max-age=#{1.hour.to_i}"
20
24
  }
21
25
 
22
26
  # Show full error reports and disable caching.
23
- config.consider_all_requests_local = true
27
+ config.consider_all_requests_local = true
24
28
  config.action_controller.perform_caching = false
25
29
  config.cache_store = :null_store
26
30
 
27
- # Raise exceptions instead of rendering exception templates.
28
- config.action_dispatch.show_exceptions = false
31
+ # Render exception templates for rescuable exceptions and raise for other exceptions.
32
+ config.action_dispatch.show_exceptions = :rescuable
29
33
 
30
34
  # Disable request forgery protection in test environment.
31
35
  config.action_controller.allow_forgery_protection = false
32
36
 
37
+ # Store uploaded files on the local file system in a temporary directory.
38
+ # config.active_storage.service = :test
39
+
40
+ # config.action_mailer.perform_caching = false
41
+
42
+ # Tell Action Mailer not to deliver emails to the real world.
43
+ # The :test delivery method accumulates sent emails in the
44
+ # ActionMailer::Base.deliveries array.
45
+ # config.action_mailer.delivery_method = :test
46
+
33
47
  # Print deprecation notices to the stderr.
34
48
  config.active_support.deprecation = :stderr
35
49
 
50
+ # Raise exceptions for disallowed deprecations.
51
+ config.active_support.disallowed_deprecation = :raise
52
+
53
+ # Tell Active Support which deprecation messages to disallow.
54
+ config.active_support.disallowed_deprecation_warnings = []
55
+
36
56
  # Raises error for missing translations.
37
- # config.action_view.raise_on_missing_translations = true
57
+ # config.i18n.raise_on_missing_translations = true
58
+
59
+ # Annotate rendered view with file names.
60
+ # config.action_view.annotate_rendered_view_with_filenames = true
61
+
62
+ # Raise error when a before_action's only/except options reference missing actions
63
+ config.action_controller.raise_on_missing_callback_actions = true
38
64
  end
@@ -1,28 +1,25 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy
4
- # For further information see the following documentation
5
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
6
 
7
- # Rails.application.config.content_security_policy do |policy|
8
- # policy.default_src :self, :https
9
- # policy.font_src :self, :https, :data
10
- # policy.img_src :self, :https, :data
11
- # policy.object_src :none
12
- # policy.script_src :self, :https
13
- # policy.style_src :self, :https
14
-
15
- # # Specify URI for violation reports
16
- # # policy.report_uri "/csp-violation-report-endpoint"
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap, inline scripts, and inline styles.
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src style-src)
22
+ #
23
+ # # Report violations without enforcing the policy.
24
+ # # config.content_security_policy_report_only = true
17
25
  # end
18
-
19
- # If you are using UJS then enable automatic nonce generation
20
- # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
-
22
- # Set the nonce only to specific directives
23
- # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
24
-
25
- # Report CSP violations to a specified URI
26
- # For further information see the following documentation:
27
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
28
- # Rails.application.config.content_security_policy_report_only = true
@@ -1,4 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
3
+ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file.
4
+ # Use this to limit dissemination of sensitive information.
5
+ # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
6
+ Rails.application.config.filter_parameters += [
7
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
8
+ ]
@@ -4,13 +4,13 @@
4
4
  # are locale specific, and you may define rules for as many different
5
5
  # locales as you wish. All of these examples are active by default:
6
6
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
7
+ # inflect.plural /^(ox)$/i, "\\1en"
8
+ # inflect.singular /^(ox)en/i, "\\1"
9
+ # inflect.irregular "person", "people"
10
10
  # inflect.uncountable %w( fish sheep )
11
11
  # end
12
12
 
13
13
  # These inflection rules are supported but not enabled by default:
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
15
+ # inflect.acronym "RESTful"
16
16
  # end