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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e71b624891aea1e2fa3c28a1ab7f691ce9f6422e311aa6d114d0272642141c2d
4
- data.tar.gz: 0da8915f54857e5d8c7a270370434a6ac0c80567474b9f8d89194bf4ae2f7f82
3
+ metadata.gz: 484658da21b8d27f69de69be0f018d61f4da47240f3e82d0fc4116485153cecd
4
+ data.tar.gz: eda564830a347519b50ccecdc6df07ffe7648cfe82e2764611804fd714d00446
5
5
  SHA512:
6
- metadata.gz: 5a5c682340264a78e3a12f1824088e1618e71e23b52ad1e03a0881a448642d442c70382417c4f961452447c88a27cc702464dc929bfa9d2da26aa80744a9bb68
7
- data.tar.gz: f2e7ea4548e5e00ad4bb0865dbcef1883a5811405a61bcabba28f3ca6fb01efd5463e0c7a7699ea5fd68ebe8e668e3d84fdd320fa2e14cfdff09fe17b101fd4a
6
+ metadata.gz: 3e3c5bb1a8a7986689e85a784b8d41258a589fa34eb3ff4503a23dd7e6d8592a6e957ebe6b0b08fa8a59080914ec88687017988f599b58eef156d698d70d95b1
7
+ data.tar.gz: 6cb26362bba924d133eb33d735a4e1261ad2758e0b14707fd7db6788b5502b19a1569711f9256778d11b51432f76f526c11d174bf1ebb683bef9aa20619ac13d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- figaro_secrets (0.1.2)
4
+ figaro_secrets (0.1.3)
5
5
  aws-sdk-secretsmanager
6
6
  figaro
7
7
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module FigaroSecrets
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figaro_secrets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cory Kaufman-Schofield