ops_team 1.11.2 → 1.12.0
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 +4 -4
- data/lib/action.rb +7 -1
- data/lib/action_list.rb +8 -6
- data/ops_team.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4e8d641dd9ba491fb9be7b485203c2fcf22d46b15668b7640b483a6774bbb33
|
4
|
+
data.tar.gz: 76089c91d587dbf028ea25b04d62eb5b203303c7680248dd2e27dab377af8880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e35d83233bae11f76df0f961bfc603426255ab5c51cb6f26af64060e87bf0f82dee3f60a20ce3f498b0de4c9d3131cd2b6d28c2520bebe5b53d79289d106a2c9
|
7
|
+
data.tar.gz: 4a38de80841fd5ad89b8263f97bb977397ea7915cb6ccdf476c7d73897f96766e5fe61756344ae64c51d0f0b53def9cceae4c2c49913c4d0cbe60ad6f4d32450
|
data/lib/action.rb
CHANGED
@@ -26,7 +26,13 @@ class Action
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def alias
|
29
|
-
@config["alias"]
|
29
|
+
@config["alias"] || @config["aliases"]&.first
|
30
|
+
end
|
31
|
+
|
32
|
+
def aliases
|
33
|
+
return [@config["alias"]].compact unless @config["aliases"]
|
34
|
+
|
35
|
+
([@config["alias"]] + @config["aliases"]).compact
|
30
36
|
end
|
31
37
|
|
32
38
|
def command
|
data/lib/action_list.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'action'
|
4
|
+
|
3
5
|
class ActionList
|
4
6
|
class UnknownActionError < StandardError; end
|
5
7
|
|
@@ -40,16 +42,16 @@ class ActionList
|
|
40
42
|
action = Action.new(name, config, @args)
|
41
43
|
|
42
44
|
@actions[name] = action
|
43
|
-
|
44
|
-
check_duplicate_alias(name,
|
45
|
-
@aliases[
|
45
|
+
action.aliases.each do |aliaz|
|
46
|
+
check_duplicate_alias(name, aliaz)
|
47
|
+
@aliases[aliaz] = action
|
46
48
|
end
|
47
49
|
end
|
48
50
|
end
|
49
51
|
|
50
|
-
def check_duplicate_alias(name,
|
51
|
-
return if @aliases[
|
52
|
+
def check_duplicate_alias(name, aliaz)
|
53
|
+
return if @aliases[aliaz].nil?
|
52
54
|
|
53
|
-
Output.warn("Duplicate alias '#{
|
55
|
+
Output.warn("Duplicate alias '#{aliaz}' detected in action '#{name}'.")
|
54
56
|
end
|
55
57
|
end
|
data/ops_team.gemspec
CHANGED
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: 1.
|
4
|
+
version: 1.12.0
|
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: 2021-10-25 00:00:00.000000000 Z
|
@@ -150,8 +150,8 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.1.6
|
153
|
-
description:
|
154
|
-
email:
|
153
|
+
description:
|
154
|
+
email:
|
155
155
|
executables:
|
156
156
|
- ops
|
157
157
|
extensions: []
|
@@ -213,7 +213,7 @@ homepage: https://github.com/nickthecook/ops
|
|
213
213
|
licenses:
|
214
214
|
- GPL-3.0-only
|
215
215
|
metadata: {}
|
216
|
-
post_install_message:
|
216
|
+
post_install_message:
|
217
217
|
rdoc_options: []
|
218
218
|
require_paths:
|
219
219
|
- lib
|
@@ -228,8 +228,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
228
|
- !ruby/object:Gem::Version
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
|
-
rubygems_version: 3.
|
232
|
-
signing_key:
|
231
|
+
rubygems_version: 3.2.15
|
232
|
+
signing_key:
|
233
233
|
specification_version: 4
|
234
234
|
summary: ops_team handles basic automation for your project, driven by self-documenting
|
235
235
|
YAML config
|