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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2559db6bd0ddb51b79ccbc657e5f966c165faaa5
4
- data.tar.gz: 5be9d01368e0e6d6b7a47b0c0dc1028520c889ec
3
+ metadata.gz: 2076de28de3ae501de6e43ede44ca40afe4b0695
4
+ data.tar.gz: ea341c5082a82db4af70aaf38c0eb4818cab8615
5
5
  SHA512:
6
- metadata.gz: fe94ab4c655219942e59916e29398ea23f75dab1d31ae56396725b48d810f0c7967e22e22534a8f4b256df1294f35845da5be039256d644ae18724f2e01e099e
7
- data.tar.gz: 00342350b47c4bb1290131b9b31335f614d81b13a800247a92bd47de81412e830a02cfc4d1fba29faaa0406435a5d62bdafaf094f267fc814ebc23e2bd3de0d6
6
+ metadata.gz: 41a2e9e9005c4fa4ec9ba33f35de7846e628be1cb2d5d88f3fd1a1ce135b4287afc150117628085ee31ecb474a9b8be1ece1691e55846a842e94ec73c2092587
7
+ data.tar.gz: 848a0d5dd1c6e4973fee54a171a2cfadf1acb20a1a9771e26f730ee6cfd816d806cee0121b1fb3f5f5ba73311ab428f05f8ed5f19d5ec7061826db1dfabe1363
data/etcenv.gemspec CHANGED
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec"
24
24
 
25
25
  spec.add_dependency "etcd", ">= 0.3.0"
26
+ spec.add_dependency "etcd-etcvault"
26
27
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Etcenv
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
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.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-09 00:00:00.000000000 Z
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