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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32d446a3194b78b6696a98160281a73bbd0981f9
4
- data.tar.gz: 4f46ef07f4b840d88b492a2fcbd3573cf66bf131
3
+ metadata.gz: a20dd55d3f73adc27f15cc6b29a9d51ea1b710ad
4
+ data.tar.gz: 86cf14f864255a5e2855462ee42ac1f5698f5ecd
5
5
  SHA512:
6
- metadata.gz: b2947cda904942c4dba8feb16f5a3603a44e7d75b483a8608d9cc3b15cef04f4f3aaf41fad2d7625c4a81bd719375a98f06d2b412af7151953427568b8b8e711
7
- data.tar.gz: 90ec0241947a545485deffba93a9eb459b033b1b898bdf2f3423dae71cc6461db7680ca73090ed0d05ef4fccaa4ee666c4714573307bfaec36a3be3b1b9e3286
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
- rj[node][key] = rj[node][key]["value"]
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
@@ -1,5 +1,5 @@
1
1
  module Wes
2
2
  module Cloudkit
3
- VERSION = "4.0.1".freeze
3
+ VERSION = "4.1.0".freeze
4
4
  end
5
5
  end
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.1
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-08-23 00:00:00.000000000 Z
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler