really-confy 0.2.0 → 0.2.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/lib/really_confy.rb +8 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8b66a182e1d7c887d75d5f344831351c1735eb0
|
4
|
+
data.tar.gz: cf7768c87280384cd1e23ce19956420f97e3f77a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb7418f5d8c25342d2e28d6f30e96212fea238692d9c8f525bcc5358986d4e19119d10d27434706299255f5b21127d6363a6be3e8d746905cf61a1fd3fa106ee
|
7
|
+
data.tar.gz: 6aa643bb79169707716d299dd983c31358a8d64b304f6e2bd7cae37164588a5988545482baaea65d5b9c7c2c335bcecb447a99abb591aabd2bc22d5195f310a7
|
data/lib/really_confy.rb
CHANGED
@@ -226,12 +226,19 @@ class ReallyConfy
|
|
226
226
|
include Hashie::Extensions::DeepFetch
|
227
227
|
|
228
228
|
def freeze
|
229
|
+
return self if frozen?
|
229
230
|
super
|
230
231
|
self.values.each do |v|
|
231
|
-
v.freeze
|
232
|
+
v.freeze unless frozen? || value_is_a_singleton?(v)
|
232
233
|
end
|
233
234
|
self
|
234
235
|
end
|
236
|
+
|
237
|
+
private
|
238
|
+
|
239
|
+
def value_is_a_singleton?(value)
|
240
|
+
value.nil? || value == true || value == false
|
241
|
+
end
|
235
242
|
end
|
236
243
|
|
237
244
|
class ConfigError < StandardError
|
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: really-confy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zukowski
|
8
|
+
- Edward Tam
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
@@ -65,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
66
|
version: '0'
|
66
67
|
requirements: []
|
67
68
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
69
|
+
rubygems_version: 2.2.2
|
69
70
|
signing_key:
|
70
71
|
specification_version: 4
|
71
72
|
summary: Simple YAML configuration loader
|