config 5.3.0 → 5.4.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/CHANGELOG.md +6 -0
- data/README.md +2 -0
- data/lib/config/integrations/rails/railtie.rb +1 -1
- data/lib/config/version.rb +1 -1
- data/lib/config.rb +2 -1
- data/lib/generators/config/templates/config.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9695bee8465b0c65165242a23d7df19a04047c78d131587f87b5c0e356930a6c
|
4
|
+
data.tar.gz: 13b9ee27af8ad78c2450111854c1f8498b1019d0cd8c358eaa986bd0d01b8541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a15b3c5112f4f776f2df92d28fa4ac8d6d0dc92eeb294b863b0be055696d8a3cc7de4abbd44aab28cd31c9e2d716e8debbcae84a439758bd1ac9d5c4415da264
|
7
|
+
data.tar.gz: 65b04c96cf9e826fccceeff15a5897c19e2a617ab131922c1ab395dfe4aad8fe6320c5c5916b07f80c75c98369460cd9a252201d684da667a37a543edea4651e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.4.0
|
4
|
+
|
5
|
+
### New features
|
6
|
+
|
7
|
+
* Add configuration option `environment` to override the use of `Rails.env` ([#356](https://github.com/rubyconfig/config/pull/356))
|
8
|
+
|
3
9
|
## 5.3.0
|
4
10
|
|
5
11
|
* Remove `dry-validation` from dependencies ([#333](https://github.com/rubyconfig/config/pull/333))
|
data/README.md
CHANGED
@@ -53,6 +53,8 @@ which will generate customizable config file `config/initializers/config.rb` and
|
|
53
53
|
|
54
54
|
You can now edit them to adjust to your needs.
|
55
55
|
|
56
|
+
> Note: By default, the config environment will match the Rails environment (`Rails.env`). This can be changed by setting `config.environment`.
|
57
|
+
|
56
58
|
### Installing on Padrino
|
57
59
|
|
58
60
|
Add the gem to your `Gemfile` and run `bundle install` to install it. Then edit `app.rb` and register `Config`
|
@@ -9,7 +9,7 @@ module Config
|
|
9
9
|
|
10
10
|
# Parse the settings before any of the initializers
|
11
11
|
Config.load_and_set_settings(
|
12
|
-
Config.setting_files(::Rails.root.join('config'), ::Rails.env)
|
12
|
+
Config.setting_files(::Rails.root.join('config'), Config.environment.nil? ? ::Rails.env : Config.environment.to_sym)
|
13
13
|
)
|
14
14
|
end
|
15
15
|
|
data/lib/config/version.rb
CHANGED
data/lib/config.rb
CHANGED
@@ -15,6 +15,11 @@ Config.setup do |config|
|
|
15
15
|
#
|
16
16
|
# config.overwrite_arrays = true
|
17
17
|
|
18
|
+
# Defines current environment, affecting which settings file will be loaded.
|
19
|
+
# Default: `Rails.env`
|
20
|
+
#
|
21
|
+
# config.environment = ENV.fetch('ENVIRONMENT', :development)
|
22
|
+
|
18
23
|
# Load environment variables from the `ENV` object and override any settings defined in files.
|
19
24
|
#
|
20
25
|
# config.use_env = false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Kuczynski
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-03-
|
13
|
+
date: 2024-03-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: deep_merge
|