secrets_manager 0.2.0 → 0.2.1

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: 96b49a6b9e2c3aebb09e2dc0a14dee6e78212f2461a554a5b0a6cc2bc460f6de
4
- data.tar.gz: ae38f74722ff1d41e6c550f05d18f3236c87045b7b049bb0df88fec39d27ec0b
3
+ metadata.gz: a507cb98a6f903c11f49223a27239458ab5d9989500d43e9b3ede1eecb1b469f
4
+ data.tar.gz: 8b63262811395af84b6314229785e82a06ab14e15a1b39eba41c2e78a5eb6bde
5
5
  SHA512:
6
- metadata.gz: '09132b27bf6db0a9822b7ed44de7614c0bb0927ce080e5713ddf0e2a39f7868b7c7ca983b026608c54deffe81dd15f2ed96f4e708d5e06c704e5124bec0a5375'
7
- data.tar.gz: 685cc0d9335183c83cc28fcdc586f4acf0db295661166ecbfc2892ed257c7b5e7139b6eb75972a04d10d14213828fdae85a9ac5923b15f172a55b42f90fb6bf7
6
+ metadata.gz: 5de1bb25e82d054ece8571478f1b770d1793edf7735728818a8c3d1caac75d0896c28779dacdab7f81b70712bf04c7ba677ff867c91705fe4c7a80e9e42939b7
7
+ data.tar.gz: d071322c3937ac584f44f5075ebc73cfd734a16e3ce38d7d19b438940a86d11db3fd16e071fe8b5312db01fa1a24551780be7b79a4a4e7f77d790f7128e708dd
@@ -1,5 +1,6 @@
1
1
  require 'secrets_manager/config'
2
2
  require 'secrets_manager/client'
3
+ require 'secrets_manager/helpers'
3
4
 
4
5
  module SecretsManager
5
6
  class Railtie < ::Rails::Railtie
@@ -16,8 +17,12 @@ module SecretsManager
16
17
  secrets_config.secrets.each do |secret|
17
18
  next if File.file?(Rails.root.join(secret.path))
18
19
 
19
- aws_client.get_secret_hash(secret.id).each do |key, value|
20
- ENV[key.to_s] = value
20
+ if secret.plaintext? && secret.to_file?
21
+ write_to_file(aws_client.get_secret_string(secret.id), secret.path)
22
+ else
23
+ aws_client.get_secret_hash(secret.id).each do |key, value|
24
+ ENV[key.to_s] = value
25
+ end
21
26
  end
22
27
  end
23
28
  end
@@ -1,3 +1,3 @@
1
1
  module SecretsManager
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secrets_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hmatic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-16 00:00:00.000000000 Z
11
+ date: 2019-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-secretsmanager