anyway_config 2.8.0 → 2.8.1
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 +8 -1
- data/lib/.rbnext/3.0/anyway/config.rb +1 -1
- data/lib/.rbnext/3.1/anyway/config.rb +1 -1
- data/lib/.rbnext/3.2/anyway/config.rb +1 -1
- data/lib/.rbnext/3.4/anyway/config.rb +1 -1
- data/lib/anyway/config.rb +1 -1
- data/lib/anyway/rails/settings.rb +2 -0
- data/lib/anyway/utils/which.rb +2 -1
- data/lib/anyway/version.rb +1 -1
- data/lib/anyway_config.rb +3 -1
- 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: c2505731c8729ea6a097cef8718c441684124da047a6856bd6156b4592c1ad9b
|
|
4
|
+
data.tar.gz: d20b15281220f9c3d77b7440ffcf915db6b28e6c7555ecec5ac9e4583de34887
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70db78ae8a9859a4f660173101127d4e8d30c6a059f5b3cba121864be120a787a5998f740a948651f84c82cb22e87f7bce7926a4ad6b27352297dbc9f24d20b4
|
|
7
|
+
data.tar.gz: a314943f0a1fe0779235a75656d80cbf7a1525bbd6db24ab4fe15f508d4ac3c2790819a6d9abf39682c17c0bb0fadf4184976e9a9753dc3d61f594b910bd211a
|
data/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 2.8.1 (2026-07-22)
|
|
6
|
+
|
|
7
|
+
- Fix default loaders order to keep ENV the last one (=higher precedence). ([@palkan][])
|
|
8
|
+
|
|
9
|
+
- Guard against a missing `PATH` environment variable in `Anyway::Utils.which`. ([@SAY-5][])
|
|
10
|
+
|
|
5
11
|
- Do not require optional loader dependencies to speed up loading. ([@ardecvz][])
|
|
6
12
|
|
|
7
|
-
## 2.8.0 (
|
|
13
|
+
## 2.8.0 (2026-06-24)
|
|
8
14
|
|
|
9
15
|
- Add `configuration_sources` option to config classes to specify which data sources to use. ([@palkan][])
|
|
10
16
|
|
|
@@ -611,3 +617,4 @@ No we're dependency-free!
|
|
|
611
617
|
[@dominikb]: https://github.com/dominikb
|
|
612
618
|
[@klondaiker]: https://github.com/klondaiker
|
|
613
619
|
[@ardecvz]: https://github.com/ardecvz
|
|
620
|
+
[@SAY-5]: https://github.com/SAY-5
|
|
@@ -92,7 +92,7 @@ module Anyway # :nodoc:
|
|
|
92
92
|
|
|
93
93
|
unless (reserved_names = (new_keys & RESERVED_NAMES)).empty?
|
|
94
94
|
raise ArgumentError, "Can not use the following reserved names as config attrubutes: " \
|
|
95
|
-
"#{reserved_names.sort.
|
|
95
|
+
"#{reserved_names.sort.join(", ")}"
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
config_attributes.push(*new_keys)
|
|
@@ -92,7 +92,7 @@ module Anyway # :nodoc:
|
|
|
92
92
|
|
|
93
93
|
unless (reserved_names = (new_keys & RESERVED_NAMES)).empty?
|
|
94
94
|
raise ArgumentError, "Can not use the following reserved names as config attrubutes: " \
|
|
95
|
-
"#{reserved_names.sort.
|
|
95
|
+
"#{reserved_names.sort.join(", ")}"
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
config_attributes.push(*new_keys)
|
|
@@ -92,7 +92,7 @@ module Anyway # :nodoc:
|
|
|
92
92
|
|
|
93
93
|
unless (reserved_names = (new_keys & RESERVED_NAMES)).empty?
|
|
94
94
|
raise ArgumentError, "Can not use the following reserved names as config attrubutes: " \
|
|
95
|
-
"#{reserved_names.sort.
|
|
95
|
+
"#{reserved_names.sort.join(", ")}"
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
config_attributes.push(*new_keys)
|
|
@@ -92,7 +92,7 @@ module Anyway # :nodoc:
|
|
|
92
92
|
|
|
93
93
|
unless (reserved_names = (new_keys & RESERVED_NAMES)).empty?
|
|
94
94
|
raise ArgumentError, "Can not use the following reserved names as config attrubutes: " \
|
|
95
|
-
"#{reserved_names.sort.
|
|
95
|
+
"#{reserved_names.sort.join(", ")}"
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
config_attributes.push(*new_keys)
|
data/lib/anyway/config.rb
CHANGED
|
@@ -92,7 +92,7 @@ module Anyway # :nodoc:
|
|
|
92
92
|
|
|
93
93
|
unless (reserved_names = (new_keys & RESERVED_NAMES)).empty?
|
|
94
94
|
raise ArgumentError, "Can not use the following reserved names as config attrubutes: " \
|
|
95
|
-
"#{reserved_names.sort.
|
|
95
|
+
"#{reserved_names.sort.join(", ")}"
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
config_attributes.push(*new_keys)
|
|
@@ -65,10 +65,12 @@ module Anyway
|
|
|
65
65
|
@autoload_via_zeitwerk = defined?(::Zeitwerk)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
alias_method :current_environment, :current_environment
|
|
68
69
|
def current_environment
|
|
69
70
|
@current_environment || ::Rails.env.to_s
|
|
70
71
|
end
|
|
71
72
|
|
|
73
|
+
alias_method :app_root, :app_root
|
|
72
74
|
def app_root
|
|
73
75
|
::Rails.root
|
|
74
76
|
end
|
data/lib/anyway/utils/which.rb
CHANGED
|
@@ -6,7 +6,8 @@ module Anyway
|
|
|
6
6
|
# taken from https://stackoverflow.com/a/5471032
|
|
7
7
|
def self.which(cmd)
|
|
8
8
|
exts = ENV["PATHEXT"] ? ENV["PATHEXT"].split(";") : [""]
|
|
9
|
-
ENV["PATH"]
|
|
9
|
+
paths = ENV["PATH"]&.split(File::PATH_SEPARATOR) || []
|
|
10
|
+
paths.each do |path|
|
|
10
11
|
exts.each do |ext|
|
|
11
12
|
exe = File.join(path, "#{cmd}#{ext}")
|
|
12
13
|
return exe if File.executable?(exe) && !File.directory?(exe)
|
data/lib/anyway/version.rb
CHANGED
data/lib/anyway_config.rb
CHANGED
|
@@ -37,7 +37,6 @@ module Anyway # :nodoc:
|
|
|
37
37
|
|
|
38
38
|
# Configure default loaders
|
|
39
39
|
loaders.append :yml, Loaders::YAML
|
|
40
|
-
loaders.append :env, Loaders::Env
|
|
41
40
|
|
|
42
41
|
# Configure optional loaders
|
|
43
42
|
if ENV["ANYWAY_CONFIG_DISABLE_EJSON"] != "true" && Utils.which("ejson")
|
|
@@ -46,6 +45,9 @@ module Anyway # :nodoc:
|
|
|
46
45
|
if ENV["ANYWAY_CONFIG_DISABLE_DOPPLER"] != "true" && ENV.key?("DOPPLER_TOKEN")
|
|
47
46
|
loaders.append :doppler, Loaders::Doppler
|
|
48
47
|
end
|
|
48
|
+
|
|
49
|
+
# ENV must go last to take higher precedence
|
|
50
|
+
loaders.append :env, Loaders::Env
|
|
49
51
|
end
|
|
50
52
|
|
|
51
53
|
if defined?(::Rails::VERSION)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anyway_config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.8.
|
|
4
|
+
version: 2.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-07-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby-next-core
|