secret_garden 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +18 -0
- data/lib/secret_garden/map.rb +4 -2
- data/lib/secret_garden/version.rb +1 -1
- data/lib/secret_garden.rb +1 -9
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3da78f8745497d0bac247302cb5d78106ade5ff7
|
4
|
+
data.tar.gz: ca06edbf632fbc9def6e72e88d2b81fbd2b4b8de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d07e65ce00a14b851143f92f3f1f1b98348ebf373320117b57f345ad47b84974e8a9bf220f1d10b7dc702ef69d4f1f2b71e5fb51f5267f4f9c4edadbcc1529
|
7
|
+
data.tar.gz: 9b847dadff771541a80e1db777c4b8830371e3dceefbbcacf8e1edc9d2798a4238337a47ae2ef12b1898e5a872c43932380f26dc67d0646da79569b48fd27293
|
data/CHANGELOG
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
0.1.0 / 2016-05-04
|
2
|
+
|
3
|
+
* Breaking changes
|
4
|
+
|
5
|
+
* Use latest env var syntax
|
6
|
+
|
7
|
+
0.0.2 / 2016-03-21
|
8
|
+
|
9
|
+
* Enhancements
|
10
|
+
|
11
|
+
* Add SecretGarden.expose
|
12
|
+
* Add SecretGarden.fetch!
|
13
|
+
|
14
|
+
0.0.1 / 2016-03-09
|
15
|
+
|
16
|
+
* Enhancements
|
17
|
+
|
18
|
+
* Basic functionality
|
data/lib/secret_garden/map.rb
CHANGED
@@ -6,7 +6,7 @@ module SecretGarden
|
|
6
6
|
|
7
7
|
attr_accessor :root
|
8
8
|
|
9
|
-
def initialize(root: Dir.pwd
|
9
|
+
def initialize(root: Dir.pwd)
|
10
10
|
self.root = root
|
11
11
|
end
|
12
12
|
|
@@ -37,7 +37,9 @@ module SecretGarden
|
|
37
37
|
|
38
38
|
def parse_secret(line)
|
39
39
|
name, path, property = line.scan(/([^\s]+)\s+([^:]+)(:.*)?/).first
|
40
|
-
path.gsub!
|
40
|
+
path.gsub!(/\$(?:([a-zA-Z_][a-zA-Z0-9_]*)|{([a-zA-Z_][a-zA-Z0-9_]*)})/) do
|
41
|
+
ENV.fetch($1 || $2)
|
42
|
+
end
|
41
43
|
[name, path, property.to_s[1..-1]]
|
42
44
|
end
|
43
45
|
end
|
data/lib/secret_garden.rb
CHANGED
@@ -37,7 +37,7 @@ module SecretGarden
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def self.map
|
40
|
-
@map ||= SecretGarden::Map.new root: secret_file_path
|
40
|
+
@map ||= SecretGarden::Map.new root: secret_file_path
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.secret_file_path=(val)
|
@@ -46,12 +46,4 @@ module SecretGarden
|
|
46
46
|
def self.secret_file_path
|
47
47
|
@secret_file_path ||= Dir.pwd
|
48
48
|
end
|
49
|
-
|
50
|
-
def self.env=(val)
|
51
|
-
@env = val
|
52
|
-
end
|
53
|
-
def self.env
|
54
|
-
@env ||= 'development' # sane default?
|
55
|
-
end
|
56
|
-
|
57
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: secret_garden
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Kastner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- ".gitignore"
|
77
77
|
- ".rspec"
|
78
78
|
- ".travis.yml"
|
79
|
+
- CHANGELOG
|
79
80
|
- Gemfile
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|