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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 615bbf4df424a7d1f403b806113e097c81ef41752afa9ebd61771d45a10f4991
4
- data.tar.gz: 563b9bd3cd608d49ee2050bd86dd0374cd8fd5a12549f3235f3170ddc65f889a
3
+ metadata.gz: c8983ba9504c855d75c19d322a3d3c501749f8f076a9e10c9ebc00b31b3d3167
4
+ data.tar.gz: 9dc89fac7bcabde9c1327ee1dc1f17f6f14ee1cf145acce4449b4a256c6594b1
5
5
  SHA512:
6
- metadata.gz: 36c354d9baf5cce5f2cd4d0492caa90ae3b77ee4e0e7891d6e260f0a3b2a33f42c749193c5b7c4e82526b5ac9d55dd4d35e4a90a274f89302910deea94f71859
7
- data.tar.gz: 652d144137915a2e7213fbf4cb4fb12efa3fecc8fe6861a376a67ff3c1f6ec7edfc44e364ec07553282b4cc687024c5aab29a826691e910c0d1fd57cd92b6965
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
- @map = {}
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.merge!(p) }
118
+ parsed_paths.each { |p| root.deep_merge!(p) }
118
119
 
119
120
  root
120
121
  end
@@ -1,5 +1,5 @@
1
1
  module Config
2
2
  module Vault
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
5
5
  end
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.5
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-19 00:00:00.000000000 Z
11
+ date: 2022-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vault