figaro_secrets 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/figaro_secrets/parser.rb +2 -2
- data/lib/figaro_secrets/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 484658da21b8d27f69de69be0f018d61f4da47240f3e82d0fc4116485153cecd
|
4
|
+
data.tar.gz: eda564830a347519b50ccecdc6df07ffe7648cfe82e2764611804fd714d00446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3c5bb1a8a7986689e85a784b8d41258a589fa34eb3ff4503a23dd7e6d8592a6e957ebe6b0b08fa8a59080914ec88687017988f599b58eef156d698d70d95b1
|
7
|
+
data.tar.gz: 6cb26362bba924d133eb33d735a4e1261ad2758e0b14707fd7db6788b5502b19a1569711f9256778d11b51432f76f526c11d174bf1ebb683bef9aa20619ac13d
|
data/Gemfile.lock
CHANGED
@@ -3,14 +3,14 @@ module FigaroSecrets
|
|
3
3
|
SECRET_REGEX = /^secretsmanager:(?<secret>.*)/
|
4
4
|
|
5
5
|
def parse_secrets(configuration)
|
6
|
-
return configuration unless FigaroSecrets.enabled?
|
7
|
-
|
8
6
|
configuration.inject({}) do |memo, (key, value)|
|
9
7
|
memo.merge(key => parse_secret(key, value))
|
10
8
|
end
|
11
9
|
end
|
12
10
|
|
13
11
|
def parse_secret(key, value)
|
12
|
+
return unless FigaroSecrets.enabled?
|
13
|
+
|
14
14
|
if value =~ SECRET_REGEX
|
15
15
|
secrets_manager.get_secret($1)
|
16
16
|
else
|