config 5.0.0 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/config/options.rb +10 -0
- data/lib/config/version.rb +1 -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: 0e7864a2d30e62a39dbeb3c3eff43e07568a844b391e8c5f51f49c0712a2786b
|
4
|
+
data.tar.gz: b79745abcd726d5665aff0069ef3bef63250af5df0157f7515d0f67b65bfc9f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27b2ac548df27cb149bfb6f60753179d36d6bf2fa3caa0cb7a5f5e456450840357272c4c53bba986ad8f62d12f79960e87183faa2cd48f0afecdb695c802730a
|
7
|
+
data.tar.gz: 71c11e19fe808da90a497616ff635e00e0a3a86c971b751cf5e9bdebe34d86272a9197ca1b8104f7a1b0d2d98677ecb56bb681168c7a08d9bbc4e7cf9b914913
|
data/CHANGELOG.md
CHANGED
data/lib/config/options.rb
CHANGED
@@ -114,10 +114,14 @@ module Config
|
|
114
114
|
# Some keywords that don't play nicely with OpenStruct
|
115
115
|
SETTINGS_RESERVED_NAMES = %w[select collect test count zip min max exit! table].freeze
|
116
116
|
|
117
|
+
# Some keywords that don't play nicely with Rails 7.*
|
118
|
+
RAILS_RESERVED_NAMES = %w[maximum minimum].freeze
|
119
|
+
|
117
120
|
# An alternative mechanism for property access.
|
118
121
|
# This let's you do foo['bar'] along with foo.bar.
|
119
122
|
def [](param)
|
120
123
|
return super if SETTINGS_RESERVED_NAMES.include?(param)
|
124
|
+
return super if RAILS_RESERVED_NAMES.include?(param)
|
121
125
|
send("#{param}")
|
122
126
|
end
|
123
127
|
|
@@ -131,6 +135,12 @@ module Config
|
|
131
135
|
end
|
132
136
|
end
|
133
137
|
|
138
|
+
RAILS_RESERVED_NAMES.each do |name|
|
139
|
+
define_method name do
|
140
|
+
self[name]
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
134
144
|
def key?(key)
|
135
145
|
@table.key?(key)
|
136
146
|
end
|
data/lib/config/version.rb
CHANGED
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.1.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: 2023-
|
13
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: deep_merge
|