rubyconfig-vault 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/vault/vault_source.rb +4 -3
- data/lib/config/vault/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: c8983ba9504c855d75c19d322a3d3c501749f8f076a9e10c9ebc00b31b3d3167
|
4
|
+
data.tar.gz: 9dc89fac7bcabde9c1327ee1dc1f17f6f14ee1cf145acce4449b4a256c6594b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75ff199594c448bd6976efee7dda5a71d2d75806f98d3b9156bf01c28b7598f30a797141f7cb58ddf791a2abedcd0dc38b748361fb00b07e4eaf919d1e2d7dd8
|
7
|
+
data.tar.gz: c4e4bdc78601d67d8f853ac31ddfd4eabc5739a66e1df8380ad68dc47895fc3802035143dffba9544ac688bcb28c95da43e4e318e51fd8c4d79b258615b60b12
|
@@ -29,7 +29,7 @@ module Config
|
|
29
29
|
@root = client_opts.delete(:root)
|
30
30
|
@flatten = client_opts.delete(:flatten)
|
31
31
|
@paths << client_opts.delete(:paths) if client_opts.key?(:paths)
|
32
|
-
|
32
|
+
map({})
|
33
33
|
@paths.map! do |p|
|
34
34
|
if p.is_a?(Array)
|
35
35
|
p
|
@@ -58,6 +58,7 @@ module Config
|
|
58
58
|
# @param hsh [Hash] mappings for keys
|
59
59
|
def map(hsh)
|
60
60
|
@map = hsh
|
61
|
+
@map.transform_keys! { |k| k.to_sym }
|
61
62
|
end
|
62
63
|
|
63
64
|
# Remove added paths
|
@@ -90,7 +91,7 @@ module Config
|
|
90
91
|
def read_at_path(query_path)
|
91
92
|
client_ops.read(query_path)&.data || {}
|
92
93
|
rescue ::Vault::HTTPClientError => e
|
93
|
-
if e.code == 403
|
94
|
+
if e.code.to_i == 403
|
94
95
|
raise VaultError, "Attempting to read at path #{query_path}\n#{e.response}", caller
|
95
96
|
else
|
96
97
|
raise RecoverableVaultError, e.response, caller
|
@@ -114,7 +115,7 @@ module Config
|
|
114
115
|
def process_paths
|
115
116
|
root = {}
|
116
117
|
parsed_paths = @paths.map { |p| process_path(p) }
|
117
|
-
parsed_paths.each { |p| root.
|
118
|
+
parsed_paths.each { |p| root.deep_merge!(p) }
|
118
119
|
|
119
120
|
root
|
120
121
|
end
|
data/lib/config/vault/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyconfig-vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Young
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vault
|