wes-cloudkit 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wes/cloudkit/app_config.rb +15 -5
- data/lib/wes/cloudkit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a20dd55d3f73adc27f15cc6b29a9d51ea1b710ad
|
4
|
+
data.tar.gz: 86cf14f864255a5e2855462ee42ac1f5698f5ecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76517a24b56d63dffdab13c9f00525adae3882f20d488b624449712224d1c5f7216df3d09b0532819fa32c8fe41389760466133615ab4685db3e045ec5d271e2
|
7
|
+
data.tar.gz: 5c69098aca3603129022a35216de63f6173cec95f78fe63f92db6ce03f5788ea20df7a9c477c5dc3206992f7cb4d7b372441dce505f1811f4b95297ef42a2a88
|
@@ -18,16 +18,14 @@ module Wes
|
|
18
18
|
|
19
19
|
private
|
20
20
|
|
21
|
+
ENV_KEY_BASE = 'VIDSY_VAR'.freeze
|
22
|
+
|
21
23
|
attr_reader :json
|
22
24
|
|
23
25
|
def aws_env
|
24
26
|
configuration.aws_env
|
25
27
|
end
|
26
28
|
|
27
|
-
def kms_client
|
28
|
-
@kms_client ||= Aws::KMS::Client.new
|
29
|
-
end
|
30
|
-
|
31
29
|
def configuration
|
32
30
|
Configuration
|
33
31
|
end
|
@@ -38,6 +36,15 @@ module Wes
|
|
38
36
|
).plaintext
|
39
37
|
end
|
40
38
|
|
39
|
+
def fetch_env_override(node, key)
|
40
|
+
env_key = format('%s_%s_%s', ENV_KEY_BASE, node.upcase, key.upcase)
|
41
|
+
ENV[env_key]
|
42
|
+
end
|
43
|
+
|
44
|
+
def kms_client
|
45
|
+
@kms_client ||= Aws::KMS::Client.new
|
46
|
+
end
|
47
|
+
|
41
48
|
def path
|
42
49
|
File.join(
|
43
50
|
root, "config", "#{aws_env}.config.json"
|
@@ -52,7 +59,10 @@ module Wes
|
|
52
59
|
if rj[node][key]["secure"] == true
|
53
60
|
rj[node][key]["value"] = decrypt(rj[node][key]["value"])
|
54
61
|
end
|
55
|
-
|
62
|
+
|
63
|
+
env_override = fetch_env_override(node, key)
|
64
|
+
rj[node][key] = env_override ? env_override
|
65
|
+
: rj[node][key]["value"]
|
56
66
|
end
|
57
67
|
end
|
58
68
|
end
|
data/lib/wes/cloudkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wes-cloudkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|