dryer-config 5.1.0 → 6.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -0
- data/MIT-LICENSE +1 -1
- data/README.md +31 -7
- data/Rakefile +4 -11
- data/config.ru +2 -1
- data/config/boot.rb +2 -1
- data/config/cable.yml +3 -3
- data/config/database.yml +1 -1
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +28 -6
- data/config/environments/production.rb +45 -16
- data/config/environments/test.rb +26 -8
- data/config/initializers/application_controller_renderer.rb +6 -4
- data/config/initializers/backtrace_silencers.rb +4 -3
- data/config/initializers/content_security_policy.rb +30 -0
- data/config/initializers/filter_parameter_logging.rb +3 -1
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/puma.rb +14 -27
- data/config/spring.rb +6 -6
- data/config/storage.yml +34 -0
- data/config/webpack/development.js +5 -0
- data/config/webpack/environment.js +3 -0
- data/config/webpack/production.js +5 -0
- data/config/webpack/test.js +5 -0
- data/config/webpacker.yml +92 -0
- data/dryer-config.gemspec +7 -2
- data/lib/dryer-config/version.rb +5 -1
- metadata +32 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2181884f548ada0f37b870c42469f91bc94fb17ea3f3e04d4ac5b74926aa62e4
|
4
|
+
data.tar.gz: 35ccc535fa685cdba70ce5498231bd1c8c0c268436d54cbace0d1b77ae7ef444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adf1dd3349be507816fb0d6bb513555a96565268f2d129f125b77791dc4d8af1dbe4c00162800280aeaa805336060be3262edeb7ecaab3e9c945ae7dc84cd9ff
|
7
|
+
data.tar.gz: 57aa04b15d9cc7a5006e933365ebb02f8237e84bf2d672658f01349d3fe74e53ee5f290238dd98f89adb0359b7fd998802b82f9351a36dd2b9afcd4cc0430add
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-3.0.1
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,11 @@ will contain just your particular requirements/options
|
|
11
11
|
|
12
12
|
Version numbering is according to the Rails versions, e.g. use
|
13
13
|
|
14
|
-
gem 'dryer-config', '=
|
14
|
+
gem 'dryer-config', '= 6.0.0' # for a Rails 6.0.0 applications
|
15
|
+
|
16
|
+
or
|
17
|
+
|
18
|
+
gem 'dryer-config', '~> 5.2' # expected to serve Rails 5.2.*
|
15
19
|
|
16
20
|
in your Gemfile.
|
17
21
|
|
@@ -38,35 +42,55 @@ Installation
|
|
38
42
|
------------
|
39
43
|
To install add the following to your Gemfile (e.g.):
|
40
44
|
|
41
|
-
gem 'dryer-config', '~>
|
45
|
+
gem 'dryer-config', '~> 6.0'
|
42
46
|
|
43
47
|
and run bundle.
|
44
48
|
|
49
|
+
Rails 6.0.0
|
50
|
+
-----------
|
51
|
+
|
52
|
+
See also "Configuration" below.
|
53
|
+
|
54
|
+
Create your own (there are still there for inspection):
|
55
|
+
|
56
|
+
./config/storage.yml
|
57
|
+
|
58
|
+
The Webpacker files may require your attention:
|
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
|
+
|
45
69
|
Configuration
|
46
70
|
-------------
|
47
71
|
|
48
72
|
The following original config files have been dropped:
|
49
73
|
|
50
74
|
./config/application.rb
|
51
|
-
./config/
|
75
|
+
./config/credentials.yml.enc
|
52
76
|
./config/locales/*
|
77
|
+
./config/master.key
|
53
78
|
./config/routes.rb
|
54
|
-
./config/secrets.yml
|
55
79
|
|
56
80
|
Create your owns.
|
57
81
|
|
58
|
-
The following
|
82
|
+
The following files may require your attention:
|
59
83
|
|
60
84
|
./config/boot.rb
|
61
85
|
./config/cable.yml
|
62
86
|
./config/database.yml
|
63
|
-
./config/environment.rb
|
64
87
|
./config/puma.rb
|
65
88
|
./config/spring.rb
|
89
|
+
./config/storage.yml
|
66
90
|
|
67
91
|
Create/copy your owns. They are still there for inspection.
|
68
92
|
|
69
|
-
The following file
|
93
|
+
The following file requires your attention:
|
70
94
|
|
71
95
|
./config/initializers/assets.rb
|
72
96
|
|
data/Rakefile
CHANGED
@@ -1,13 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
rescue LoadError
|
5
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
-
end
|
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.
|
7
3
|
|
8
|
-
|
4
|
+
require_relative "config/application"
|
9
5
|
|
10
|
-
|
11
|
-
task :clean do
|
12
|
-
FileUtils.rm_rf "pkg"
|
13
|
-
end
|
6
|
+
Rails.application.load_tasks
|
data/config.ru
CHANGED
data/config/boot.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
1
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
2
2
|
|
3
|
-
require
|
3
|
+
require "bundler/setup" # Set up gems listed in the Gemfile.
|
4
|
+
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
data/config/cable.yml
CHANGED
@@ -2,9 +2,9 @@ development:
|
|
2
2
|
adapter: async
|
3
3
|
|
4
4
|
test:
|
5
|
-
adapter:
|
5
|
+
adapter: test
|
6
6
|
|
7
7
|
production:
|
8
8
|
adapter: redis
|
9
|
-
url: redis://localhost:6379/1
|
10
|
-
channel_prefix:
|
9
|
+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
|
10
|
+
channel_prefix: sample_6_1_4_production
|
data/config/database.yml
CHANGED
data/config/environment.rb
CHANGED
@@ -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
|
-
# In the development environment your application's code is reloaded
|
5
|
-
#
|
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
9
|
config.cache_classes = false
|
8
10
|
|
@@ -13,12 +15,14 @@ Rails.application.configure do
|
|
13
15
|
config.consider_all_requests_local = true
|
14
16
|
|
15
17
|
# Enable/disable caching. By default caching is disabled.
|
16
|
-
|
18
|
+
# Run rails dev:cache to toggle caching.
|
19
|
+
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
17
20
|
config.action_controller.perform_caching = true
|
21
|
+
config.action_controller.enable_fragment_cache_logging = true
|
18
22
|
|
19
23
|
config.cache_store = :memory_store
|
20
24
|
config.public_file_server.headers = {
|
21
|
-
'Cache-Control' => "public, max-age=#{2.days.
|
25
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
22
26
|
}
|
23
27
|
else
|
24
28
|
config.action_controller.perform_caching = false
|
@@ -26,6 +30,9 @@ Rails.application.configure do
|
|
26
30
|
config.cache_store = :null_store
|
27
31
|
end
|
28
32
|
|
33
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
34
|
+
config.active_storage.service = :local
|
35
|
+
|
29
36
|
# Don't care if the mailer can't send.
|
30
37
|
config.action_mailer.raise_delivery_errors = false
|
31
38
|
|
@@ -34,9 +41,18 @@ Rails.application.configure do
|
|
34
41
|
# Print deprecation notices to the Rails logger.
|
35
42
|
config.active_support.deprecation = :log
|
36
43
|
|
44
|
+
# Raise exceptions for disallowed deprecations.
|
45
|
+
config.active_support.disallowed_deprecation = :raise
|
46
|
+
|
47
|
+
# Tell Active Support which deprecation messages to disallow.
|
48
|
+
config.active_support.disallowed_deprecation_warnings = []
|
49
|
+
|
37
50
|
# Raise an error on page load if there are pending migrations.
|
38
51
|
config.active_record.migration_error = :page_load
|
39
52
|
|
53
|
+
# Highlight code that triggered database queries in logs.
|
54
|
+
config.active_record.verbose_query_logs = true
|
55
|
+
|
40
56
|
# Debug mode disables concatenation and preprocessing of assets.
|
41
57
|
# This option may cause significant delays in view rendering with a large
|
42
58
|
# number of complex assets.
|
@@ -45,10 +61,16 @@ Rails.application.configure do
|
|
45
61
|
# Suppress logger output for asset requests.
|
46
62
|
config.assets.quiet = true
|
47
63
|
|
48
|
-
# Raises error for missing translations
|
49
|
-
# config.
|
64
|
+
# Raises error for missing translations.
|
65
|
+
# config.i18n.raise_on_missing_translations = true
|
66
|
+
|
67
|
+
# Annotate rendered view with file names.
|
68
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
50
69
|
|
51
70
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
52
71
|
# routes, locales, etc. This feature depends on the listen gem.
|
53
72
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
73
|
+
|
74
|
+
# Uncomment if you wish to allow Action Cable access from any origin.
|
75
|
+
# config.action_cable.disable_request_forgery_protection = true
|
54
76
|
end
|
@@ -1,3 +1,5 @@
|
|
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
|
|
@@ -14,32 +16,31 @@ Rails.application.configure do
|
|
14
16
|
config.consider_all_requests_local = false
|
15
17
|
config.action_controller.perform_caching = true
|
16
18
|
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
config.read_encrypted_secrets = true
|
19
|
+
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
20
|
+
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
21
|
+
# config.require_master_key = true
|
21
22
|
|
22
23
|
# Disable serving static files from the `/public` folder by default since
|
23
24
|
# Apache or NGINX already handles this.
|
24
25
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
25
26
|
|
26
|
-
# Compress
|
27
|
-
config.assets.js_compressor = :uglifier
|
27
|
+
# Compress CSS using a preprocessor.
|
28
28
|
# config.assets.css_compressor = :sass
|
29
29
|
|
30
30
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
31
31
|
config.assets.compile = false
|
32
32
|
|
33
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
34
|
-
|
35
33
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
36
|
-
# config.
|
34
|
+
# config.asset_host = 'http://assets.example.com'
|
37
35
|
|
38
36
|
# Specifies the header that your server uses for sending files.
|
39
37
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
40
38
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
41
39
|
|
42
|
-
#
|
40
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
41
|
+
config.active_storage.service = :local
|
42
|
+
|
43
|
+
# Mount Action Cable outside main process or domain.
|
43
44
|
# config.action_cable.mount_path = nil
|
44
45
|
# config.action_cable.url = 'wss://example.com/cable'
|
45
46
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
@@ -47,9 +48,9 @@ Rails.application.configure do
|
|
47
48
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
48
49
|
# config.force_ssl = true
|
49
50
|
|
50
|
-
#
|
51
|
-
#
|
52
|
-
config.log_level = :
|
51
|
+
# Include generic and useful information about system operation, but avoid logging too much
|
52
|
+
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
53
|
+
config.log_level = :info
|
53
54
|
|
54
55
|
# Prepend all log lines with the following tags.
|
55
56
|
config.log_tags = [ :request_id ]
|
@@ -57,9 +58,10 @@ Rails.application.configure do
|
|
57
58
|
# Use a different cache store in production.
|
58
59
|
# config.cache_store = :mem_cache_store
|
59
60
|
|
60
|
-
# Use a real queuing backend for Active Job (and separate queues per environment)
|
61
|
+
# Use a real queuing backend for Active Job (and separate queues per environment).
|
61
62
|
# config.active_job.queue_adapter = :resque
|
62
|
-
# config.active_job.queue_name_prefix = "
|
63
|
+
# config.active_job.queue_name_prefix = "sample_6_1_4_production"
|
64
|
+
|
63
65
|
config.action_mailer.perform_caching = false
|
64
66
|
|
65
67
|
# Ignore bad email addresses and do not raise email delivery errors.
|
@@ -73,11 +75,17 @@ Rails.application.configure do
|
|
73
75
|
# Send deprecation notices to registered listeners.
|
74
76
|
config.active_support.deprecation = :notify
|
75
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
|
+
|
76
84
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
77
85
|
config.log_formatter = ::Logger::Formatter.new
|
78
86
|
|
79
87
|
# Use a different logger for distributed setups.
|
80
|
-
# require
|
88
|
+
# require "syslog/logger"
|
81
89
|
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
82
90
|
|
83
91
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
@@ -88,4 +96,25 @@ Rails.application.configure do
|
|
88
96
|
|
89
97
|
# Do not dump schema after migrations.
|
90
98
|
config.active_record.dump_schema_after_migration = false
|
99
|
+
|
100
|
+
# Inserts middleware to perform automatic connection switching.
|
101
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
102
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
103
|
+
# to send a subsequent read to the primary.
|
104
|
+
#
|
105
|
+
# The `database_resolver` class is used by the middleware to determine which
|
106
|
+
# database is appropriate to use based on the time delay.
|
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
|
91
120
|
end
|
data/config/environments/test.rb
CHANGED
@@ -1,11 +1,15 @@
|
|
1
|
+
require "active_support/core_ext/integer/time"
|
2
|
+
|
3
|
+
# The test environment is used exclusively to run your application's
|
4
|
+
# test suite. You never need to work with it otherwise. Remember that
|
5
|
+
# your test database is "scratch space" for the test suite and is wiped
|
6
|
+
# and recreated between test runs. Don't rely on the data there!
|
7
|
+
|
1
8
|
Rails.application.configure do
|
2
9
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs. Don't rely on the data there!
|
8
|
-
config.cache_classes = true
|
11
|
+
config.cache_classes = false
|
12
|
+
config.action_view.cache_template_loading = true
|
9
13
|
|
10
14
|
# Do not eager load code on boot. This avoids loading your whole application
|
11
15
|
# just for the purpose of running a single test. If you are using a tool that
|
@@ -15,18 +19,23 @@ Rails.application.configure do
|
|
15
19
|
# Configure public file server for tests with Cache-Control for performance.
|
16
20
|
config.public_file_server.enabled = true
|
17
21
|
config.public_file_server.headers = {
|
18
|
-
'Cache-Control' => "public, max-age=#{1.hour.
|
22
|
+
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
19
23
|
}
|
20
24
|
|
21
25
|
# Show full error reports and disable caching.
|
22
26
|
config.consider_all_requests_local = true
|
23
27
|
config.action_controller.perform_caching = false
|
28
|
+
config.cache_store = :null_store
|
24
29
|
|
25
30
|
# Raise exceptions instead of rendering exception templates.
|
26
31
|
config.action_dispatch.show_exceptions = false
|
27
32
|
|
28
33
|
# Disable request forgery protection in test environment.
|
29
34
|
config.action_controller.allow_forgery_protection = false
|
35
|
+
|
36
|
+
# Store uploaded files on the local file system in a temporary directory.
|
37
|
+
config.active_storage.service = :test
|
38
|
+
|
30
39
|
config.action_mailer.perform_caching = false
|
31
40
|
|
32
41
|
# Tell Action Mailer not to deliver emails to the real world.
|
@@ -37,6 +46,15 @@ Rails.application.configure do
|
|
37
46
|
# Print deprecation notices to the stderr.
|
38
47
|
config.active_support.deprecation = :stderr
|
39
48
|
|
40
|
-
#
|
41
|
-
|
49
|
+
# Raise exceptions for disallowed deprecations.
|
50
|
+
config.active_support.disallowed_deprecation = :raise
|
51
|
+
|
52
|
+
# Tell Active Support which deprecation messages to disallow.
|
53
|
+
config.active_support.disallowed_deprecation_warnings = []
|
54
|
+
|
55
|
+
# Raises error for missing translations.
|
56
|
+
# config.i18n.raise_on_missing_translations = true
|
57
|
+
|
58
|
+
# Annotate rendered view with file names.
|
59
|
+
# config.action_view.annotate_rendered_view_with_filenames = true
|
42
60
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
3
|
+
# ActiveSupport::Reloader.to_prepare do
|
4
|
+
# ApplicationController.renderer.defaults.merge!(
|
5
|
+
# http_host: 'example.org',
|
6
|
+
# https: false
|
7
|
+
# )
|
8
|
+
# end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
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|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
|
5
5
|
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
|
7
|
-
#
|
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"]
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
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
|
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
|
+
# # If you are using webpack-dev-server then specify webpack-dev-server host
|
15
|
+
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
|
16
|
+
|
17
|
+
# # Specify URI for violation reports
|
18
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
19
|
+
# 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,4 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
3
|
# Configure sensitive parameters which will be filtered from the log file.
|
4
|
-
Rails.application.config.filter_parameters += [
|
4
|
+
Rails.application.config.filter_parameters += [
|
5
|
+
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
6
|
+
]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# 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 |f|
|
5
|
+
# f.camera :none
|
6
|
+
# f.gyroscope :none
|
7
|
+
# f.microphone :none
|
8
|
+
# f.usb :none
|
9
|
+
# f.fullscreen :self
|
10
|
+
# f.payment :self, "https://secure.example.com"
|
11
|
+
# end
|
data/config/puma.rb
CHANGED
@@ -4,19 +4,28 @@
|
|
4
4
|
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
5
|
# and maximum; this matches the default thread size of Active Record.
|
6
6
|
#
|
7
|
-
|
8
|
-
|
7
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
9
|
+
threads min_threads_count, max_threads_count
|
10
|
+
|
11
|
+
# Specifies the `worker_timeout` threshold that Puma will use to wait before
|
12
|
+
# terminating a worker in development environments.
|
13
|
+
#
|
14
|
+
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
|
9
15
|
|
10
16
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
17
|
#
|
12
|
-
port
|
18
|
+
port ENV.fetch("PORT") { 3000 }
|
13
19
|
|
14
20
|
# Specifies the `environment` that Puma will run in.
|
15
21
|
#
|
16
22
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
23
|
|
24
|
+
# Specifies the `pidfile` that Puma will use.
|
25
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
26
|
+
|
18
27
|
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
-
# Workers are forked
|
28
|
+
# Workers are forked web server processes. If using threads and workers together
|
20
29
|
# the concurrency of the application would be max `threads` * `workers`.
|
21
30
|
# Workers do not work on JRuby or Windows (both of which do not support
|
22
31
|
# processes).
|
@@ -26,31 +35,9 @@ environment ENV.fetch("RAILS_ENV") { "development" }
|
|
26
35
|
# Use the `preload_app!` method when specifying a `workers` number.
|
27
36
|
# This directive tells Puma to first boot the application and load code
|
28
37
|
# before forking the application. This takes advantage of Copy On Write
|
29
|
-
# process behavior so workers use less memory.
|
30
|
-
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
31
|
-
# block.
|
38
|
+
# process behavior so workers use less memory.
|
32
39
|
#
|
33
40
|
# preload_app!
|
34
41
|
|
35
|
-
# If you are preloading your application and using Active Record, it's
|
36
|
-
# recommended that you close any connections to the database before workers
|
37
|
-
# are forked to prevent connection leakage.
|
38
|
-
#
|
39
|
-
# before_fork do
|
40
|
-
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
41
|
-
# end
|
42
|
-
|
43
|
-
# The code in the `on_worker_boot` will be called if you are using
|
44
|
-
# clustered mode by specifying a number of `workers`. After each worker
|
45
|
-
# process is booted, this block will be run. If you are using the `preload_app!`
|
46
|
-
# option, you will want to use this block to reconnect to any threads
|
47
|
-
# or connections that may have been created at application boot, as Ruby
|
48
|
-
# cannot share connections between processes.
|
49
|
-
#
|
50
|
-
# on_worker_boot do
|
51
|
-
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
|
55
42
|
# Allow puma to be restarted by `rails restart` command.
|
56
43
|
plugin :tmp_restart
|
data/config/spring.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
.ruby-version
|
3
|
-
.rbenv-vars
|
4
|
-
tmp/restart.txt
|
5
|
-
tmp/caching-dev.txt
|
6
|
-
)
|
1
|
+
Spring.watch(
|
2
|
+
".ruby-version",
|
3
|
+
".rbenv-vars",
|
4
|
+
"tmp/restart.txt",
|
5
|
+
"tmp/caching-dev.txt"
|
6
|
+
)
|
data/config/storage.yml
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
test:
|
2
|
+
service: Disk
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
4
|
+
|
5
|
+
local:
|
6
|
+
service: Disk
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
8
|
+
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
10
|
+
# amazon:
|
11
|
+
# service: S3
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
14
|
+
# region: us-east-1
|
15
|
+
# bucket: your_own_bucket
|
16
|
+
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
18
|
+
# google:
|
19
|
+
# service: GCS
|
20
|
+
# project: your_project
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
22
|
+
# bucket: your_own_bucket
|
23
|
+
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
25
|
+
# microsoft:
|
26
|
+
# service: AzureStorage
|
27
|
+
# storage_account_name: your_account_name
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
29
|
+
# container: your_container_name
|
30
|
+
|
31
|
+
# mirror:
|
32
|
+
# service: Mirror
|
33
|
+
# primary: local
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
@@ -0,0 +1,92 @@
|
|
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
|
data/dryer-config.gemspec
CHANGED
@@ -12,12 +12,17 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.email = ['dittmar.krall@matique.de']
|
13
13
|
s.homepage = 'http://matique.de'
|
14
14
|
s.license = 'MIT'
|
15
|
+
s.platform = Gem::Platform::RUBY
|
16
|
+
|
17
|
+
s.metadata['source_code_uri'] = 'https://github.com/matique/dryer-config'
|
15
18
|
|
16
19
|
s.files = `git ls-files`.split("\n")
|
17
20
|
# s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
21
|
# s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
22
|
s.require_paths = ["lib"]
|
20
23
|
|
21
|
-
s.add_development_dependency 'bundler'
|
22
|
-
s.add_development_dependency 'rake'
|
24
|
+
s.add_development_dependency 'bundler'
|
25
|
+
s.add_development_dependency 'rake'
|
26
|
+
|
27
|
+
s.add_development_dependency 'minitest'
|
23
28
|
end
|
data/lib/dryer-config/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryer-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.4
|
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: 2021-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
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
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
description: Outsource several config files to a gem.
|
@@ -46,6 +60,7 @@ extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- ".gitignore"
|
63
|
+
- ".ruby-version"
|
49
64
|
- MIT-LICENSE
|
50
65
|
- README.md
|
51
66
|
- Rakefile
|
@@ -60,13 +75,21 @@ files:
|
|
60
75
|
- config/initializers/application_controller_renderer.rb
|
61
76
|
- config/initializers/assets.rb
|
62
77
|
- config/initializers/backtrace_silencers.rb
|
78
|
+
- config/initializers/content_security_policy.rb
|
63
79
|
- config/initializers/cookies_serializer.rb
|
64
80
|
- config/initializers/filter_parameter_logging.rb
|
65
81
|
- config/initializers/inflections.rb
|
66
82
|
- config/initializers/mime_types.rb
|
83
|
+
- config/initializers/permissions_policy.rb
|
67
84
|
- config/initializers/wrap_parameters.rb
|
68
85
|
- config/puma.rb
|
69
86
|
- config/spring.rb
|
87
|
+
- 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
|
70
93
|
- dryer-config.gemspec
|
71
94
|
- lib/dryer-config.rb
|
72
95
|
- lib/dryer-config/engine.rb
|
@@ -74,7 +97,8 @@ files:
|
|
74
97
|
homepage: http://matique.de
|
75
98
|
licenses:
|
76
99
|
- MIT
|
77
|
-
metadata:
|
100
|
+
metadata:
|
101
|
+
source_code_uri: https://github.com/matique/dryer-config
|
78
102
|
post_install_message:
|
79
103
|
rdoc_options: []
|
80
104
|
require_paths:
|
@@ -90,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
114
|
- !ruby/object:Gem::Version
|
91
115
|
version: '0'
|
92
116
|
requirements: []
|
93
|
-
|
94
|
-
rubygems_version: 2.5.1
|
117
|
+
rubygems_version: 3.2.15
|
95
118
|
signing_key:
|
96
119
|
specification_version: 4
|
97
120
|
summary: Several pristine Rails config files.
|