capistrano3-consul 0.3.4 → 0.3.5

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: 4ff2ae3694e365ebc7569e07f42976eb8f4e96d4b66f2270d1ab74cb3f94167c
4
- data.tar.gz: 056d4f3f89b4f3b05594a415cfece548d377711d1856e38af8513c64422c0f36
3
+ metadata.gz: 798809c6aed6cf2f034067dbaaa89c136b3054ee397d4ea850d4db4bb80a8834
4
+ data.tar.gz: e066f85dd0e0af201e33152b91fa5b60c7133cabfcd48d9bce6374cf2a6952a7
5
5
  SHA512:
6
- metadata.gz: 847001297bc9e563457c21b979041eae8fbe2bbdbb2dc81c84594e46791fc3bdfcbafc2d8a51847876a2080eb881c869df4dfebe20ddf0543352a27846302ae8
7
- data.tar.gz: 81c71f99cb8da2953dcbfa8d05fe903c27173f1141e090e99b8da2aee4e6e18c12854fab18a828a31fbcb9878bc1ba05ff5aab9806786ca1cb373d397c1d569a
6
+ metadata.gz: 5913b8f2de638df458a86a66ee9e42ae014e4f78ad2cd5b45af4e9f34639eb05366922bbf2f2f33dbe8757caa5c181675a6c542995587bdc1a091dd85fd95336
7
+ data.tar.gz: dedd36b0502a81750dfd94fde7116a6af311ef0388873cf139a5de3c1557b9e08aad39e2d73282c4fa6e11603afee0fb04660a068c9ab906658977641c30b0d9
@@ -28,16 +28,16 @@ module Capistrano
28
28
  def consul_all_nodes(properties = {})
29
29
  Consul.setup
30
30
  Diplomat::Node.get_all.each_with_index do |node, index|
31
- properties[:primary] = true if index == 0
32
- server(node['Address'], properties)
31
+ extra_properties = index.zero? ? { primary: true } : {}
32
+ server(node['Address'], properties.merge(extra_properties))
33
33
  end
34
34
  end
35
35
 
36
36
  def consul_service(service_name, properties = {})
37
37
  Consul.setup
38
38
  Diplomat::Service.get(service_name, :all).each_with_index do |node, index|
39
- properties[:primary] = true if index == 0
40
- server(node['Address'], properties)
39
+ extra_properties = index.zero? ? { primary: true } : {}
40
+ server(node['Address'], properties.merge(extra_properties))
41
41
  end
42
42
  end
43
43
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Consul
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Fernandez (magec)