secret_garden 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/secret_garden/version.rb +1 -1
- data/lib/secret_garden.rb +9 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58535c85003f25bec878fb5bf9608a9bd3417450
|
4
|
+
data.tar.gz: 085ce3fc9da6b7d43d92fa077bfe1af540613288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf3e99050f887e486f5650d1faf40b348625cd970da2d85ab5fe4fb00b0243ec399578154a8181f681d87a0326205116410dd4a7742c90feb40147b9116d9518
|
7
|
+
data.tar.gz: bb554d0653573326a07d69c75cce17d8647eac03cfde6280e90041f6829ca5db6439f6f77e16cbeee92577f03b3781d8f4cacfb653c1eeee382a26ffef93f1fd
|
data/lib/secret_garden.rb
CHANGED
@@ -23,6 +23,15 @@ module SecretGarden
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
def self.fetch!(name)
|
27
|
+
value = fetch(name)
|
28
|
+
if value.nil?
|
29
|
+
raise(SecretNotDefined, "None of your backends have #{name}")
|
30
|
+
else
|
31
|
+
value
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
26
35
|
def self.map
|
27
36
|
@map ||= SecretGarden::Map.new root: secret_file_path, env: env
|
28
37
|
end
|