google_cloud_env_secrets 1.0.1 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f6fb0a3005e03c0be10f2e423f049ec2c103f44696f43eb47f62bdfc5d4a109
|
4
|
+
data.tar.gz: c2111c2c4a8819321a1875c46651a16d847b1f6fb9e20d6ea821ae136571a38c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1a64482d17981bc421768820d5b07b40a5c6dd0a64c93b80f01bed0ae61b425a7938a2faf1b961b4401e25840d286dbd84ec191cb158d30a1902043a2b5722
|
7
|
+
data.tar.gz: 44d02eb848d40f9314d4d7fa4a16c2f57e1aa020b130d6843810b74245b11d5d96c6b2cc8c13651fd51b701c49068994ffc008a21b81dab6242c07733265853d
|
@@ -10,10 +10,12 @@ module GoogleCloudEnvSecrets
|
|
10
10
|
# Configure and initialize
|
11
11
|
# https://googleapis.dev/ruby/google-cloud-secret_manager/latest/Google/Cloud/SecretManager.html
|
12
12
|
Google::Cloud::SecretManager.configure do |config|
|
13
|
-
if
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
if self.configuration.credentials
|
14
|
+
if File.exist?(self.configuration.credentials)
|
15
|
+
config.credentials = self.configuration.credentials # load by file
|
16
|
+
else
|
17
|
+
config.credentials = JSON.parse(self.configuration.credentials) # load data
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|