opswalrus 1.0.70 → 1.0.72
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/Gemfile.lock +1 -1
- data/lib/opswalrus/invocation.rb +9 -0
- data/lib/opswalrus/ops_file_script.rb +0 -76
- data/lib/opswalrus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91dee292e050b89d36b747ccddc05917f39285e8fb00291860176de7221f6e89
|
|
4
|
+
data.tar.gz: '09f22488a51d92c8a71319386db6493ab335f63ea69ef220f34e6c47efa8adb1'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a190701f9dcdb91134d1fea35b10613b35205f5eed1d793038d31fb4ce3137ea5edae2fc8d0a57daad71aab23bfdf7fa249cb9405ddb4d03d56149f12df035a
|
|
7
|
+
data.tar.gz: 81689a0bcf08d1f62b697b75e85cb9169b2334563c555e9a3acf7bb7de7bb8c1a3d06ad9f23b5d774914972d40de944e47d5dc68f328e5d7daddb711b07664ba
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/invocation.rb
CHANGED
|
@@ -23,6 +23,15 @@ module OpsWalrus
|
|
|
23
23
|
def _non_bang_method(name)
|
|
24
24
|
name.to_s.sub(/!$/, '')
|
|
25
25
|
end
|
|
26
|
+
|
|
27
|
+
# define methods that exist on kernel and forward them to the method_missing call because
|
|
28
|
+
# we want method_missing to handle the calls that may result from navigating through a package's
|
|
29
|
+
# directory structure (e.g. we include clone here to handle core.git.clone which conflicts with Kernel#clone)
|
|
30
|
+
[:clone].each do |symbol_name|
|
|
31
|
+
define_method(symbol_name) do |*args, **kwargs, &block|
|
|
32
|
+
method_missing(symbol_name, *args, **kwargs, &block)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
26
35
|
end
|
|
27
36
|
|
|
28
37
|
class RemoteImportInvocationContext < ImportInvocationContext
|
|
@@ -5,82 +5,6 @@ require_relative 'ops_file_script_dsl'
|
|
|
5
5
|
|
|
6
6
|
module OpsWalrus
|
|
7
7
|
|
|
8
|
-
# class ArrayOrHashNavigationProxy
|
|
9
|
-
# extend Forwardable
|
|
10
|
-
|
|
11
|
-
# def initialize(array_or_hash)
|
|
12
|
-
# @obj = array_or_hash
|
|
13
|
-
# end
|
|
14
|
-
|
|
15
|
-
# def_delegators :@obj, :[], :to_s, :inspect, :hash, :===, :eql?, :kind_of?, :is_a?, :instance_of?, :respond_to?, :<=>
|
|
16
|
-
|
|
17
|
-
# # def [](index, *args, **kwargs, &block)
|
|
18
|
-
# # @obj.method(:[]).call(index, *args, **kwargs, &block)
|
|
19
|
-
# # end
|
|
20
|
-
# def respond_to_missing?(method, *)
|
|
21
|
-
# @obj.is_a?(Hash) && @obj.respond_to?(method)
|
|
22
|
-
# end
|
|
23
|
-
# def method_missing(name, *args, **kwargs, &block)
|
|
24
|
-
# case @obj
|
|
25
|
-
# when Array
|
|
26
|
-
# @obj.method(name).call(*args, **kwargs, &block)
|
|
27
|
-
# when Hash
|
|
28
|
-
# if @obj.respond_to?(name)
|
|
29
|
-
# @obj.method(name).call(*args, **kwargs, &block)
|
|
30
|
-
# else
|
|
31
|
-
# value = self[name.to_s]
|
|
32
|
-
# case value
|
|
33
|
-
# when Array, Hash
|
|
34
|
-
# ArrayOrHashNavigationProxy.new(value)
|
|
35
|
-
# else
|
|
36
|
-
# value
|
|
37
|
-
# end
|
|
38
|
-
# end
|
|
39
|
-
# end
|
|
40
|
-
# end
|
|
41
|
-
# end
|
|
42
|
-
|
|
43
|
-
# class InvocationParams
|
|
44
|
-
# # @params : Hash
|
|
45
|
-
|
|
46
|
-
# # params : Hash | ArrayOrHashNavigationProxy
|
|
47
|
-
# def initialize(hashlike_params)
|
|
48
|
-
# # this doesn't seem to make any difference
|
|
49
|
-
# @params = hashlike_params.to_h
|
|
50
|
-
# # @params = hashlike_params
|
|
51
|
-
# end
|
|
52
|
-
|
|
53
|
-
# def [](key)
|
|
54
|
-
# @params[key]
|
|
55
|
-
# end
|
|
56
|
-
|
|
57
|
-
# def dig(*keys, default: nil)
|
|
58
|
-
# # keys = keys.map {|key| key.is_a?(Integer) ? key : key.to_s }
|
|
59
|
-
# @params.dig(*keys) || default
|
|
60
|
-
# end
|
|
61
|
-
|
|
62
|
-
# def method_missing(name, *args, **kwargs, &block)
|
|
63
|
-
# if @params.respond_to?(name)
|
|
64
|
-
# @params.method(name).call(*args, **kwargs, &block)
|
|
65
|
-
# else
|
|
66
|
-
# value = self[name]
|
|
67
|
-
# case value
|
|
68
|
-
# when Array, Hash
|
|
69
|
-
# ArrayOrHashNavigationProxy.new(value)
|
|
70
|
-
# else
|
|
71
|
-
# value
|
|
72
|
-
# end
|
|
73
|
-
# end
|
|
74
|
-
# end
|
|
75
|
-
# end
|
|
76
|
-
|
|
77
|
-
# class EnvParams < InvocationParams
|
|
78
|
-
# # params : Hash | ArrayOrHashNavigationProxy
|
|
79
|
-
# def initialize(hashlike_params = ENV)
|
|
80
|
-
# super(hashlike_params)
|
|
81
|
-
# end
|
|
82
|
-
# end
|
|
83
|
-
|
|
84
8
|
class OpsFileScript
|
|
85
9
|
|
|
86
10
|
def self.define_for(ops_file, ruby_script)
|
data/lib/opswalrus/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: opswalrus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.72
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Ellis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-10-
|
|
11
|
+
date: 2023-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|