chamber 2.14.0 → 2.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -2
- data/lib/chamber.rb +10 -0
- data/lib/chamber/instance.rb +8 -0
- data/lib/chamber/settings.rb +28 -2
- data/lib/chamber/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690d43a7af0262a4fe1ca2f3ab99e66ed6db6a4873a5bdbd50e9bd655a44ffe8
|
4
|
+
data.tar.gz: 57ec92f68941f7a281d5ca3b056bdfd64833cd69567de2c07418180f09729d15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d38158c0fa8d6bc2c87b6ee4de139c9a13e8118159f2048846d23945c89156597c7106602bd29cb575dce8f15e5a3ee4a279e63f629e23fb25d2dc70feb693f8
|
7
|
+
data.tar.gz: 6e5ea4037cd71876681dae104acdd4081129be0dce0373cd6a78e5ed67810156e6545bd29e5124c3fcb92e459ea58a68a356f2acba8ed8232808a07c0752445f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(����m�
|
2
|
+
����-�>µ�Ɇ0���ln�L���s��9�:�<(��Y��pf�z�{te�j�:;ݳ�� 3�E��?�U]�f��0 ī9�����;cH(���Ke2�,'�q��A%G��5i�UWnʼn�|��y�����1v��v��1D����8o���kC��Uj�W��h@#�<�������l��1}�9�X1�#��')�?l�!�x�ұx��+�W~<���V�.���s���.&�P,@�:�� �M[��G�*��j^f���w���}��S��j��w��Qm�C���?_�j[bL}d" ��/�T'���n��3����=V����ʋ�Z�]�Yi5�y]4c��2/�XZ���I�jH��&xj�o<��k�R
|
data/lib/chamber.rb
CHANGED
@@ -23,6 +23,14 @@ module Chamber
|
|
23
23
|
instance.[](key)
|
24
24
|
end
|
25
25
|
|
26
|
+
def dig!(*args)
|
27
|
+
instance.dig!(*args)
|
28
|
+
end
|
29
|
+
|
30
|
+
def dig(*args)
|
31
|
+
instance.dig(*args)
|
32
|
+
end
|
33
|
+
|
26
34
|
def configuration
|
27
35
|
instance.configuration
|
28
36
|
end
|
@@ -86,6 +94,8 @@ module Chamber
|
|
86
94
|
module_function :[],
|
87
95
|
:configuration,
|
88
96
|
:decrypt,
|
97
|
+
:dig!,
|
98
|
+
:dig,
|
89
99
|
:encrypt,
|
90
100
|
:env,
|
91
101
|
:filenames,
|
data/lib/chamber/instance.rb
CHANGED
data/lib/chamber/settings.rb
CHANGED
@@ -227,6 +227,27 @@ class Settings
|
|
227
227
|
namespaces == other.namespaces
|
228
228
|
end
|
229
229
|
|
230
|
+
def [](key)
|
231
|
+
warn "WARNING: Bracket access will require strings instead of symbols in Chamber 3.0. You attempted to access the '#{key}' setting. See https://github.com/thekompanee/chamber/wiki/Upgrading-To-Chamber-3.0#removal-of-bracket-indifferent-access for full details." if key.is_a?(::Symbol) # rubocop:disable Layout/LineLength
|
232
|
+
warn "WARNING: Accessing a non-existent key ('#{key}') with brackets will fail in Chamber 3.0. See https://github.com/thekompanee/chamber/wiki/Upgrading-To-Chamber-3.0#bracket-access-now-fails-on-non-existent-keys for full details." unless data.has_key?(key) # rubocop:disable Layout/LineLength
|
233
|
+
|
234
|
+
data.[](key)
|
235
|
+
end
|
236
|
+
|
237
|
+
def dig!(*args)
|
238
|
+
args.inject(data) do |data_value, bracket_value|
|
239
|
+
key = bracket_value.is_a?(::Symbol) ? bracket_value.to_s : bracket_value
|
240
|
+
|
241
|
+
data_value.fetch(key)
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
def dig(*args)
|
246
|
+
dig!(*args)
|
247
|
+
rescue ::KeyError, ::IndexError # rubocop:disable Lint/ShadowedException
|
248
|
+
nil
|
249
|
+
end
|
250
|
+
|
230
251
|
def securable
|
231
252
|
Settings.new(**metadata.merge(
|
232
253
|
settings: raw_data,
|
@@ -251,9 +272,14 @@ class Settings
|
|
251
272
|
end
|
252
273
|
|
253
274
|
def method_missing(name, *args)
|
254
|
-
|
275
|
+
if data.respond_to?(name)
|
276
|
+
warn "WARNING: Object notation access is deprecated and will be removed in Chamber 3.0. You attempted to access the '#{name}' setting. See https://github.com/thekompanee/chamber/wiki/Upgrading-To-Chamber-3.0#removal-of-object-notation-access for full details." # rubocop:disable Layout/LineLength
|
277
|
+
warn "WARNING: Predicate methods are deprecated and will be removed in Chamber 3.0. You attempted to access the '#{name}' setting. See https://github.com/thekompanee/chamber/wiki/Upgrading-To-Chamber-3.0#removal-of-predicate-accessors for full details." if name.end_with?('?') # rubocop:disable Layout/LineLength
|
255
278
|
|
256
|
-
|
279
|
+
data.public_send(name, *args)
|
280
|
+
else
|
281
|
+
super
|
282
|
+
end
|
257
283
|
end
|
258
284
|
|
259
285
|
def respond_to_missing?(name, include_private = false)
|
data/lib/chamber/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chamber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekompanee
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
fdbUKgJXqJeb4GYhiKV07l67XExVjmAklMuA6bcB7mk+aSYUkoWNic4ZYGNjVv88
|
37
37
|
AapqLKNG/UPfrJhdhTtFR4ARb8f54rgzONhTaAqVk23Bdp1yoDXaulFCkmU=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2020-12-
|
39
|
+
date: 2020-12-31 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
metadata.gz.sig
CHANGED
Binary file
|