ops_team 0.9.6 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1dc62ca13a4fa0fb9fc2b6ebe6b06016dac94ff1f05308890cfa010369bb12e
4
- data.tar.gz: 89936730eb61c53c23c873af7ff1fd6c9d410204be7de027b6a9b45c062b47f7
3
+ metadata.gz: cf41e11aef46cc62ac4ce648aac3c84ed2de854a23ffe8cc2a89d9a678fde503
4
+ data.tar.gz: 84bb677017c9e7ff084f6c3635a6228c26080736c1f27ccfdb6b9a761f3b1f33
5
5
  SHA512:
6
- metadata.gz: c51e41abec028542d7aa60a8aae7efbd1e3a6a9422f5e6ac3c8175ab9f094cece843616eb68dd7f5ddf993fe19ddf1fbca736c1a822397eec583f30a746315c0
7
- data.tar.gz: e612fd4349b5468a876f1398663859048031964808a4ff0ef55a9dc6e429052780d1ead4abba28470fc4d7f687014ee8f7d63ae9be3b9c509c7d037be97070ea
6
+ metadata.gz: 6319116434905f139d5b9853f96cfe7efa9934d34f66df17a0abc1aed531b4389ab163039c867560a53b27738c472f5642aa9de1af7d528b9e2f2d9b6073dc49
7
+ data.tar.gz: ff9c8c68c014e39616e572e6fe74fc988d15807da12fd4c99fc7d91144d667bb7e386c62f68af659ca349116566adbc5a473b77a8be33c75dffcd69b6fbfd661
@@ -15,7 +15,12 @@ module Builtins
15
15
 
16
16
  def run
17
17
  Secrets.load if Options.get("exec.load_secrets")
18
- Kernel.exec(@args.join(" "))
18
+
19
+ if args.any?
20
+ Kernel.exec(args.join(" "))
21
+ else
22
+ Output.error("Usage: ops exec '<command>'")
23
+ end
19
24
  end
20
25
  end
21
26
  end
data/lib/ops.rb CHANGED
@@ -77,8 +77,16 @@ class Ops
77
77
  end
78
78
 
79
79
  def actions
80
- config["actions"].transform_values do |config|
81
- Action.new(config, @args)
80
+ @actions ||= begin
81
+ if config["actions"]
82
+ config["actions"]&.transform_values do |config|
83
+ Action.new(config, @args)
84
+ end
85
+ else
86
+ # only print this error if ops.yml had something in it
87
+ Output.warn("'ops.yml' has no 'actions' defined.") if config.any?
88
+ {}
89
+ end
82
90
  end
83
91
  end
84
92
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ops_team'
5
- s.version = '0.9.6'
5
+ s.version = '0.9.7'
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: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickthecook@gmail.com