ops_team 1.11.0.pre.rc3 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ops +0 -1
- data/lib/action.rb +7 -1
- data/lib/action_list.rb +12 -1
- data/lib/builtins/background.rb +2 -0
- data/lib/builtins/help.rb +10 -9
- data/lib/dependencies/apk.rb +1 -1
- 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 +15 -15
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/bin/ops
CHANGED
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,7 +42,16 @@ class ActionList
|
|
40
42
|
action = Action.new(name, config, @args)
|
41
43
|
|
42
44
|
@actions[name] = action
|
43
|
-
|
45
|
+
action.aliases.each do |aliaz|
|
46
|
+
check_duplicate_alias(name, aliaz)
|
47
|
+
@aliases[aliaz] = action
|
48
|
+
end
|
44
49
|
end
|
45
50
|
end
|
51
|
+
|
52
|
+
def check_duplicate_alias(name, aliaz)
|
53
|
+
return if @aliases[aliaz].nil?
|
54
|
+
|
55
|
+
Output.warn("Duplicate alias '#{aliaz}' detected in action '#{name}'.")
|
56
|
+
end
|
46
57
|
end
|
data/lib/builtins/background.rb
CHANGED
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/dependencies/apk.rb
CHANGED
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
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
|
@@ -114,22 +114,22 @@ dependencies:
|
|
114
114
|
name: net-ssh
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - ">="
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: 6.1.0
|
120
117
|
- - "~>"
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: '6.1'
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 6.1.0
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- - ">="
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: 6.1.0
|
130
127
|
- - "~>"
|
131
128
|
- !ruby/object:Gem::Version
|
132
129
|
version: '6.1'
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 6.1.0
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: require_all
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
@@ -224,12 +224,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '2.5'
|
225
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
|
-
- - "
|
227
|
+
- - ">="
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
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
|