ops_team 1.18.0 → 1.19.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/options.rb +9 -0
  3. data/ops_team.gemspec +1 -1
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9bca1162d5d436bd7e24bdbf758b7731e79dad8c06cfa79918362d521b8ef0a
4
- data.tar.gz: 747a089e7902466280c1098f3fb7a3ce57bd25cc71eb55d71c6588219839388e
3
+ metadata.gz: e586a8979295bd19113565a6479c5986f22bd5bf9c96c244c6528dabb49761b2
4
+ data.tar.gz: e5e8f84b21fdba1bdaf3883acacd6df5163788a3a78b01751692316927f0fc07
5
5
  SHA512:
6
- metadata.gz: 81b79efa6791af858d44106957e42ab476486fa92b2709001ec9e54e7b23ad5b5d7df29673d788c4e2c0d3f73252447997b5238aa60d45fb6aa25df08d9dcb80
7
- data.tar.gz: 5b00fc9529f48ddcc39705fbf122e7321bcdcd8383a9b1f1f9b08859e4ccc395ec2216aae1c34181f504daa37a461c6956de2ffeec679814f526edc7ca2025c9
6
+ metadata.gz: 9d3507f55fb4f25dc0a487ca16ea7b9556b0baee5957f1018d19df4892fa4860c1f8c4582539fc31e0be143489e5a0dfa78e8d825bd1b46a590e4a1257d28bb6
7
+ data.tar.gz: a4b472d36c1bce9e459d13905035fea9b509ae5e5f052619214ec7e456fdc251efe0e799819ef6a3c1553ee6aa995c831a557e4ca75d0e23b30ff70ce634e533
data/lib/options.rb CHANGED
@@ -3,11 +3,20 @@
3
3
  class Options
4
4
  class << self
5
5
  def get(path)
6
+ env_var = ENV[env_var(path)]
7
+ return YAML.safe_load(env_var) unless env_var.nil?
8
+
6
9
  @options&.dig(*path.split('.'))
7
10
  end
8
11
 
9
12
  def set(options)
10
13
  @options = options
11
14
  end
15
+
16
+ private
17
+
18
+ def env_var(path)
19
+ "OPS__#{path.upcase.gsub(".", "__")}"
20
+ end
12
21
  end
13
22
  end
data/ops_team.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ops_team'
5
- s.version = '1.18.0'
5
+ s.version = '1.19.0.rc1'
6
6
  s.authors = [
7
7
  'nickthecook@gmail.com'
8
8
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.18.0
4
+ version: 1.19.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickthecook@gmail.com
@@ -248,11 +248,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
248
  version: '2.5'
249
249
  required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  requirements:
251
- - - ">="
251
+ - - ">"
252
252
  - !ruby/object:Gem::Version
253
- version: '0'
253
+ version: 1.3.1
254
254
  requirements: []
255
- rubygems_version: 3.3.7
255
+ rubygems_version: 3.2.15
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: ops_team handles basic automation for your project, driven by self-documenting