fsecret_loader 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 +2 -2
- data/lib/fsecret_loader.rb +5 -0
- data/lib/fsecret_loader/configuration.rb +9 -1
- data/lib/fsecret_loader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05fd377e16ccf8c9794b6ab60271673281847ed5437586541ea6e94216c0da1c
|
4
|
+
data.tar.gz: 55ba443565783633ab9e7a6e6116737dcc7872dbf2a554e27bb784299c389727
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 255ecfabb555c29350d1d69a95ea1b919969a254b72fdb7875383a002299f42cb0a953bb07f3ca559e93d2517d75917e0645313aeb898a5e5dd51bbe15d54623
|
7
|
+
data.tar.gz: f804b7f7aa1d9e17343ead89f16108d62494b9cb4b075d46ff54d861dc81127ec47deca6b78a1b82d145158d0ba8b72c9bc08dc5da0bd12e57014edaf7279913
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fsecret_loader (0.1.
|
4
|
+
fsecret_loader (0.1.3)
|
5
5
|
aws-sdk-secretsmanager
|
6
6
|
|
7
7
|
GEM
|
@@ -9,7 +9,7 @@ GEM
|
|
9
9
|
specs:
|
10
10
|
ast (2.4.0)
|
11
11
|
aws-eventstream (1.0.3)
|
12
|
-
aws-partitions (1.
|
12
|
+
aws-partitions (1.269.0)
|
13
13
|
aws-sdk-core (3.89.1)
|
14
14
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
15
15
|
aws-partitions (~> 1, >= 1.239.0)
|
data/lib/fsecret_loader.rb
CHANGED
@@ -13,6 +13,7 @@ module FSecretLoader
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def load
|
16
|
+
# require 'pry'; binding.pry
|
16
17
|
return if configuration.secret_id.nil?
|
17
18
|
|
18
19
|
secrets.each_pair do |key, value|
|
@@ -24,6 +25,10 @@ module FSecretLoader
|
|
24
25
|
@configuration ||= Configuration.new
|
25
26
|
end
|
26
27
|
|
28
|
+
def reset
|
29
|
+
@configuration = nil
|
30
|
+
end
|
31
|
+
|
27
32
|
private
|
28
33
|
|
29
34
|
def secrets
|
@@ -9,11 +9,19 @@ module FSecretLoader
|
|
9
9
|
set_default_values
|
10
10
|
end
|
11
11
|
|
12
|
+
def secret_client
|
13
|
+
@secret_client || default_client
|
14
|
+
end
|
15
|
+
|
12
16
|
private
|
13
17
|
|
14
18
|
def set_default_values
|
15
|
-
@secret_manager_client = Aws::SecretsManager::Client.new
|
16
19
|
@secret_id = ENV['AWS_SECRETS_MANAGER_ID']
|
20
|
+
@secret_manager_client = nil
|
21
|
+
end
|
22
|
+
|
23
|
+
def default_client
|
24
|
+
Aws::SecretsManager::Client.new
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fsecret_loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Faizal Zakaria
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-secretsmanager
|