ops_team 0.17.0 → 0.17.1

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: e4467e73bf2ee29bd368007e420ab6ec5291819bc3ea4d6f0e98e268b9311778
4
- data.tar.gz: 6b2c1976f43978255cd85ec7e53af2cb89986c8a7b56eeb159035bcd7735c1fa
3
+ metadata.gz: 1a18acecc72ca3ac11486856bf71b2c082d81e3dfa65931141c20c1bb4ec8bc5
4
+ data.tar.gz: 852ea38c8598ca1ed3d806b3f5a334cd191e6484827f7141a265d1324c15fe9d
5
5
  SHA512:
6
- metadata.gz: ca3cb0915e5a328dfe0933ac6894d0b64a12d65d5905c8ee99385fb73f5f3f58d7635448e0d565f7944ee17d85a44e8d3ba00026ca13f7b6415ba53e9f068060
7
- data.tar.gz: b0d1429874a25e8229ef56182fb56dc4997d6ca1f30385eb386a97e6a16ed22b8cbbd18f1e7b5321092a029ce0c61d9f76a93a4da25732a9fe9057299b187468
6
+ metadata.gz: 19c70546affd151d331225af93e807acd07c536eca7f4369a2c36df4961cae845cd0adea9eb7446041d6e45e66a82cd5980f8a5f979393fccf0538406dbc4100
7
+ data.tar.gz: 471c92c6afd006c0073be40773a568823e37f8795ef74f8aa76e54a4b22a47208187af34274ebe54044d5b59f4f41036621893570f79eab41a035694b771198e
@@ -28,11 +28,15 @@ class ActionList
28
28
 
29
29
  private
30
30
 
31
+ def actions_list
32
+ @actions_list ||= []
33
+ end
34
+
31
35
  def process_action_list
32
36
  @actions = {}
33
37
  @aliases = {}
34
38
 
35
- @actions_list.each do |name, config|
39
+ actions_list.each do |name, config|
36
40
  action = Action.new(config, @args)
37
41
 
38
42
  @actions[name] = action
data/lib/ops.rb CHANGED
@@ -161,8 +161,12 @@ class Ops
161
161
 
162
162
  def config
163
163
  @config ||= begin
164
- Output.warn("File '#{CONFIG_FILE}' does not exist.") unless File.exist?(CONFIG_FILE)
165
- YAML.load_file(CONFIG_FILE)
164
+ if File.exist?(CONFIG_FILE)
165
+ YAML.load_file(CONFIG_FILE)
166
+ else
167
+ Output.warn("File '#{CONFIG_FILE}' does not exist.") unless @action_name == "init"
168
+ {}
169
+ end
166
170
  rescue StandardError => e
167
171
  Output.warn("Error parsing '#{CONFIG_FILE}': #{e}")
168
172
  {}
@@ -170,7 +174,7 @@ class Ops
170
174
  end
171
175
 
172
176
  def env_vars
173
- @config.dig("options", "environment") || {}
177
+ config.dig("options", "environment") || {}
174
178
  end
175
179
 
176
180
  def environment
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ops_team'
5
- s.version = '0.17.0'
5
+ s.version = '0.17.1'
6
6
  s.authors = [
7
7
  'nickthecook@gmail.com'
8
8
  ]
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_team
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickthecook@gmail.com
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2020-08-12 00:00:00.000000000 Z
@@ -130,8 +130,8 @@ dependencies:
130
130
  - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: 1.1.6
133
- description:
134
- email:
133
+ description:
134
+ email:
135
135
  executables:
136
136
  - ops
137
137
  extensions: []
@@ -187,7 +187,7 @@ homepage: https://github.com/nickthecook/ops
187
187
  licenses:
188
188
  - GPL-3.0-only
189
189
  metadata: {}
190
- post_install_message:
190
+ post_install_message:
191
191
  rdoc_options: []
192
192
  require_paths:
193
193
  - lib
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  requirements: []
205
205
  rubygems_version: 3.0.3
206
- signing_key:
206
+ signing_key:
207
207
  specification_version: 4
208
208
  summary: ops_team handles basic operations tasks for your project, driven by YAML
209
209
  config