harmony-service 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/harmony/service/utils/secrets.rb +10 -6
- data/lib/harmony/service/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c789a990273ed57aa0d9c08e07c5ba6843eb378b
|
4
|
+
data.tar.gz: c6a22f81d6a72dc7587cb7a58f42bd9c9ee0f210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff928f33d09c9c789042dd8ba5587b9c5cf1f474a77ec5b18d32022adb5c03172947816adbb8b067f3da6d5ee7ae102f6a9c00ecd7231f7ec0c0e9209e49ef83
|
7
|
+
data.tar.gz: 565db571ab1c46ea7f20484dda6f22737e86375b5d05ed644481fcebc8923c3fe35cbd36dc32e5723513ab4e8ff3665d4d28097ed6eb40d4f0187238d2deb320
|
@@ -5,12 +5,16 @@ module Harmony
|
|
5
5
|
module Utils
|
6
6
|
class Secrets
|
7
7
|
|
8
|
-
def self.load
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def self.load
|
9
|
+
sekrets_file_path = './config/settings.yml.enc'
|
10
|
+
if File.exist?(sekrets_file_path)
|
11
|
+
env = ENV['HARMONY_ENV']
|
12
|
+
abort "ENV['HARMONY_ENV'] must be set." unless env
|
13
|
+
|
14
|
+
puts "Reading secrets from #{sekrets_file_path}"
|
15
|
+
secrets = Sekrets.settings_for(sekrets_file_path)[env]
|
16
|
+
secrets.each_pair{|k,v| ENV[k] = v.to_s }
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|