ops_team 1.10.0 → 1.11.0.pre.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ops +1 -1
- data/lib/builtins/countdown.rb +2 -0
- data/lib/builtins/up.rb +18 -11
- data/lib/dependencies/custom.rb +1 -3
- data/lib/runner.rb +2 -0
- data/ops_team.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 296e5dabea491580c6f1673cc4f07ab010a3e914fa949532101afe23f5ef2a90
|
4
|
+
data.tar.gz: a14f9e7d5b38a9a752f6682a9558c641448344802a993af32a9aad98122acbc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6654ec92375f8270ddb85f9a9fbc4dcc114b858ac7672fa86d4bcec92cac5fc163157feb4bdfee6a0a73ad15c673ac8337e336f53dd7fc8a85e943d3c2dbfd75
|
7
|
+
data.tar.gz: 8f1266dfdf10a8b1da48ae7fc37a1baa07c7bcc86b420338e8a5ef962a5f9b6033c1bbdea233df36137fc4e2c09cfb3bfb7f61863dceaa5220d5769eaad46e5d
|
data/bin/ops
CHANGED
data/lib/builtins/countdown.rb
CHANGED
data/lib/builtins/up.rb
CHANGED
@@ -16,21 +16,17 @@ module Builtins
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def run
|
19
|
-
# TODO: return a success/failure status to the caller
|
20
19
|
meet_dependencies
|
21
|
-
end
|
22
20
|
|
23
|
-
|
21
|
+
return true unless fail_on_error?
|
24
22
|
|
25
|
-
|
26
|
-
Helpers::DependencyHandler.new(deps_to_meet)
|
23
|
+
deps_to_meet.all?(&:success?)
|
27
24
|
end
|
28
25
|
|
29
|
-
|
30
|
-
dependency_handler.dependencies.each do |dependency|
|
31
|
-
# don't even output anything for dependencies that shouldn't be considered on this machine
|
32
|
-
next unless dependency&.should_meet?
|
26
|
+
private
|
33
27
|
|
28
|
+
def meet_dependencies
|
29
|
+
deps_to_meet.each do |dependency|
|
34
30
|
Output.status("[#{dependency.type}] #{dependency.name}")
|
35
31
|
|
36
32
|
meet_dependency(dependency)
|
@@ -38,7 +34,6 @@ module Builtins
|
|
38
34
|
end
|
39
35
|
|
40
36
|
def meet_dependency(dependency)
|
41
|
-
# TODO: make this simpler, and factor in `should_meet?` above, too
|
42
37
|
dependency.meet if !dependency.met? || dependency.always_act?
|
43
38
|
|
44
39
|
if dependency.success?
|
@@ -51,9 +46,21 @@ module Builtins
|
|
51
46
|
end
|
52
47
|
|
53
48
|
def deps_to_meet
|
49
|
+
@deps_to_meet ||= dependency_handler.dependencies.select(&:should_meet?)
|
50
|
+
end
|
51
|
+
|
52
|
+
def dependency_handler
|
53
|
+
Helpers::DependencyHandler.new(dependencies)
|
54
|
+
end
|
55
|
+
|
56
|
+
def dependencies
|
54
57
|
return @config["dependencies"] if @args.empty?
|
55
58
|
|
56
|
-
|
59
|
+
@config["dependencies"].select { |dep, _names| @args.include?(dep) }
|
60
|
+
end
|
61
|
+
|
62
|
+
def fail_on_error?
|
63
|
+
Options.get("up.fail_on_error") || false
|
57
64
|
end
|
58
65
|
end
|
59
66
|
end
|
data/lib/dependencies/custom.rb
CHANGED
@@ -39,11 +39,9 @@ module Dependencies
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def parse_definition
|
42
|
-
return @definition, {} if @definition.is_a?(String)
|
43
42
|
return @definition.first if @definition.is_a?(Hash)
|
44
43
|
|
45
|
-
|
46
|
-
"to be a String or a Hash; received #{@definition.class}."
|
44
|
+
[@definition.to_s, {}]
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
data/lib/runner.rb
CHANGED
data/ops_team.gemspec
CHANGED
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: 1.
|
4
|
+
version: 1.11.0.pre.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nickthecook@gmail.com
|
@@ -223,9 +223,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
223
223
|
version: '2.5'
|
224
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
|
-
- - "
|
226
|
+
- - ">"
|
227
227
|
- !ruby/object:Gem::Version
|
228
|
-
version:
|
228
|
+
version: 1.3.1
|
229
229
|
requirements: []
|
230
230
|
rubygems_version: 3.0.3.1
|
231
231
|
signing_key:
|