etcd-tools 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/etcd-tools/erb.rb +10 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
N2Q0NWYwZDVmMDVmMjQzNWZhYjAyZTAyNDc3MWU1MGMzZDQ1ZDBmOA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NDFiYjU0NWMxZDFhMTk0YmI1MDEwNGUwZTU0OTlmM2I5N2FmNjg2MQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ODBkOWQyNDRiMjk3MzRlOWQzMWNlZGUwYWY0MDIxMTVjNmM0Y2Y2NmM2Y2Vl
|
|
10
|
+
YmQ3NjNlMzZhYWZiMGRmYWI0MzMxY2VmYTk0MWNjM2RjMTQ1MjdhZjk5YmQx
|
|
11
|
+
YjMyZGYzNDhjODI5MGUyMmQxZjcwNTM4YTZmOGFmZTlhMDQyMjg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MWM3NzUyNTYxODAxNzcxY2Y3MTIzMTZjYWQyYzEyMDRhOTgxNmVmZmU4ZTE4
|
|
14
|
+
OGJmZDY5M2RkNTkyMWM5ZDk4ZGQwZWQyYTAzNTM5MmMyMmI2ZTNmMTE3ZTFj
|
|
15
|
+
MjI5OWVkZTkxNmZjMWQ2MjJmMGY1NDdiNmMzNjJjYmZiMzRjNjU=
|
data/lib/etcd-tools/erb.rb
CHANGED
|
@@ -3,11 +3,12 @@ require 'etcd-tools/etcd'
|
|
|
3
3
|
|
|
4
4
|
module EtcdTools
|
|
5
5
|
class Erb < ::ERB
|
|
6
|
+
|
|
6
7
|
include EtcdTools::Etcd
|
|
7
8
|
|
|
8
9
|
attr_reader :etcd
|
|
9
10
|
|
|
10
|
-
def initialize (etcd, template, requires=['yaml'])
|
|
11
|
+
def initialize (etcd, template, requires=['yaml', 'json'])
|
|
11
12
|
@safe_level = nil
|
|
12
13
|
requires.each do |r|
|
|
13
14
|
require r
|
|
@@ -37,6 +38,14 @@ module EtcdTools
|
|
|
37
38
|
end
|
|
38
39
|
end
|
|
39
40
|
|
|
41
|
+
def hash path
|
|
42
|
+
begin
|
|
43
|
+
etcd2hash @etcd, path
|
|
44
|
+
rescue
|
|
45
|
+
{}
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
40
49
|
def members
|
|
41
50
|
Hash[ @etcd.members.map { |id, md| [ id, md.merge({ "ip" => md["clientURLs"].first.sub(/https?:\/\//, '').sub(/:[0-9]+/, '') }) ] } ]
|
|
42
51
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: etcd-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Radek 'blufor' Slavicinsky
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: etcd
|
|
@@ -55,10 +55,10 @@ description: A set of handful daemons and command-line utils for ETCD (is part o
|
|
|
55
55
|
email: radek.slavicinsky@gmail.com
|
|
56
56
|
executables:
|
|
57
57
|
- etcd-watchdog-haproxy
|
|
58
|
-
- etcd2yaml
|
|
59
58
|
- etcd-watchdog-vip
|
|
60
59
|
- etcd-erb
|
|
61
60
|
- yaml2etcd
|
|
61
|
+
- etcd2yaml
|
|
62
62
|
extensions: []
|
|
63
63
|
extra_rdoc_files: []
|
|
64
64
|
files:
|