etcenv 0.2.0 → 0.3.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: e08b420a67f38847ae025f781cbedb6484a0af74
4
- data.tar.gz: 84cc434c7876ceb2f31e0158dde5665d4d005d73
3
+ metadata.gz: 19de4fc0206ca8af68639d9b6c67b17cdb032e50
4
+ data.tar.gz: 8ffcea65ea09e48b7b4e03f634576c06caeda417
5
5
  SHA512:
6
- metadata.gz: 033c93840d0379655f653c87a5fcd551b171489c6bd24d859dda7be495b3c1ce45c831f53e98916acd31fdfea25d87ae8ed84a10975a28836c9b00e04e373c65
7
- data.tar.gz: fa114bfa98c149a549cd0c68b1424b758ee57fb30a7d8d2a25a1919639ae49de6490925fc5f193978dd4acff3efce79b3fa84bc405ab908c267cdb50760fb198
6
+ metadata.gz: 40242eb90c4420c50c33fc0f7b504450f69f4113d0b5b2932a44dcff332925026c8f9b33be1377e3cd3c31b1ce0f144fb3ace65ce3a8592202c9cbf9a39b8378
7
+ data.tar.gz: 9e6d6f33ee891675e53393062dbd3e85f036fb5a33f2f46f812cbd66d2a50982cd51e79306bcbadd51b4c84cb4fee17164ffe3a275701d14127ec57fae8b4e69
data/.travis.yml CHANGED
@@ -1,3 +1,16 @@
1
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
2
4
  rvm:
3
- - 2.2.0
5
+ - "2.2"
6
+ - "2.1"
7
+ - "2.0.0"
8
+ - "ruby-head"
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - rvm:
13
+ - "ruby-head"
14
+ fast_finish: true
15
+
16
+ script: bundle exec rspec -fd ./spec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Etcenv: Dump etcd keys into dotenv file or docker env file
2
2
 
3
+ [![Build Status](https://travis-ci.org/sorah/etcenv.svg)](https://travis-ci.org/sorah/etcenv)
4
+
3
5
  ## Installation
4
6
 
5
7
  $ gem install etcenv
@@ -77,22 +77,23 @@ module Etcenv
77
77
 
78
78
  node = @etcd.get(key).node
79
79
 
80
- unless node.dir
81
- raise NotDirectory, "#{key} is not a directory"
82
- end
83
-
84
- dir = {}
85
- index = 0
86
-
87
- node.children.each do |child|
88
- name = child.key.sub(/^.*\//, '')
89
-
90
- index = [index, child.modified_index].max
91
- if child.dir
92
- next
93
- else
94
- dir[name] = child.value
80
+ if node.dir
81
+ dir = {}
82
+ index = 0
83
+
84
+ node.children.each do |child|
85
+ name = child.key.sub(/^.*\//, '')
86
+
87
+ index = [index, child.modified_index].max
88
+ if child.dir
89
+ next
90
+ else
91
+ dir[name] = child.value
92
+ end
95
93
  end
94
+ else
95
+ dir = {key.sub(/^.*\//, '') => node.value}
96
+ index = node.modified_index
96
97
  end
97
98
 
98
99
  modified_indices[key] = index
@@ -1,3 +1,3 @@
1
1
  module Etcenv
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.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.2.0
4
+ version: 0.3.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-08 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler