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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 900944cbc8e142a33165f163ec11ca8feb5600ec273dd4682b4ae8b1981eb170
4
- data.tar.gz: 65d027f53b6c501d2c392800cffa9e1a312dc3c75d44ccc611e3e747e5105d25
3
+ metadata.gz: 70035be16eb18bc723d967fbe4fb7c3c3350ccdf6b205174d065d69697b95b23
4
+ data.tar.gz: 99c0f0d7d1b9667c07060c78ce13384124fecc8ec6acbb412a3866a5e3c9e1b4
5
5
  SHA512:
6
- metadata.gz: dbff474537dd0812301e7fc4f7f05d11f0946449b0c674c3e0d3b67befbbc90ac74bfb4bd426ace5d53824fa73222e422919ee9d6e388c19aaa026b96e531e81
7
- data.tar.gz: e849b9fe1f607b88aeb11c1da0dc180ba2faecf966a9756509af264de369b2f906bd0e3db3e9dc3c780bbf5108753f0387ffef85224fdddd9e5ba7522f605c80
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
 
@@ -1,3 +1,3 @@
1
1
  module HerdstWorker
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
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.8
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-10-12 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport