capistrano3-consul 0.3.3 → 0.3.4

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
- SHA1:
3
- metadata.gz: c20900e6ac07e4780425ca5d05c17e0b07252ef3
4
- data.tar.gz: d0baeba484af6770f761152bc50f5a7164c1edbe
2
+ SHA256:
3
+ metadata.gz: 4ff2ae3694e365ebc7569e07f42976eb8f4e96d4b66f2270d1ab74cb3f94167c
4
+ data.tar.gz: 056d4f3f89b4f3b05594a415cfece548d377711d1856e38af8513c64422c0f36
5
5
  SHA512:
6
- metadata.gz: 1d49676d33ffb6c6c38ccbce85fba0793ad45ba983daf760ac6a14ee25065437f428b68ce8ef3b2cf7c42fb5bd312333b83ac7bc1958e1c91b5098d4e439739f
7
- data.tar.gz: 30b15a8d0ea775479f80343b0891ba533c7dcb1f738ec437bf719b307e357deaa1c974e0c8724f843b6a441e05ef189a42af894873d18aab66a10b46df2f3f93
6
+ metadata.gz: 847001297bc9e563457c21b979041eae8fbe2bbdbb2dc81c84594e46791fc3bdfcbafc2d8a51847876a2080eb881c869df4dfebe20ddf0543352a27846302ae8
7
+ data.tar.gz: 81c71f99cb8da2953dcbfa8d05fe903c27173f1141e090e99b8da2aee4e6e18c12854fab18a828a31fbcb9878bc1ba05ff5aab9806786ca1cb373d397c1d569a
@@ -27,14 +27,16 @@ module Capistrano
27
27
  module DSL
28
28
  def consul_all_nodes(properties = {})
29
29
  Consul.setup
30
- Diplomat::Node.get_all.each do |node|
30
+ Diplomat::Node.get_all.each_with_index do |node, index|
31
+ properties[:primary] = true if index == 0
31
32
  server(node['Address'], properties)
32
33
  end
33
34
  end
34
35
 
35
36
  def consul_service(service_name, properties = {})
36
37
  Consul.setup
37
- Diplomat::Service.get(service_name, :all).each do |node|
38
+ Diplomat::Service.get(service_name, :all).each_with_index do |node, index|
39
+ properties[:primary] = true if index == 0
38
40
  server(node['Address'], properties)
39
41
  end
40
42
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Consul
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano3-consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Fernandez (magec)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2020-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.4.5.1
136
+ rubygems_version: 2.7.6
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Plugin to use a consul server/cluster to define capistrano servers.