ops_team 1.11.2 → 1.12.0

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: 6775a19f3c97954027d7ed21ff4433ec76ae9f2102c378f36a6658d55603c196
4
- data.tar.gz: d9ce7a27cfd7124935c145df548f41f438e599ed89e8464a31c37e997822636a
3
+ metadata.gz: e4e8d641dd9ba491fb9be7b485203c2fcf22d46b15668b7640b483a6774bbb33
4
+ data.tar.gz: 76089c91d587dbf028ea25b04d62eb5b203303c7680248dd2e27dab377af8880
5
5
  SHA512:
6
- metadata.gz: 3feccc3a6ab8205664a041a0216bab8f2e68f36cb2fc8edc8a15371120550afa27994e2ab3c606f164742b1a4e378fda383c42c870acef4549bcde783ae663ba
7
- data.tar.gz: 3d265366298b75333ae17c10ad65790cd70909bbf2b301d1077d9ec9645f12094c8ecbb3e002074fc0d48db743bbbdb76e2da3172db26da6fc83718077913ce6
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
- if action.alias
44
- check_duplicate_alias(name, action)
45
- @aliases[action.alias] = action
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, action)
51
- return if @aliases[action.alias].nil?
52
+ def check_duplicate_alias(name, aliaz)
53
+ return if @aliases[aliaz].nil?
52
54
 
53
- Output.warn("Duplicate alias '#{action.alias}' detected in action '#{name}'.")
55
+ Output.warn("Duplicate alias '#{aliaz}' detected in action '#{name}'.")
54
56
  end
55
57
  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.11.2'
5
+ s.version = '1.12.0'
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: 1.11.2
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.1.6
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