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 +4 -4
- data/lib/diplomat/rest_client.rb +6 -3
- data/lib/diplomat/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f1cb3ae2d7bea15d702357e477052934432379e9b3fdc485626ede61a2f6581
|
4
|
+
data.tar.gz: e06c391b4399377276712b66d85fca0318e7a8a5a693cfa58e0ad2a11bd1ae3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c29f9052f83dc86b2eeb7606e50188972b9ce47f2161ff9b246f4b6d888089662fd08842975d54e50387656abb6aa11f4302de5a52a0d531de19ec21141617f
|
7
|
+
data.tar.gz: 898502913bc50f5ccea0f50f972312c92fad4c0d1ad972e23c183368460f48e74d60b1ad660db42eec6351ea5e13a119b30b9e250350340c2623913b72dbc34b
|
data/lib/diplomat/rest_client.rb
CHANGED
@@ -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
|
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
|
data/lib/diplomat/version.rb
CHANGED
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.
|
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-
|
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
|
-
|
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
|