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 +5 -5
- data/lib/capistrano/consul.rb +4 -2
- data/lib/capistrano/consul/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4ff2ae3694e365ebc7569e07f42976eb8f4e96d4b66f2270d1ab74cb3f94167c
|
4
|
+
data.tar.gz: 056d4f3f89b4f3b05594a415cfece548d377711d1856e38af8513c64422c0f36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 847001297bc9e563457c21b979041eae8fbe2bbdbb2dc81c84594e46791fc3bdfcbafc2d8a51847876a2080eb881c869df4dfebe20ddf0543352a27846302ae8
|
7
|
+
data.tar.gz: 81c71f99cb8da2953dcbfa8d05fe903c27173f1141e090e99b8da2aee4e6e18c12854fab18a828a31fbcb9878bc1ba05ff5aab9806786ca1cb373d397c1d569a
|
data/lib/capistrano/consul.rb
CHANGED
@@ -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.
|
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).
|
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
|
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.
|
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:
|
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.
|
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.
|