ops_team 1.13.0 → 1.14.1
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/lib/builtin.rb +10 -0
- data/lib/builtins/helpers/enumerator.rb +3 -0
- data/lib/hook_handler.rb +1 -0
- data/lib/ops.rb +0 -2
- data/lib/runner.rb +5 -4
- data/ops_team.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21c0933e00ebfbc331a0fcf88344ab554fb87c9f0889a9033dd26c1afcd30200
|
4
|
+
data.tar.gz: 44805923090fb8846ccf1f78375ac70bc30b54238aa444961127a17730f67c7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc49f6c5b23f98bdcd944e96497c54245f3ef26e912bdc109b89eee20e070e5c18ecca9cfe474aac8791be003ad7b4945e33ce13e0ee74477c45ab5722957a2
|
7
|
+
data.tar.gz: 879871fd770c450b0560beb31788cc83b7e95fd103a86ce78d387533d79f54049ee5d7a7041cfe897fe2113eb0a15d69c642ce12bc652e7e5537a0f09424dbff
|
data/lib/builtin.rb
CHANGED
@@ -6,16 +6,26 @@ class Builtin
|
|
6
6
|
attr_reader :args, :config
|
7
7
|
|
8
8
|
class << self
|
9
|
+
BUILTIN_DIR = "builtins"
|
10
|
+
|
9
11
|
def description
|
10
12
|
"no description"
|
11
13
|
end
|
12
14
|
|
13
15
|
def class_for(name:)
|
16
|
+
file = file_for(name: name)
|
17
|
+
return nil unless File.exist?(file)
|
18
|
+
|
19
|
+
require file
|
14
20
|
Builtins.const_get(builtin_class_name_for(name: name), false)
|
15
21
|
end
|
16
22
|
|
17
23
|
private
|
18
24
|
|
25
|
+
def file_for(name:)
|
26
|
+
File.join(File.dirname(__FILE__), BUILTIN_DIR, "#{name}.rb")
|
27
|
+
end
|
28
|
+
|
19
29
|
def builtin_class_name_for(name:)
|
20
30
|
name.capitalize.to_sym
|
21
31
|
end
|
data/lib/hook_handler.rb
CHANGED
data/lib/ops.rb
CHANGED
data/lib/runner.rb
CHANGED
@@ -6,6 +6,10 @@ require 'action_list'
|
|
6
6
|
require 'action_suggester'
|
7
7
|
require 'forwards'
|
8
8
|
require 'environment'
|
9
|
+
require 'builtin'
|
10
|
+
|
11
|
+
module Builtins
|
12
|
+
end
|
9
13
|
|
10
14
|
class Runner
|
11
15
|
class UnknownActionError < StandardError; end
|
@@ -61,10 +65,7 @@ class Runner
|
|
61
65
|
end
|
62
66
|
|
63
67
|
def builtin
|
64
|
-
@builtin ||= Builtin.class_for(name: @action_name)
|
65
|
-
rescue NameError
|
66
|
-
# this means there isn't a builtin with that name in that module
|
67
|
-
nil
|
68
|
+
@builtin ||= Builtin.class_for(name: @action_name)&.new(@args, @config)
|
68
69
|
end
|
69
70
|
|
70
71
|
def builtin_names
|
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.14.1
|
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: []
|
@@ -214,7 +214,7 @@ homepage: https://github.com/nickthecook/ops
|
|
214
214
|
licenses:
|
215
215
|
- GPL-3.0-only
|
216
216
|
metadata: {}
|
217
|
-
post_install_message:
|
217
|
+
post_install_message:
|
218
218
|
rdoc_options: []
|
219
219
|
require_paths:
|
220
220
|
- lib
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
requirements: []
|
232
232
|
rubygems_version: 3.2.15
|
233
|
-
signing_key:
|
233
|
+
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: ops_team handles basic automation for your project, driven by self-documenting
|
236
236
|
YAML config
|