herdst_worker 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/herdst_worker/configuration/metadata.rb +11 -2
- data/lib/herdst_worker/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: 70035be16eb18bc723d967fbe4fb7c3c3350ccdf6b205174d065d69697b95b23
|
4
|
+
data.tar.gz: 99c0f0d7d1b9667c07060c78ce13384124fecc8ec6acbb412a3866a5e3c9e1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 556f65e4ea7dabe6907c88d16e18729d7ff4aa112e7a1faaf944bcf227c7a109d8594b2d684991128cc83787b37565f6c69868b7dcbc1da070506b5e1e6d240e
|
7
|
+
data.tar.gz: 797667ab02583c9342f14df01f91ef72709aaffa34981d933197c0d7acf759fa12d059e40e2dfa4d037b7cc702d92df5baa5a39857372318c5ed00ee46cb8e36
|
@@ -10,7 +10,7 @@ module HerdstWorker
|
|
10
10
|
|
11
11
|
|
12
12
|
attr_accessor :config, :aws_credentials, :secrets
|
13
|
-
attr_accessor :config_suffix, :secrets_suffix
|
13
|
+
attr_accessor :config_suffix, :secrets_suffix, :secret_json_keys
|
14
14
|
|
15
15
|
|
16
16
|
def initialize(env, name, config)
|
@@ -20,7 +20,8 @@ module HerdstWorker
|
|
20
20
|
|
21
21
|
self.secrets = {}.with_indifferent_access
|
22
22
|
self.secrets["ENV"] = env
|
23
|
-
|
23
|
+
self.secret_json_keys = ["STRIPE_PLANS"]
|
24
|
+
|
24
25
|
begin
|
25
26
|
self.reload!
|
26
27
|
rescue Exception => ex
|
@@ -177,6 +178,14 @@ module HerdstWorker
|
|
177
178
|
values = self.config.config_for(:metadata)
|
178
179
|
end
|
179
180
|
|
181
|
+
if values && self.secret_json_keys
|
182
|
+
self.secret_json_keys.each do |key|
|
183
|
+
if values[key] && values[key].is_a?(String)
|
184
|
+
values[key] = JSON.parse(values[key]) rescue nil
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
180
189
|
values.each { |k, v| self[k] = v } if values
|
181
190
|
end
|
182
191
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: herdst_worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Herd.St
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|