diplomat 2.4.0 → 2.4.1

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: dc7fe7869eadb5b93aa45340e84587d631975b4a90507a05168bea3018670054
4
- data.tar.gz: 6e5516f00e6d51bc36cb7ee8abf39d8a4f2c8c4b689ff15b39bbf7586cdb8613
3
+ metadata.gz: 1f1cb3ae2d7bea15d702357e477052934432379e9b3fdc485626ede61a2f6581
4
+ data.tar.gz: e06c391b4399377276712b66d85fca0318e7a8a5a693cfa58e0ad2a11bd1ae3c
5
5
  SHA512:
6
- metadata.gz: 41dc809f1752060d51e33edb6a4989a451ec7690ebb80516906b914ce8fa1b9a2ddee570ee98216ec19ad6921f162e0c8ee732d674f46c7e9bc2f63bbe1077fa
7
- data.tar.gz: 1cb32fb53c7e619de9170733918e0e359092ba453c6574277df69ebb63b50bb2027fa0467183cfb1f52046cb974c5e1741a76322539be14ccf02eacfc1da25bd
6
+ metadata.gz: 1c29f9052f83dc86b2eeb7606e50188972b9ce47f2161ff9b246f4b6d888089662fd08842975d54e50387656abb6aa11f4302de5a52a0d531de19ec21141617f
7
+ data.tar.gz: 898502913bc50f5ccea0f50f972312c92fad4c0d1ad972e23c183368460f48e74d60b1ad660db42eec6351ea5e13a119b30b9e250350340c2623913b72dbc34b
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'deep_merge'
3
+ require 'deep_merge/core'
4
4
 
5
5
  module Diplomat
6
6
  # Base class for interacting with the Consul RESTful API
@@ -146,9 +146,12 @@ module Diplomat
146
146
 
147
147
  # Converts k/v data into ruby hash
148
148
  def convert_to_hash(data)
149
- data.map do |item|
149
+ data_h = data.map do |item|
150
150
  item[:key].split('/').reverse.reduce(item[:value]) { |h, v| { v => h } }
151
- end.reduce(:deep_merge)
151
+ end
152
+ data_h.reduce({}) do |dest, source|
153
+ DeepMerge.deep_merge!(source, dest, { preserve_unmergeables: true })
154
+ end
152
155
  end
153
156
 
154
157
  # Parse the body, apply it to the raw attribute
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Diplomat
4
- VERSION = '2.4.0'
4
+ VERSION = '2.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diplomat
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hamelink
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-05-13 00:00:00.000000000 Z
13
+ date: 2020-08-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -270,8 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  - !ruby/object:Gem::Version
271
271
  version: '0'
272
272
  requirements: []
273
- rubyforge_project:
274
- rubygems_version: 2.7.7
273
+ rubygems_version: 3.0.8
275
274
  signing_key:
276
275
  specification_version: 4
277
276
  summary: Diplomat is a simple wrapper for Consul