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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63588fb0e3226125aacd3d3e8223a61b8bbe3b8dad14388fd6c4e7389a1fbebb
4
- data.tar.gz: 63db33abec5829b54e5e41ee328891556ae63dfd27bdf04048592ac945ed7a8c
3
+ metadata.gz: 0e7864a2d30e62a39dbeb3c3eff43e07568a844b391e8c5f51f49c0712a2786b
4
+ data.tar.gz: b79745abcd726d5665aff0069ef3bef63250af5df0157f7515d0f67b65bfc9f6
5
5
  SHA512:
6
- metadata.gz: 3761476e2956deb7423c360d041c622de50cf79fc763271fa2dd8754f104408579fdddafe735044f115cc39100ba21de725ce7d2c19f9d1e178aaddb74487b42
7
- data.tar.gz: af8a9adfd80ce42580e18097ac108796e3c3e52ed7068348b7aff8e4050557e273a036728d4898891b118e5ae6b6909e283593a1b3630ec9f22b504592dd82d1
6
+ metadata.gz: 27b2ac548df27cb149bfb6f60753179d36d6bf2fa3caa0cb7a5f5e456450840357272c4c53bba986ad8f62d12f79960e87183faa2cd48f0afecdb695c802730a
7
+ data.tar.gz: 71c11e19fe808da90a497616ff635e00e0a3a86c971b751cf5e9bdebe34d86272a9197ca1b8104f7a1b0d2d98677ecb56bb681168c7a08d9bbc4e7cf9b914913
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.0
4
+
5
+ * Fix conflicts with Rails 7 active_support methods ([#347](https://github.com/rubyconfig/config/pull/339))
6
+
3
7
  ## 5.0.0
4
8
 
5
9
  ### BREAKING CHANGES
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Config
2
- VERSION = '5.0.0'.freeze
2
+ VERSION = '5.1.0'.freeze
3
3
  end
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.0.0
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-10-18 00:00:00.000000000 Z
13
+ date: 2023-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: deep_merge