ops_team 1.11.1 → 1.11.2
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/bin/ops +0 -1
- data/lib/action_list.rb +10 -1
- data/lib/builtins/help.rb +10 -9
- data/lib/hook_handler.rb +1 -0
- data/lib/ops.rb +5 -7
- data/lib/secrets.rb +1 -3
- data/ops_team.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6775a19f3c97954027d7ed21ff4433ec76ae9f2102c378f36a6658d55603c196
|
4
|
+
data.tar.gz: d9ce7a27cfd7124935c145df548f41f438e599ed89e8464a31c37e997822636a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3feccc3a6ab8205664a041a0216bab8f2e68f36cb2fc8edc8a15371120550afa27994e2ab3c606f164742b1a4e378fda383c42c870acef4549bcde783ae663ba
|
7
|
+
data.tar.gz: 3d265366298b75333ae17c10ad65790cd70909bbf2b301d1077d9ec9645f12094c8ecbb3e002074fc0d48db743bbbdb76e2da3172db26da6fc83718077913ce6
|
data/bin/ops
CHANGED
data/lib/action_list.rb
CHANGED
@@ -40,7 +40,16 @@ class ActionList
|
|
40
40
|
action = Action.new(name, config, @args)
|
41
41
|
|
42
42
|
@actions[name] = action
|
43
|
-
|
43
|
+
if action.alias
|
44
|
+
check_duplicate_alias(name, action)
|
45
|
+
@aliases[action.alias] = action
|
46
|
+
end
|
44
47
|
end
|
45
48
|
end
|
49
|
+
|
50
|
+
def check_duplicate_alias(name, action)
|
51
|
+
return if @aliases[action.alias].nil?
|
52
|
+
|
53
|
+
Output.warn("Duplicate alias '#{action.alias}' detected in action '#{name}'.")
|
54
|
+
end
|
46
55
|
end
|
data/lib/builtins/help.rb
CHANGED
@@ -17,23 +17,24 @@ module Builtins
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def run
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Output.out("Forwards:")
|
24
|
-
Output.out(" #{forwards.join("\n ")}")
|
25
|
-
Output.out("")
|
26
|
-
Output.out("Actions:")
|
27
|
-
Output.out(" #{actions.join("\n ")}")
|
20
|
+
list("Builtins", builtins) if builtins.any?
|
21
|
+
list("Forwards", forwards) if forwards.any?
|
22
|
+
list("Actions", actions) if actions.any?
|
28
23
|
|
29
24
|
true
|
30
25
|
end
|
31
26
|
|
32
27
|
private
|
33
28
|
|
29
|
+
def list(name, items)
|
30
|
+
Output.out("#{name}:")
|
31
|
+
Output.out(" #{items.join("\n ")}")
|
32
|
+
Output.out("")
|
33
|
+
end
|
34
|
+
|
34
35
|
def forwards
|
35
36
|
Forwards.new(@config).forwards.map do |name, dir|
|
36
|
-
format("%<name>-#{NAME_WIDTH}s %<desc>s"
|
37
|
+
format("%<name>-#{NAME_WIDTH}s %<desc>s", name: name.yellow, desc: dir.to_s)
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
data/lib/hook_handler.rb
CHANGED
data/lib/ops.rb
CHANGED
@@ -101,13 +101,11 @@ class Ops
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def config
|
104
|
-
@config ||=
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
{}
|
110
|
-
end
|
104
|
+
@config ||= if config_file_exists?
|
105
|
+
parsed_config_contents
|
106
|
+
else
|
107
|
+
Output.warn("File '#{@config_file}' does not exist.") unless @action_name == "init"
|
108
|
+
{}
|
111
109
|
end
|
112
110
|
end
|
113
111
|
|
data/lib/secrets.rb
CHANGED
data/ops_team.gemspec
CHANGED