dryad-consul 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/dryad/consul.rb +7 -2
- data/lib/dryad/consul/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f90d5b5fad7da7535c53c480e9bfaadb8833ee2d50d7e7eb01f489c75a0e4a93
|
4
|
+
data.tar.gz: 24035df45576e6aadbaae41716cd3b1e010c952f30c79730a5247c9cb561168d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53b99aabe4027bb678f3a1cd3201f817cfffebf7b9801279e9c74ee5b0dcd8df154e1f1b2260a7d78d85eca606d03295a8a76feac6b4ff4780e350446b982e4f
|
7
|
+
data.tar.gz: df04d80075f510e7743ef98de2ae292d85701e9d0fc5bd0af4c6c35495ca6802d6c9cfaf467ae82dfbbabc6ff258efde7d894f9eba7dbb06adb94d15e5f037b9
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dryad-consul (0.2.
|
4
|
+
dryad-consul (0.2.6)
|
5
5
|
diplomat (~> 2.2, >= 2.2.4)
|
6
|
-
dryad-core (= 0.2.
|
6
|
+
dryad-core (= 0.2.6)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
diplomat (2.2.5)
|
14
14
|
deep_merge (~> 1.0, >= 1.0.1)
|
15
15
|
faraday (~> 0.9)
|
16
|
-
dryad-core (0.2.
|
16
|
+
dryad-core (0.2.6)
|
17
17
|
faraday (0.15.4)
|
18
18
|
multipart-post (>= 1.2, < 3)
|
19
19
|
multipart-post (2.1.1)
|
data/lib/dryad/consul.rb
CHANGED
@@ -13,9 +13,14 @@ module Dryad
|
|
13
13
|
class Error < StandardError; end
|
14
14
|
class << self
|
15
15
|
def configure_consul(configuration)
|
16
|
+
consul = configuration.consul
|
17
|
+
if consul[:username].nil? || consul[:password].nil?
|
18
|
+
url = "http://#{consul[:host]}:#{consul[:port]}"
|
19
|
+
else
|
20
|
+
url = "http://#{consul[:username]}:#{consul[:password]}@#{consul[:host]}:#{consul[:port]}"
|
21
|
+
end
|
16
22
|
::Diplomat.configure do |config|
|
17
|
-
config.url =
|
18
|
-
config.options = { headers: { "X-Consul-Token" => configuration.consul[:token] } } if configuration.consul[:token]
|
23
|
+
config.url = url
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
data/lib/dryad/consul/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dryad-consul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pan Jie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dryad-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: diplomat
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|