etcenv 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etcenv.gemspec +1 -0
- data/lib/etcenv/environment.rb +7 -0
- data/lib/etcenv/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2076de28de3ae501de6e43ede44ca40afe4b0695
|
4
|
+
data.tar.gz: ea341c5082a82db4af70aaf38c0eb4818cab8615
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41a2e9e9005c4fa4ec9ba33f35de7846e628be1cb2d5d88f3fd1a1ce135b4287afc150117628085ee31ecb474a9b8be1ece1691e55846a842e94ec73c2092587
|
7
|
+
data.tar.gz: 848a0d5dd1c6e4973fee54a171a2cfadf1acb20a1a9771e26f730ee6cfd816d806cee0121b1fb3f5f5ba73311ab428f05f8ed5f19d5ec7061826db1dfabe1363
|
data/etcenv.gemspec
CHANGED
data/lib/etcenv/environment.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'etcenv/variable_expander'
|
2
|
+
require 'etcd'
|
3
|
+
require 'etcd/etcvault'
|
2
4
|
|
3
5
|
module Etcenv
|
4
6
|
class Environment
|
@@ -6,6 +8,7 @@ module Etcenv
|
|
6
8
|
class DepthLimitError < StandardError; end
|
7
9
|
class LoopError < StandardError; end
|
8
10
|
class KeyNotFound < StandardError; end
|
11
|
+
class EtcvaultFailure < StandardError; end
|
9
12
|
|
10
13
|
INCLUDE_KEY = '.include'
|
11
14
|
MAX_DEPTH_DEFAULT = 10
|
@@ -78,6 +81,10 @@ module Etcenv
|
|
78
81
|
|
79
82
|
node = @etcd.get(key).node
|
80
83
|
|
84
|
+
if node.etcvault_error
|
85
|
+
raise EtcvaultFailure, node.etcvault_error
|
86
|
+
end
|
87
|
+
|
81
88
|
if node.dir
|
82
89
|
dir = {}
|
83
90
|
index = 0
|
data/lib/etcenv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etcenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shota Fukumori (sora_h)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.3.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: etcd-etcvault
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description:
|
70
84
|
email:
|
71
85
|
- sorah@cookpad.com
|