dryer-config 6.1.4 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -1
- data/MIT-LICENSE +3 -1
- data/README.md +28 -31
- data/config/boot.rb +1 -1
- data/config/cable.yml +1 -1
- data/config/database.yml +4 -4
- data/config/environments/development.rb +11 -11
- data/config/environments/production.rb +34 -57
- data/config/environments/test.rb +12 -8
- data/config/importmap.rb +7 -0
- data/config/initializers/assets.rb +1 -3
- data/config/initializers/content_security_policy.rb +21 -26
- data/config/initializers/filter_parameter_logging.rb +3 -1
- data/config/initializers/inflections.rb +4 -4
- data/config/initializers/permissions_policy.rb +11 -9
- data/config/puma.rb +12 -20
- data/config/storage.yml +5 -5
- data/dryer-config.gemspec +2 -9
- data/lib/dryer-config/version.rb +6 -4
- metadata +8 -46
- data/config/initializers/application_controller_renderer.rb +0 -8
- data/config/initializers/backtrace_silencers.rb +0 -8
- data/config/initializers/cookies_serializer.rb +0 -5
- data/config/initializers/mime_types.rb +0 -4
- data/config/initializers/wrap_parameters.rb +0 -14
- data/config/spring.rb +0 -6
- data/config/webpack/development.js +0 -5
- data/config/webpack/environment.js +0 -3
- data/config/webpack/production.js +0 -5
- data/config/webpack/test.js +0 -5
- data/config/webpacker.yml +0 -92
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 544f1ae9a3f4fc1ca6f8db135da6c84ef4037f51748f28320092a0f64e6d21ce
|
4
|
+
data.tar.gz: 7bad8361981a43f151c5a5c9d2d1754df713a8122c981b4866d7a0a6429ae4a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70db039f17d65d4ccd0f7cfe337ab12e99361a07d129d0436712c48ebd06325d412f70a135cf0e11d11097c8739b51f61f0cd2406f4bdca15f9129c042c67f3f
|
7
|
+
data.tar.gz: 9405afb279831775d4e71a8619cb7cd9934d4babdcf44961cd88ab76ff2e9eb4a054d938e77cb7e43df5337a847076c9215448eb352be206f7246baa577ff588
|
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rails-7.1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.
|
1
|
+
ruby-3.2.2
|
data/MIT-LICENSE
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016-2023 Dittmar Krall (www.matiq.com)
|
2
4
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
4
6
|
a copy of this software and associated documentation files (the
|
data/README.md
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
-
DryerConfig
|
2
|
-
===========
|
1
|
+
# DryerConfig
|
3
2
|
|
4
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/dryer-config.png)](http://badge.fury.io/rb/dryer-config)
|
4
|
+
|
5
|
+
Contains most of the files of a pristine `rails new` `config` directories.
|
5
6
|
They will be available to your application by
|
6
7
|
the engine nature of this gem.
|
7
8
|
|
8
|
-
Your private
|
9
|
+
Your private `config` directory (and your repository)
|
9
10
|
will contain just your particular requirements/options
|
10
|
-
(e.g. config/database.yml).
|
11
|
+
(e.g. `config/database.yml`).
|
11
12
|
|
12
13
|
Version numbering is according to the Rails versions, e.g. use
|
13
14
|
|
@@ -17,37 +18,36 @@ or
|
|
17
18
|
|
18
19
|
gem 'dryer-config', '~> 5.2' # expected to serve Rails 5.2.*
|
19
20
|
|
20
|
-
in your Gemfile
|
21
|
+
in your `Gemfile`.
|
21
22
|
|
22
|
-
It is expected that the version
|
23
|
-
complete Rails
|
23
|
+
It is expected that the version 7.0.0 is fine for the
|
24
|
+
complete Rails 7 serie.
|
24
25
|
If not, a new version of this gem will be released (hopefully).
|
25
26
|
|
26
|
-
Why
|
27
|
-
---
|
27
|
+
## Why
|
28
28
|
|
29
29
|
Usually I run several applications based on the same Rails on one server.
|
30
30
|
There is no need to waste disk space (mostly irrelevant today,
|
31
31
|
but I still don't like wasting).
|
32
32
|
|
33
|
-
Several
|
33
|
+
Several `config` files will be out of the way (less attention)
|
34
34
|
for the developer.
|
35
35
|
|
36
36
|
Lastly, during the port of a Rails application to another version
|
37
37
|
a pristine configuration is handy.
|
38
|
-
The few remaining options in your
|
38
|
+
The few remaining options in your `config` files needs
|
39
39
|
less attention/work.
|
40
40
|
|
41
|
-
Installation
|
42
|
-
------------
|
43
|
-
To install add the following to your Gemfile (e.g.):
|
44
|
-
|
45
|
-
gem 'dryer-config', '~> 6.0'
|
41
|
+
## Installation
|
46
42
|
|
47
|
-
|
43
|
+
As usual:
|
44
|
+
```ruby
|
45
|
+
# Gemfile
|
46
|
+
gem "dryer-config", "~> 7.1"
|
47
|
+
```
|
48
|
+
and run `bundle install`.
|
48
49
|
|
49
|
-
Rails 6.0.0
|
50
|
-
-----------
|
50
|
+
## Rails 7.1.0, 7.0.0, 6.0.0, 5.2.0
|
51
51
|
|
52
52
|
See also "Configuration" below.
|
53
53
|
|
@@ -57,15 +57,6 @@ Create your own (there are still there for inspection):
|
|
57
57
|
|
58
58
|
The Webpacker files may require your attention:
|
59
59
|
|
60
|
-
Rails 5.2.0
|
61
|
-
-----------
|
62
|
-
|
63
|
-
See also Configuration below.
|
64
|
-
|
65
|
-
Create your own (there are still there for inspection):
|
66
|
-
|
67
|
-
./config/storage.yml
|
68
|
-
|
69
60
|
Configuration
|
70
61
|
-------------
|
71
62
|
|
@@ -96,7 +87,13 @@ The following file requires your attention:
|
|
96
87
|
|
97
88
|
Create your own. It will run after the one from the gem.
|
98
89
|
|
99
|
-
See also
|
100
|
-
--------
|
90
|
+
## See also
|
101
91
|
|
102
92
|
http://railsdiff.org/
|
93
|
+
|
94
|
+
## Miscellaneous
|
95
|
+
|
96
|
+
Copyright (c) 2016-2023 Dittmar Krall (www.matiq.com),
|
97
|
+
released under the MIT license:
|
98
|
+
|
99
|
+
* https://opensource.org/licenses/MIT
|
data/config/boot.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
2
2
|
|
3
3
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
4
4
|
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
data/config/cable.yml
CHANGED
data/config/database.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# gem install sqlite3
|
3
3
|
#
|
4
4
|
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
-
# gem
|
5
|
+
# gem "sqlite3"
|
6
6
|
#
|
7
7
|
default: &default
|
8
8
|
adapter: sqlite3
|
@@ -11,15 +11,15 @@ default: &default
|
|
11
11
|
|
12
12
|
development:
|
13
13
|
<<: *default
|
14
|
-
database:
|
14
|
+
database: storage/development.sqlite3
|
15
15
|
|
16
16
|
# Warning: The database defined as "test" will be erased and
|
17
17
|
# re-generated from your development database when you run "rake".
|
18
18
|
# Do not set this db to the same as development or production.
|
19
19
|
test:
|
20
20
|
<<: *default
|
21
|
-
database:
|
21
|
+
database: storage/test.sqlite3
|
22
22
|
|
23
23
|
production:
|
24
24
|
<<: *default
|
25
|
-
database:
|
25
|
+
database: storage/production.sqlite3
|
@@ -6,7 +6,7 @@ Rails.application.configure do
|
|
6
6
|
# In the development environment your application's code is reloaded any time
|
7
7
|
# it changes. This slows down response time but is perfect for development
|
8
8
|
# since you don't have to restart the web server when you make code changes.
|
9
|
-
config.
|
9
|
+
config.enable_reloading = true
|
10
10
|
|
11
11
|
# Do not eager load code on boot.
|
12
12
|
config.eager_load = false
|
@@ -14,15 +14,18 @@ Rails.application.configure do
|
|
14
14
|
# Show full error reports.
|
15
15
|
config.consider_all_requests_local = true
|
16
16
|
|
17
|
+
# Enable server timing
|
18
|
+
config.server_timing = true
|
19
|
+
|
17
20
|
# Enable/disable caching. By default caching is disabled.
|
18
21
|
# Run rails dev:cache to toggle caching.
|
19
|
-
if Rails.root.join(
|
22
|
+
if Rails.root.join("tmp/caching-dev.txt").exist?
|
20
23
|
config.action_controller.perform_caching = true
|
21
24
|
config.action_controller.enable_fragment_cache_logging = true
|
22
25
|
|
23
26
|
config.cache_store = :memory_store
|
24
27
|
config.public_file_server.headers = {
|
25
|
-
|
28
|
+
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
26
29
|
}
|
27
30
|
else
|
28
31
|
config.action_controller.perform_caching = false
|
@@ -53,10 +56,8 @@ Rails.application.configure do
|
|
53
56
|
# Highlight code that triggered database queries in logs.
|
54
57
|
config.active_record.verbose_query_logs = true
|
55
58
|
|
56
|
-
#
|
57
|
-
|
58
|
-
# number of complex assets.
|
59
|
-
config.assets.debug = true
|
59
|
+
# Highlight code that enqueued background job in logs.
|
60
|
+
config.active_job.verbose_enqueue_logs = true
|
60
61
|
|
61
62
|
# Suppress logger output for asset requests.
|
62
63
|
config.assets.quiet = true
|
@@ -67,10 +68,9 @@ Rails.application.configure do
|
|
67
68
|
# Annotate rendered view with file names.
|
68
69
|
# config.action_view.annotate_rendered_view_with_filenames = true
|
69
70
|
|
70
|
-
# Use an evented file watcher to asynchronously detect changes in source code,
|
71
|
-
# routes, locales, etc. This feature depends on the listen gem.
|
72
|
-
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
73
|
-
|
74
71
|
# Uncomment if you wish to allow Action Cable access from any origin.
|
75
72
|
# config.action_cable.disable_request_forgery_protection = true
|
73
|
+
|
74
|
+
# Raise error when a before_action's only/except options reference missing actions
|
75
|
+
config.action_controller.raise_on_missing_callback_actions = true
|
76
76
|
end
|
@@ -4,7 +4,7 @@ Rails.application.configure do
|
|
4
4
|
# Settings specified here will take precedence over those in config/application.rb.
|
5
5
|
|
6
6
|
# Code is not reloaded between requests.
|
7
|
-
config.
|
7
|
+
config.enable_reloading = false
|
8
8
|
|
9
9
|
# Eager load code on boot. This eager loads most of Rails and
|
10
10
|
# your application in memory, allowing both threaded web servers
|
@@ -16,13 +16,12 @@ Rails.application.configure do
|
|
16
16
|
config.consider_all_requests_local = false
|
17
17
|
config.action_controller.perform_caching = true
|
18
18
|
|
19
|
-
# Ensures that a master key has been made available in
|
20
|
-
#
|
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).
|
21
21
|
# config.require_master_key = true
|
22
22
|
|
23
|
-
#
|
24
|
-
|
25
|
-
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
23
|
+
# Enable static file serving from the `/public` folder (turn off if using NGINX/Apache for it).
|
24
|
+
config.public_file_server.enabled = true
|
26
25
|
|
27
26
|
# Compress CSS using a preprocessor.
|
28
27
|
# config.assets.css_compressor = :sass
|
@@ -31,36 +30,46 @@ Rails.application.configure do
|
|
31
30
|
config.assets.compile = false
|
32
31
|
|
33
32
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
34
|
-
# config.asset_host =
|
33
|
+
# config.asset_host = "http://assets.example.com"
|
35
34
|
|
36
35
|
# Specifies the header that your server uses for sending files.
|
37
|
-
# config.action_dispatch.x_sendfile_header =
|
38
|
-
# config.action_dispatch.x_sendfile_header =
|
36
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
37
|
+
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
39
38
|
|
40
39
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
41
40
|
config.active_storage.service = :local
|
42
41
|
|
43
42
|
# Mount Action Cable outside main process or domain.
|
44
43
|
# config.action_cable.mount_path = nil
|
45
|
-
# config.action_cable.url =
|
46
|
-
# config.action_cable.allowed_request_origins = [
|
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
|
47
50
|
|
48
51
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
49
|
-
|
52
|
+
config.force_ssl = true
|
50
53
|
|
51
|
-
#
|
52
|
-
|
53
|
-
|
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) }
|
54
58
|
|
55
59
|
# Prepend all log lines with the following tags.
|
56
60
|
config.log_tags = [ :request_id ]
|
57
61
|
|
62
|
+
# Info include 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
|
+
|
58
67
|
# Use a different cache store in production.
|
59
68
|
# config.cache_store = :mem_cache_store
|
60
69
|
|
61
70
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
62
71
|
# config.active_job.queue_adapter = :resque
|
63
|
-
# config.active_job.queue_name_prefix = "
|
72
|
+
# config.active_job.queue_name_prefix = "sample_7_1_0_production"
|
64
73
|
|
65
74
|
config.action_mailer.perform_caching = false
|
66
75
|
|
@@ -72,49 +81,17 @@ Rails.application.configure do
|
|
72
81
|
# the I18n.default_locale when a translation cannot be found).
|
73
82
|
config.i18n.fallbacks = true
|
74
83
|
|
75
|
-
#
|
76
|
-
config.active_support.
|
77
|
-
|
78
|
-
# Log disallowed deprecations.
|
79
|
-
config.active_support.disallowed_deprecation = :log
|
80
|
-
|
81
|
-
# Tell Active Support which deprecation messages to disallow.
|
82
|
-
config.active_support.disallowed_deprecation_warnings = []
|
83
|
-
|
84
|
-
# Use default logging formatter so that PID and timestamp are not suppressed.
|
85
|
-
config.log_formatter = ::Logger::Formatter.new
|
86
|
-
|
87
|
-
# Use a different logger for distributed setups.
|
88
|
-
# require "syslog/logger"
|
89
|
-
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
90
|
-
|
91
|
-
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
92
|
-
logger = ActiveSupport::Logger.new(STDOUT)
|
93
|
-
logger.formatter = config.log_formatter
|
94
|
-
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
95
|
-
end
|
84
|
+
# Don't log any deprecations.
|
85
|
+
config.active_support.report_deprecations = false
|
96
86
|
|
97
87
|
# Do not dump schema after migrations.
|
98
88
|
config.active_record.dump_schema_after_migration = false
|
99
89
|
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
# The `database_resolver_context` class is used by the middleware to set
|
109
|
-
# timestamps for the last write to the primary. The resolver uses the context
|
110
|
-
# class timestamps to determine how long to wait before reading from the
|
111
|
-
# replica.
|
112
|
-
#
|
113
|
-
# By default Rails will store a last write timestamp in the session. The
|
114
|
-
# DatabaseSelector middleware is designed as such you can define your own
|
115
|
-
# strategy for connection switching and pass that into the middleware through
|
116
|
-
# these configuration options.
|
117
|
-
# config.active_record.database_selector = { delay: 2.seconds }
|
118
|
-
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
119
|
-
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
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" } }
|
120
97
|
end
|
data/config/environments/test.rb
CHANGED
@@ -8,18 +8,19 @@ require "active_support/core_ext/integer/time"
|
|
8
8
|
Rails.application.configure do
|
9
9
|
# Settings specified here will take precedence over those in config/application.rb.
|
10
10
|
|
11
|
-
|
12
|
-
config.
|
11
|
+
# While tests run files are not watched, reloading is not necessary.
|
12
|
+
config.enable_reloading = false
|
13
13
|
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
|
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?
|
18
19
|
|
19
20
|
# Configure public file server for tests with Cache-Control for performance.
|
20
21
|
config.public_file_server.enabled = true
|
21
22
|
config.public_file_server.headers = {
|
22
|
-
|
23
|
+
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
23
24
|
}
|
24
25
|
|
25
26
|
# Show full error reports and disable caching.
|
@@ -28,7 +29,7 @@ Rails.application.configure do
|
|
28
29
|
config.cache_store = :null_store
|
29
30
|
|
30
31
|
# Raise exceptions instead of rendering exception templates.
|
31
|
-
config.action_dispatch.show_exceptions =
|
32
|
+
config.action_dispatch.show_exceptions = :rescuable
|
32
33
|
|
33
34
|
# Disable request forgery protection in test environment.
|
34
35
|
config.action_controller.allow_forgery_protection = false
|
@@ -57,4 +58,7 @@ Rails.application.configure do
|
|
57
58
|
|
58
59
|
# Annotate rendered view with file names.
|
59
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
|
60
64
|
end
|
data/config/importmap.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Pin npm packages by running ./bin/importmap
|
2
|
+
|
3
|
+
pin "application", preload: true
|
4
|
+
pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
|
5
|
+
pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true
|
6
|
+
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true
|
7
|
+
pin_all_from "app/javascript/controllers", under: "controllers"
|
@@ -1,12 +1,10 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
4
|
-
Rails.application.config.assets.version =
|
4
|
+
Rails.application.config.assets.version = "1.0"
|
5
5
|
|
6
6
|
# Add additional assets to the asset load path.
|
7
7
|
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
-
# Add Yarn node_modules folder to the asset load path.
|
9
|
-
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
10
8
|
|
11
9
|
# Precompile additional assets.
|
12
10
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
@@ -1,30 +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
|
-
#
|
5
|
-
# https://
|
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.
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
#
|
18
|
-
#
|
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
|
19
25
|
# end
|
20
|
-
|
21
|
-
# If you are using UJS then enable automatic nonce generation
|
22
|
-
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
23
|
-
|
24
|
-
# Set the nonce only to specific directives
|
25
|
-
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
26
|
-
|
27
|
-
# Report CSP violations to a specified URI
|
28
|
-
# For further information see the following documentation:
|
29
|
-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
30
|
-
# Rails.application.config.content_security_policy_report_only = true
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Configure
|
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.
|
4
6
|
Rails.application.config.filter_parameters += [
|
5
7
|
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
6
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,
|
8
|
-
# inflect.singular /^(ox)en/i,
|
9
|
-
# inflect.irregular
|
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
|
15
|
+
# inflect.acronym "RESTful"
|
16
16
|
# end
|
@@ -1,11 +1,13 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
1
3
|
# Define an application-wide HTTP permissions policy. For further
|
2
|
-
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
3
|
-
|
4
|
-
# Rails.application.config.permissions_policy do |
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
4
|
+
# information see: https://developers.google.com/web/updates/2018/06/feature-policy
|
5
|
+
|
6
|
+
# Rails.application.config.permissions_policy do |policy|
|
7
|
+
# policy.camera :none
|
8
|
+
# policy.gyroscope :none
|
9
|
+
# policy.microphone :none
|
10
|
+
# policy.usb :none
|
11
|
+
# policy.fullscreen :self
|
12
|
+
# policy.payment :self, "https://secure.example.com"
|
11
13
|
# end
|
data/config/puma.rb
CHANGED
@@ -1,43 +1,35 @@
|
|
1
|
+
# This configuration file will be evaluated by Puma. The top-level methods that
|
2
|
+
# are invoked here are part of Puma's configuration DSL. For more information
|
3
|
+
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
|
4
|
+
|
1
5
|
# Puma can serve each request in a thread from an internal thread pool.
|
2
6
|
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
7
|
# Any libraries that use thread pools should be configured to match
|
4
8
|
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
9
|
# and maximum; this matches the default thread size of Active Record.
|
6
|
-
#
|
7
10
|
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
11
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
9
12
|
threads min_threads_count, max_threads_count
|
10
13
|
|
14
|
+
# Specifies that the worker count should equal the number of processors in production.
|
15
|
+
if ENV["RAILS_ENV"] == "production"
|
16
|
+
require "concurrent-ruby"
|
17
|
+
worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count })
|
18
|
+
workers worker_count if worker_count > 1
|
19
|
+
end
|
20
|
+
|
11
21
|
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
12
22
|
# terminating a worker in development environments.
|
13
|
-
#
|
14
23
|
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
15
24
|
|
16
25
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
17
|
-
#
|
18
26
|
port ENV.fetch("PORT") { 3000 }
|
19
27
|
|
20
28
|
# Specifies the `environment` that Puma will run in.
|
21
|
-
#
|
22
29
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
23
30
|
|
24
31
|
# Specifies the `pidfile` that Puma will use.
|
25
32
|
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
26
33
|
|
27
|
-
#
|
28
|
-
# Workers are forked web server processes. If using threads and workers together
|
29
|
-
# the concurrency of the application would be max `threads` * `workers`.
|
30
|
-
# Workers do not work on JRuby or Windows (both of which do not support
|
31
|
-
# processes).
|
32
|
-
#
|
33
|
-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
34
|
-
|
35
|
-
# Use the `preload_app!` method when specifying a `workers` number.
|
36
|
-
# This directive tells Puma to first boot the application and load code
|
37
|
-
# before forking the application. This takes advantage of Copy On Write
|
38
|
-
# process behavior so workers use less memory.
|
39
|
-
#
|
40
|
-
# preload_app!
|
41
|
-
|
42
|
-
# Allow puma to be restarted by `rails restart` command.
|
34
|
+
# Allow puma to be restarted by `bin/rails restart` command.
|
43
35
|
plugin :tmp_restart
|
data/config/storage.yml
CHANGED
@@ -6,27 +6,27 @@ local:
|
|
6
6
|
service: Disk
|
7
7
|
root: <%= Rails.root.join("storage") %>
|
8
8
|
|
9
|
-
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
9
|
+
# Use bin/rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
10
|
# amazon:
|
11
11
|
# service: S3
|
12
12
|
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
13
|
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
14
|
# region: us-east-1
|
15
|
-
# bucket: your_own_bucket
|
15
|
+
# bucket: your_own_bucket-<%= Rails.env %>
|
16
16
|
|
17
17
|
# Remember not to checkin your GCS keyfile to a repository
|
18
18
|
# google:
|
19
19
|
# service: GCS
|
20
20
|
# project: your_project
|
21
21
|
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
-
# bucket: your_own_bucket
|
22
|
+
# bucket: your_own_bucket-<%= Rails.env %>
|
23
23
|
|
24
|
-
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
24
|
+
# Use bin/rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
25
|
# microsoft:
|
26
26
|
# service: AzureStorage
|
27
27
|
# storage_account_name: your_account_name
|
28
28
|
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
-
# container: your_container_name
|
29
|
+
# container: your_container_name-<%= Rails.env %>
|
30
30
|
|
31
31
|
# mirror:
|
32
32
|
# service: Mirror
|
data/dryer-config.gemspec
CHANGED
@@ -9,20 +9,13 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.summary = "Several pristine Rails config files."
|
10
10
|
s.description = "Outsource several config files to a gem."
|
11
11
|
s.authors = ['Dittmar Krall']
|
12
|
-
s.email = ['dittmar.krall@
|
13
|
-
s.homepage = '
|
12
|
+
s.email = ['dittmar.krall@matiq.com']
|
13
|
+
s.homepage = 'https://github.com/matique/dryer-config'
|
14
14
|
s.license = 'MIT'
|
15
15
|
s.platform = Gem::Platform::RUBY
|
16
16
|
|
17
|
-
s.metadata['source_code_uri'] = 'https://github.com/matique/dryer-config'
|
18
|
-
|
19
17
|
s.files = `git ls-files`.split("\n")
|
20
|
-
# s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
-
# s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
18
|
s.require_paths = ["lib"]
|
23
19
|
|
24
20
|
s.add_development_dependency 'bundler'
|
25
|
-
s.add_development_dependency 'rake'
|
26
|
-
|
27
|
-
s.add_development_dependency 'minitest'
|
28
21
|
end
|
data/lib/dryer-config/version.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module DryerConfig
|
2
|
-
VERSION = '
|
3
|
-
# VERSION = '
|
4
|
-
# VERSION = '6.
|
5
|
-
# VERSION = '6.0.
|
2
|
+
VERSION = '7.1.0' # 2023-10-15
|
3
|
+
# VERSION = '7.0.0' # 2021-12-18
|
4
|
+
# VERSION = '6.1.4' # 2021-06-27
|
5
|
+
# VERSION = '6.0.3' # 2020-05-08
|
6
|
+
# VERSION = '6.0.2' # 2020-02-25
|
7
|
+
# VERSION = '6.0.0' # 2019-10-07
|
6
8
|
# VERSION = '5.2.0'
|
7
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryer-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -24,42 +24,15 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
27
|
description: Outsource several config files to a gem.
|
56
28
|
email:
|
57
|
-
- dittmar.krall@
|
29
|
+
- dittmar.krall@matiq.com
|
58
30
|
executables: []
|
59
31
|
extensions: []
|
60
32
|
extra_rdoc_files: []
|
61
33
|
files:
|
62
34
|
- ".gitignore"
|
35
|
+
- ".ruby-gemset"
|
63
36
|
- ".ruby-version"
|
64
37
|
- MIT-LICENSE
|
65
38
|
- README.md
|
@@ -72,33 +45,22 @@ files:
|
|
72
45
|
- config/environments/development.rb
|
73
46
|
- config/environments/production.rb
|
74
47
|
- config/environments/test.rb
|
75
|
-
- config/
|
48
|
+
- config/importmap.rb
|
76
49
|
- config/initializers/assets.rb
|
77
|
-
- config/initializers/backtrace_silencers.rb
|
78
50
|
- config/initializers/content_security_policy.rb
|
79
|
-
- config/initializers/cookies_serializer.rb
|
80
51
|
- config/initializers/filter_parameter_logging.rb
|
81
52
|
- config/initializers/inflections.rb
|
82
|
-
- config/initializers/mime_types.rb
|
83
53
|
- config/initializers/permissions_policy.rb
|
84
|
-
- config/initializers/wrap_parameters.rb
|
85
54
|
- config/puma.rb
|
86
|
-
- config/spring.rb
|
87
55
|
- config/storage.yml
|
88
|
-
- config/webpack/development.js
|
89
|
-
- config/webpack/environment.js
|
90
|
-
- config/webpack/production.js
|
91
|
-
- config/webpack/test.js
|
92
|
-
- config/webpacker.yml
|
93
56
|
- dryer-config.gemspec
|
94
57
|
- lib/dryer-config.rb
|
95
58
|
- lib/dryer-config/engine.rb
|
96
59
|
- lib/dryer-config/version.rb
|
97
|
-
homepage:
|
60
|
+
homepage: https://github.com/matique/dryer-config
|
98
61
|
licenses:
|
99
62
|
- MIT
|
100
|
-
metadata:
|
101
|
-
source_code_uri: https://github.com/matique/dryer-config
|
63
|
+
metadata: {}
|
102
64
|
post_install_message:
|
103
65
|
rdoc_options: []
|
104
66
|
require_paths:
|
@@ -114,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
76
|
- !ruby/object:Gem::Version
|
115
77
|
version: '0'
|
116
78
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
79
|
+
rubygems_version: 3.4.20
|
118
80
|
signing_key:
|
119
81
|
specification_version: 4
|
120
82
|
summary: Several pristine Rails config files.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
|
7
|
-
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
|
8
|
-
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
data/config/spring.rb
DELETED
data/config/webpack/test.js
DELETED
data/config/webpacker.yml
DELETED
@@ -1,92 +0,0 @@
|
|
1
|
-
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
2
|
-
|
3
|
-
default: &default
|
4
|
-
source_path: app/javascript
|
5
|
-
source_entry_path: packs
|
6
|
-
public_root_path: public
|
7
|
-
public_output_path: packs
|
8
|
-
cache_path: tmp/cache/webpacker
|
9
|
-
webpack_compile_output: true
|
10
|
-
|
11
|
-
# Additional paths webpack should lookup modules
|
12
|
-
# ['app/assets', 'engine/foo/app/assets']
|
13
|
-
additional_paths: []
|
14
|
-
|
15
|
-
# Reload manifest.json on all requests so we reload latest compiled packs
|
16
|
-
cache_manifest: false
|
17
|
-
|
18
|
-
# Extract and emit a css file
|
19
|
-
extract_css: false
|
20
|
-
|
21
|
-
static_assets_extensions:
|
22
|
-
- .jpg
|
23
|
-
- .jpeg
|
24
|
-
- .png
|
25
|
-
- .gif
|
26
|
-
- .tiff
|
27
|
-
- .ico
|
28
|
-
- .svg
|
29
|
-
- .eot
|
30
|
-
- .otf
|
31
|
-
- .ttf
|
32
|
-
- .woff
|
33
|
-
- .woff2
|
34
|
-
|
35
|
-
extensions:
|
36
|
-
- .mjs
|
37
|
-
- .js
|
38
|
-
- .sass
|
39
|
-
- .scss
|
40
|
-
- .css
|
41
|
-
- .module.sass
|
42
|
-
- .module.scss
|
43
|
-
- .module.css
|
44
|
-
- .png
|
45
|
-
- .svg
|
46
|
-
- .gif
|
47
|
-
- .jpeg
|
48
|
-
- .jpg
|
49
|
-
|
50
|
-
development:
|
51
|
-
<<: *default
|
52
|
-
compile: true
|
53
|
-
|
54
|
-
# Reference: https://webpack.js.org/configuration/dev-server/
|
55
|
-
dev_server:
|
56
|
-
https: false
|
57
|
-
host: localhost
|
58
|
-
port: 3035
|
59
|
-
public: localhost:3035
|
60
|
-
hmr: false
|
61
|
-
# Inline should be set to true if using HMR
|
62
|
-
inline: true
|
63
|
-
overlay: true
|
64
|
-
compress: true
|
65
|
-
disable_host_check: true
|
66
|
-
use_local_ip: false
|
67
|
-
quiet: false
|
68
|
-
pretty: false
|
69
|
-
headers:
|
70
|
-
'Access-Control-Allow-Origin': '*'
|
71
|
-
watch_options:
|
72
|
-
ignored: '**/node_modules/**'
|
73
|
-
|
74
|
-
|
75
|
-
test:
|
76
|
-
<<: *default
|
77
|
-
compile: true
|
78
|
-
|
79
|
-
# Compile test packs to a separate directory
|
80
|
-
public_output_path: packs-test
|
81
|
-
|
82
|
-
production:
|
83
|
-
<<: *default
|
84
|
-
|
85
|
-
# Production depends on precompilation of packs prior to booting for performance.
|
86
|
-
compile: false
|
87
|
-
|
88
|
-
# Extract and emit a css file
|
89
|
-
extract_css: true
|
90
|
-
|
91
|
-
# Cache manifest.json for performance
|
92
|
-
cache_manifest: true
|