ops_team 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependencies/custom.rb +32 -4
- data/ops_team.gemspec +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6748a5f3f6c8e89731bd41488a8173dff6d2198dbd4498f02311b50aafa762e9
|
4
|
+
data.tar.gz: eb846d4e60073e8c575d11d51cca4f2d1de64cdae84698a5ef432d3723b7f0bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad9dd5ec65d37be0852049d68d73e98e7469dbc06db976b9c76b1cad39a0c1b65ccbc67dcc43d57453b0ab15061ba27ee5b655955394e4406eb4e73955ee0ea4
|
7
|
+
data.tar.gz: f05344a3215f9b015ec0d3890b7fd378263205908fb357e10cdd13a8c2489e40cb77b59b0c963b0f6ae8d3061380915153dd4405765c4535cdd0f8e966538dff
|
data/lib/dependencies/custom.rb
CHANGED
@@ -4,18 +4,46 @@ require 'dependency'
|
|
4
4
|
|
5
5
|
module Dependencies
|
6
6
|
class Custom < Dependency
|
7
|
+
class CustomConfigError < StandardError; end
|
8
|
+
|
9
|
+
def initialize(definition)
|
10
|
+
super
|
11
|
+
@definition = definition
|
12
|
+
@name, @config = parse_definition
|
13
|
+
end
|
14
|
+
|
7
15
|
def met?
|
8
|
-
# we always want to try to meet this dependency
|
9
16
|
false
|
10
17
|
end
|
11
18
|
|
19
|
+
def always_act?
|
20
|
+
true
|
21
|
+
end
|
22
|
+
|
12
23
|
def meet
|
13
|
-
|
14
|
-
execute(name)
|
24
|
+
execute(up_command) if up_command
|
15
25
|
end
|
16
26
|
|
17
27
|
def unmeet
|
18
|
-
|
28
|
+
execute(down_command) if down_command
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def up_command
|
34
|
+
@up_command ||= @definition.is_a?(Hash) ? @config["up"] : name
|
35
|
+
end
|
36
|
+
|
37
|
+
def down_command
|
38
|
+
@down_command ||= @config["down"]
|
39
|
+
end
|
40
|
+
|
41
|
+
def parse_definition
|
42
|
+
return @definition, {} if @definition.is_a?(String)
|
43
|
+
return @definition.first if @definition.is_a?(Hash)
|
44
|
+
|
45
|
+
raise CustomConfigError, "Expected custom dependency @definition '#{@definition}' " \
|
46
|
+
"to be a String or a Hash; received #{@definition.class}."
|
19
47
|
end
|
20
48
|
end
|
21
49
|
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.9.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-05-05 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'
|
120
117
|
- - ">="
|
121
118
|
- !ruby/object:Gem::Version
|
122
119
|
version: 6.1.0
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '6.1'
|
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'
|
130
127
|
- - ">="
|
131
128
|
- !ruby/object:Gem::Version
|
132
129
|
version: 6.1.0
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '6.1'
|
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: []
|
@@ -212,7 +212,7 @@ homepage: https://github.com/nickthecook/ops
|
|
212
212
|
licenses:
|
213
213
|
- GPL-3.0-only
|
214
214
|
metadata: {}
|
215
|
-
post_install_message:
|
215
|
+
post_install_message:
|
216
216
|
rdoc_options: []
|
217
217
|
require_paths:
|
218
218
|
- lib
|
@@ -227,8 +227,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
231
|
-
signing_key:
|
230
|
+
rubygems_version: 3.0.3.1
|
231
|
+
signing_key:
|
232
232
|
specification_version: 4
|
233
233
|
summary: ops_team handles basic automation for your project, driven by self-documenting
|
234
234
|
YAML config
|