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 +4 -4
- data/lib/secrets_manager/railtie.rb +7 -2
- data/lib/secrets_manager/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: a507cb98a6f903c11f49223a27239458ab5d9989500d43e9b3ede1eecb1b469f
|
4
|
+
data.tar.gz: 8b63262811395af84b6314229785e82a06ab14e15a1b39eba41c2e78a5eb6bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
20
|
-
|
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
|
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.
|
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-
|
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
|