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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/etcd-discovery/host.rb +5 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b5c677fe96d934b86e349eb94aef2aa21525d6c8
4
- data.tar.gz: 8ed8cd96ec21025d4c87804d7b1025f972e72b4d
3
+ metadata.gz: 93e0ee38c5689c83c622bd14bb1aa4871a8c7a53
4
+ data.tar.gz: d2791c45b76cc5ea0a637fb65913e6c32a06ef07
5
5
  SHA512:
6
- metadata.gz: 8d05eddc30380e7bd729679aa7fcf4355324bee44de1373a136862ee676a7fa1d4fff67ffd2646fe570022aa8c047c14249343ff28cef1e98eec3e3d46d51394
7
- data.tar.gz: 2258762dd84a142e269594a57d6d12474f287d9f7cfd938096fb3bcbfae39b88cc06bc7a8e63cc99de143489c686873544a39f4c7bf8ec79cf8ee9b440d887db
6
+ metadata.gz: fa1a46d9249097d352b5e3bab389dd6e822c1ee28e47897c23eb828dfaa7c1a30a58667716c756e94e7740510454e2ed4afc6bbfe585262ea07a9a537889f8ba
7
+ data.tar.gz: 5ac6fdf7a1ec4a832083ebe4228e60d7c5b9b5327d9949f93f32f59d26cb4f64a1bd3b04a410a291e4e7326fb48a69bf06d854daa2f3ab52af6a517a41334570
@@ -24,7 +24,11 @@ module EtcdDiscovery
24
24
  attributes.to_json
25
25
  end
26
26
 
27
- def to_uri(scheme = "http")
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.2
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: 2015-01-08 00:00:00.000000000 Z
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.4.5
61
+ rubygems_version: 2.5.1
62
62
  signing_key:
63
63
  specification_version: 4
64
64
  summary: Service discovery based on etcd