opswalrus 1.0.17 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/opswalrus/app.rb +1 -0
- data/lib/opswalrus/host.rb +6 -2
- data/lib/opswalrus/invocation.rb +6 -1
- data/lib/opswalrus/ops_file_script_dsl.rb +6 -2
- 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: c0ff652415da76b83b423422356b87d8745396a130589a5b6eca43c29f5ef5ca
|
4
|
+
data.tar.gz: 6d61f7b4e9f12887ee5477331090ef91a6d080f39fc5aaf748ea613b5f6a228f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbbb9c27cb16fdc2d57aa0d17ee359133a3340df01de204f26c990bb0fc09cd8c3675e69ebfb8c21fc08823b2489c85012e2bcd6c1c9f6d2acb12e1ac3d22bd4
|
7
|
+
data.tar.gz: 891cc95c97be369ee25c4e83fe761db15842f96f210fd1d2ab9ac73ee74fd084a5952e333cb86beb16d150a188efbf3f8bd23f3c2c9aeacdf5a572c3fa48697f
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/app.rb
CHANGED
data/lib/opswalrus/host.rb
CHANGED
@@ -18,9 +18,9 @@ module OpsWalrus
|
|
18
18
|
ops_file.local_symbol_table.each do |symbol_name, import_reference|
|
19
19
|
unless methods_defined.include? symbol_name
|
20
20
|
klass.define_method(symbol_name) do |*args, **kwargs, &block|
|
21
|
-
|
21
|
+
App.instance.trace "resolving local symbol table entry: #{symbol_name}"
|
22
22
|
namespace_or_ops_file = @runtime_env.resolve_import_reference(ops_file, import_reference)
|
23
|
-
|
23
|
+
App.instance.trace "namespace_or_ops_file=#{namespace_or_ops_file.to_s}"
|
24
24
|
|
25
25
|
invocation_context = case import_reference
|
26
26
|
# we know we're dealing with a package dependency reference, so we want to run an ops file contained within the bundle directory,
|
@@ -49,6 +49,10 @@ module OpsWalrus
|
|
49
49
|
unless methods_defined.include? symbol_name
|
50
50
|
# puts "2. defining: #{symbol_name}(...)"
|
51
51
|
klass.define_method(symbol_name) do |*args, **kwargs, &block|
|
52
|
+
App.instance.trace "resolving implicit import: #{symbol_name}"
|
53
|
+
namespace_or_ops_file = @runtime_env.resolve_sibling_symbol(ops_file, symbol_name)
|
54
|
+
App.instance.trace "namespace_or_ops_file=#{namespace_or_ops_file.to_s}"
|
55
|
+
|
52
56
|
invocation_context = RemoteImportInvocationContext.new(@runtime_env, self, namespace_or_ops_file, false, prompt_for_sudo_password: !!ssh_password)
|
53
57
|
invocation_context._invoke(*args, **kwargs)
|
54
58
|
end
|
data/lib/opswalrus/invocation.rb
CHANGED
@@ -30,7 +30,12 @@ module OpsWalrus
|
|
30
30
|
@initial_namespace_or_ops_file = @namespace_or_ops_file = namespace_or_ops_file
|
31
31
|
@is_invocation_a_call_to_package_in_bundle_dir = is_invocation_a_call_to_package_in_bundle_dir
|
32
32
|
|
33
|
-
initial_method_name = @namespace_or_ops_file
|
33
|
+
initial_method_name = case @namespace_or_ops_file
|
34
|
+
when Namespace
|
35
|
+
@namespace_or_ops_file.dirname.basename
|
36
|
+
when OpsFile
|
37
|
+
@namespace_or_ops_file.basename
|
38
|
+
end
|
34
39
|
@method_chain = [initial_method_name]
|
35
40
|
@prompt_for_sudo_password = prompt_for_sudo_password
|
36
41
|
end
|
@@ -126,7 +126,7 @@ module OpsWalrus
|
|
126
126
|
rescue => e
|
127
127
|
puts e.class
|
128
128
|
puts e.message
|
129
|
-
|
129
|
+
puts e.backtrace.join("\n")
|
130
130
|
ensure
|
131
131
|
host.clear_ssh_session
|
132
132
|
end
|
@@ -173,7 +173,11 @@ module OpsWalrus
|
|
173
173
|
raise Error, "Unknown package reference: #{local_package_name}" unless package_reference
|
174
174
|
import_reference = PackageDependencyReference.new(local_package_name, package_reference)
|
175
175
|
# puts "import: #{import_reference.inspect}"
|
176
|
-
@runtime_env.resolve_import_reference(ops_file, import_reference)
|
176
|
+
namespace_or_ops_file = @runtime_env.resolve_import_reference(ops_file, import_reference)
|
177
|
+
raise SymbolResolutionError, "Import reference '#{import_reference.summary}' not in load path for #{ops_file.ops_file_path}" unless namespace_or_ops_file
|
178
|
+
invocation_context = LocalImportInvocationContext.new(@runtime_env, namespace_or_ops_file)
|
179
|
+
# invocation_context = LocalImportInvocationContext.new(@runtime_env, namespace_or_ops_file)
|
180
|
+
# invocation_context._invoke(*args, **kwargs)
|
177
181
|
end
|
178
182
|
|
179
183
|
def params(*keys, default: nil)
|
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.19
|
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-08-
|
11
|
+
date: 2023-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: amazing_print
|