etcd-discovery 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/etcd-discovery/host.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93e0ee38c5689c83c622bd14bb1aa4871a8c7a53
|
4
|
+
data.tar.gz: d2791c45b76cc5ea0a637fb65913e6c32a06ef07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa1a46d9249097d352b5e3bab389dd6e822c1ee28e47897c23eb828dfaa7c1a30a58667716c756e94e7740510454e2ed4afc6bbfe585262ea07a9a537889f8ba
|
7
|
+
data.tar.gz: 5ac6fdf7a1ec4a832083ebe4228e60d7c5b9b5327d9949f93f32f59d26cb4f64a1bd3b04a410a291e4e7326fb48a69bf06d854daa2f3ab52af6a517a41334570
|
data/lib/etcd-discovery/host.rb
CHANGED
@@ -24,7 +24,11 @@ module EtcdDiscovery
|
|
24
24
|
attributes.to_json
|
25
25
|
end
|
26
26
|
|
27
|
-
def to_uri(
|
27
|
+
def to_uri(schemes = ["https", "http"])
|
28
|
+
schemes = [schemes] if !schemes.is_a?(Array)
|
29
|
+
scheme = schemes.select{|s|
|
30
|
+
!a['ports'][s].nil?
|
31
|
+
}.first
|
28
32
|
a = attributes # Shorten name
|
29
33
|
if a['user'].empty?
|
30
34
|
URI("#{scheme}://#{a['name']}:#{a['ports'][scheme]}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etcd-discovery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Léo Unbekandt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: etcd
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.
|
61
|
+
rubygems_version: 2.5.1
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Service discovery based on etcd
|