dryer-config 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +23 -3
- data/config/cable.yml +2 -2
- data/config/database.yml +1 -1
- data/config/environments/development.rb +3 -2
- data/config/environments/production.rb +26 -8
- data/config/environments/test.rb +10 -8
- data/config/initializers/content_security_policy.rb +5 -0
- data/config/puma.rb +7 -3
- data/config/spring.rb +6 -6
- 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 +95 -0
- data/lib/dryer-config/version.rb +2 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c6daaf543a97f151f02170a257e6b3572efb0d040d6b5c3d0aafb5458e8f482
|
4
|
+
data.tar.gz: 27045bed45ea0dc4e6872e2811b24faa28a8332202a9a834123907053c299fc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e5da69197d0fe17a0684942ce0e4e07098b2831afa5904661f6cf9a0c084822780f5d1f030284a449136f4356c4d4544122f2b1ba5e519fd724a9d439c3acb
|
7
|
+
data.tar.gz: 888a7ce879c01408e50d988ef1de59f1f81dbb9a0621481cf5ca7d7627094bfdffd612a8d711d9c3a608cd40e7ea9e4de5d893de857905d2c833b3c7d0d8574b
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -11,7 +11,7 @@ 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
15
|
|
16
16
|
or
|
17
17
|
|
@@ -42,10 +42,30 @@ Installation
|
|
42
42
|
------------
|
43
43
|
To install add the following to your Gemfile (e.g.):
|
44
44
|
|
45
|
-
gem 'dryer-config', '~>
|
45
|
+
gem 'dryer-config', '~> 6.0'
|
46
46
|
|
47
47
|
and run bundle.
|
48
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
|
+
|
49
69
|
Configuration
|
50
70
|
-------------
|
51
71
|
|
@@ -59,7 +79,7 @@ The following original config files have been dropped:
|
|
59
79
|
|
60
80
|
Create your owns.
|
61
81
|
|
62
|
-
The following
|
82
|
+
The following files may require your attention:
|
63
83
|
|
64
84
|
./config/boot.rb
|
65
85
|
./config/cable.yml
|
data/config/cable.yml
CHANGED
data/config/database.yml
CHANGED
@@ -16,6 +16,7 @@ Rails.application.configure do
|
|
16
16
|
# Run rails dev:cache to toggle caching.
|
17
17
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
18
18
|
config.action_controller.perform_caching = true
|
19
|
+
config.action_controller.enable_fragment_cache_logging = true
|
19
20
|
|
20
21
|
config.cache_store = :memory_store
|
21
22
|
config.public_file_server.headers = {
|
@@ -27,7 +28,7 @@ Rails.application.configure do
|
|
27
28
|
config.cache_store = :null_store
|
28
29
|
end
|
29
30
|
|
30
|
-
# Store uploaded files on the local file system (see config/storage.yml for options)
|
31
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
31
32
|
config.active_storage.service = :local
|
32
33
|
|
33
34
|
# Don't care if the mailer can't send.
|
@@ -52,7 +53,7 @@ Rails.application.configure do
|
|
52
53
|
# Suppress logger output for asset requests.
|
53
54
|
config.assets.quiet = true
|
54
55
|
|
55
|
-
# Raises error for missing translations
|
56
|
+
# Raises error for missing translations.
|
56
57
|
# config.action_view.raise_on_missing_translations = true
|
57
58
|
|
58
59
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
@@ -22,15 +22,12 @@ Rails.application.configure do
|
|
22
22
|
# Apache or NGINX already handles this.
|
23
23
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
24
24
|
|
25
|
-
# Compress
|
26
|
-
config.assets.js_compressor = :uglifier
|
25
|
+
# Compress CSS using a preprocessor.
|
27
26
|
# config.assets.css_compressor = :sass
|
28
27
|
|
29
28
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
29
|
config.assets.compile = false
|
31
30
|
|
32
|
-
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
33
|
-
|
34
31
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
35
32
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
36
33
|
|
@@ -38,10 +35,10 @@ Rails.application.configure do
|
|
38
35
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
39
36
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
40
37
|
|
41
|
-
# Store uploaded files on the local file system (see config/storage.yml for options)
|
38
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
42
39
|
config.active_storage.service = :local
|
43
40
|
|
44
|
-
# Mount Action Cable outside main process or domain
|
41
|
+
# Mount Action Cable outside main process or domain.
|
45
42
|
# config.action_cable.mount_path = nil
|
46
43
|
# config.action_cable.url = 'wss://example.com/cable'
|
47
44
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
@@ -59,9 +56,9 @@ Rails.application.configure do
|
|
59
56
|
# Use a different cache store in production.
|
60
57
|
# config.cache_store = :mem_cache_store
|
61
58
|
|
62
|
-
# Use a real queuing backend for Active Job (and separate queues per environment)
|
59
|
+
# Use a real queuing backend for Active Job (and separate queues per environment).
|
63
60
|
# config.active_job.queue_adapter = :resque
|
64
|
-
# config.active_job.queue_name_prefix = "
|
61
|
+
# config.active_job.queue_name_prefix = "sample_6_0_0_production"
|
65
62
|
|
66
63
|
config.action_mailer.perform_caching = false
|
67
64
|
|
@@ -91,4 +88,25 @@ Rails.application.configure do
|
|
91
88
|
|
92
89
|
# Do not dump schema after migrations.
|
93
90
|
config.active_record.dump_schema_after_migration = false
|
91
|
+
|
92
|
+
# Inserts middleware to perform automatic connection switching.
|
93
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
94
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
95
|
+
# to send a subsequent read to the primary.
|
96
|
+
#
|
97
|
+
# The `database_resolver` class is used by the middleware to determine which
|
98
|
+
# database is appropriate to use based on the time delay.
|
99
|
+
#
|
100
|
+
# The `database_resolver_context` class is used by the middleware to set
|
101
|
+
# timestamps for the last write to the primary. The resolver uses the context
|
102
|
+
# class timestamps to determine how long to wait before reading from the
|
103
|
+
# replica.
|
104
|
+
#
|
105
|
+
# By default Rails will store a last write timestamp in the session. The
|
106
|
+
# DatabaseSelector middleware is designed as such you can define your own
|
107
|
+
# strategy for connection switching and pass that into the middleware through
|
108
|
+
# these configuration options.
|
109
|
+
# config.active_record.database_selector = { delay: 2.seconds }
|
110
|
+
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
111
|
+
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
94
112
|
end
|
data/config/environments/test.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
+
# The test environment is used exclusively to run your application's
|
2
|
+
# test suite. You never need to work with it otherwise. Remember that
|
3
|
+
# your test database is "scratch space" for the test suite and is wiped
|
4
|
+
# and recreated between test runs. Don't rely on the data there!
|
5
|
+
|
1
6
|
Rails.application.configure do
|
2
7
|
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
-
|
4
|
-
|
5
|
-
# test suite. You never need to work with it otherwise. Remember that
|
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
|
8
|
+
|
9
|
+
config.cache_classes = false
|
9
10
|
|
10
11
|
# Do not eager load code on boot. This avoids loading your whole application
|
11
12
|
# just for the purpose of running a single test. If you are using a tool that
|
@@ -21,6 +22,7 @@ Rails.application.configure do
|
|
21
22
|
# Show full error reports and disable caching.
|
22
23
|
config.consider_all_requests_local = true
|
23
24
|
config.action_controller.perform_caching = false
|
25
|
+
config.cache_store = :null_store
|
24
26
|
|
25
27
|
# Raise exceptions instead of rendering exception templates.
|
26
28
|
config.action_dispatch.show_exceptions = false
|
@@ -28,7 +30,7 @@ Rails.application.configure do
|
|
28
30
|
# Disable request forgery protection in test environment.
|
29
31
|
config.action_controller.allow_forgery_protection = false
|
30
32
|
|
31
|
-
# Store uploaded files on the local file system in a temporary directory
|
33
|
+
# Store uploaded files on the local file system in a temporary directory.
|
32
34
|
config.active_storage.service = :test
|
33
35
|
|
34
36
|
config.action_mailer.perform_caching = false
|
@@ -41,6 +43,6 @@ Rails.application.configure do
|
|
41
43
|
# Print deprecation notices to the stderr.
|
42
44
|
config.active_support.deprecation = :stderr
|
43
45
|
|
44
|
-
# Raises error for missing translations
|
46
|
+
# Raises error for missing translations.
|
45
47
|
# config.action_view.raise_on_missing_translations = true
|
46
48
|
end
|
@@ -11,6 +11,8 @@
|
|
11
11
|
# policy.object_src :none
|
12
12
|
# policy.script_src :self, :https
|
13
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?
|
14
16
|
|
15
17
|
# # Specify URI for violation reports
|
16
18
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
@@ -19,6 +21,9 @@
|
|
19
21
|
# If you are using UJS then enable automatic nonce generation
|
20
22
|
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
21
23
|
|
24
|
+
# Set the nonce only to specific directives
|
25
|
+
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
26
|
+
|
22
27
|
# Report CSP violations to a specified URI
|
23
28
|
# For further information see the following documentation:
|
24
29
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
data/config/puma.rb
CHANGED
@@ -4,8 +4,9 @@
|
|
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
|
9
10
|
|
10
11
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
12
|
#
|
@@ -15,8 +16,11 @@ port ENV.fetch("PORT") { 3000 }
|
|
15
16
|
#
|
16
17
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
18
|
|
19
|
+
# Specifies the `pidfile` that Puma will use.
|
20
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
21
|
+
|
18
22
|
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
-
# Workers are forked
|
23
|
+
# Workers are forked web server processes. If using threads and workers together
|
20
24
|
# the concurrency of the application would be max `threads` * `workers`.
|
21
25
|
# Workers do not work on JRuby or Windows (both of which do not support
|
22
26
|
# processes).
|
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
|
+
)
|
@@ -0,0 +1,95 @@
|
|
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
|
+
check_yarn_integrity: false
|
10
|
+
webpack_compile_output: false
|
11
|
+
|
12
|
+
# Additional paths webpack should lookup modules
|
13
|
+
# ['app/assets', 'engine/foo/app/assets']
|
14
|
+
resolved_paths: []
|
15
|
+
|
16
|
+
# Reload manifest.json on all requests so we reload latest compiled packs
|
17
|
+
cache_manifest: false
|
18
|
+
|
19
|
+
# Extract and emit a css file
|
20
|
+
extract_css: false
|
21
|
+
|
22
|
+
static_assets_extensions:
|
23
|
+
- .jpg
|
24
|
+
- .jpeg
|
25
|
+
- .png
|
26
|
+
- .gif
|
27
|
+
- .tiff
|
28
|
+
- .ico
|
29
|
+
- .svg
|
30
|
+
- .eot
|
31
|
+
- .otf
|
32
|
+
- .ttf
|
33
|
+
- .woff
|
34
|
+
- .woff2
|
35
|
+
|
36
|
+
extensions:
|
37
|
+
- .mjs
|
38
|
+
- .js
|
39
|
+
- .sass
|
40
|
+
- .scss
|
41
|
+
- .css
|
42
|
+
- .module.sass
|
43
|
+
- .module.scss
|
44
|
+
- .module.css
|
45
|
+
- .png
|
46
|
+
- .svg
|
47
|
+
- .gif
|
48
|
+
- .jpeg
|
49
|
+
- .jpg
|
50
|
+
|
51
|
+
development:
|
52
|
+
<<: *default
|
53
|
+
compile: true
|
54
|
+
|
55
|
+
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
|
56
|
+
check_yarn_integrity: true
|
57
|
+
|
58
|
+
# Reference: https://webpack.js.org/configuration/dev-server/
|
59
|
+
dev_server:
|
60
|
+
https: false
|
61
|
+
host: localhost
|
62
|
+
port: 3035
|
63
|
+
public: localhost:3035
|
64
|
+
hmr: false
|
65
|
+
# Inline should be set to true if using HMR
|
66
|
+
inline: true
|
67
|
+
overlay: true
|
68
|
+
compress: true
|
69
|
+
disable_host_check: true
|
70
|
+
use_local_ip: false
|
71
|
+
quiet: false
|
72
|
+
headers:
|
73
|
+
'Access-Control-Allow-Origin': '*'
|
74
|
+
watch_options:
|
75
|
+
ignored: '**/node_modules/**'
|
76
|
+
|
77
|
+
|
78
|
+
test:
|
79
|
+
<<: *default
|
80
|
+
compile: true
|
81
|
+
|
82
|
+
# Compile test packs to a separate directory
|
83
|
+
public_output_path: packs-test
|
84
|
+
|
85
|
+
production:
|
86
|
+
<<: *default
|
87
|
+
|
88
|
+
# Production depends on precompilation of packs prior to booting for performance.
|
89
|
+
compile: false
|
90
|
+
|
91
|
+
# Extract and emit a css file
|
92
|
+
extract_css: true
|
93
|
+
|
94
|
+
# Cache manifest.json for performance
|
95
|
+
cache_manifest: true
|
data/lib/dryer-config/version.rb
CHANGED
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: 6.0.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: 2019-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,6 +69,11 @@ files:
|
|
69
69
|
- config/puma.rb
|
70
70
|
- config/spring.rb
|
71
71
|
- config/storage.yml
|
72
|
+
- config/webpack/development.js
|
73
|
+
- config/webpack/environment.js
|
74
|
+
- config/webpack/production.js
|
75
|
+
- config/webpack/test.js
|
76
|
+
- config/webpacker.yml
|
72
77
|
- dryer-config.gemspec
|
73
78
|
- lib/dryer-config.rb
|
74
79
|
- lib/dryer-config/engine.rb
|
@@ -92,8 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
97
|
- !ruby/object:Gem::Version
|
93
98
|
version: '0'
|
94
99
|
requirements: []
|
95
|
-
|
96
|
-
rubygems_version: 2.7.3
|
100
|
+
rubygems_version: 3.0.6
|
97
101
|
signing_key:
|
98
102
|
specification_version: 4
|
99
103
|
summary: Several pristine Rails config files.
|