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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34b0f58d198f976d0ac50d7c87ca9b9c4adf3230caed4e41d05689ee99f29a45
4
- data.tar.gz: 372b90498c7caadd46307badc18e1e55bad4b5a2c4c9294141c80f6df5d64116
3
+ metadata.gz: 05fd377e16ccf8c9794b6ab60271673281847ed5437586541ea6e94216c0da1c
4
+ data.tar.gz: 55ba443565783633ab9e7a6e6116737dcc7872dbf2a554e27bb784299c389727
5
5
  SHA512:
6
- metadata.gz: d1a6ff14bb2425fb626d5f8405ff1535caf64ce64bef0a51fb8dee72ac0c9e90a9c7c114e345092112a3347efebc010f5c49f3fb537cd0d72231770c73a337fe
7
- data.tar.gz: 5f54758e9a1cda0f58ba4fc2dd41e36d84dc7202eea2c32c539f0f933893e1da93bd9520070d3043d2ad336473e7d4278d1e20aa43a3766d13ef1b235b215051
6
+ metadata.gz: 255ecfabb555c29350d1d69a95ea1b919969a254b72fdb7875383a002299f42cb0a953bb07f3ca559e93d2517d75917e0645313aeb898a5e5dd51bbe15d54623
7
+ data.tar.gz: f804b7f7aa1d9e17343ead89f16108d62494b9cb4b075d46ff54d861dc81127ec47deca6b78a1b82d145158d0ba8b72c9bc08dc5da0bd12e57014edaf7279913
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fsecret_loader (0.1.2)
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.268.0)
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)
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FsecretLoader
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  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.2
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-28 00:00:00.000000000 Z
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