opswalrus 1.0.79 → 1.0.81
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/opswalrus/interaction_handlers.rb +10 -10
- 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: 287a414fe1d549ee4276a116ae243bc350e4293558b5a7455d7a8052fd9b7a44
|
4
|
+
data.tar.gz: 71f18ad8430d801c6ed7369546acfc0d97e4cb6d47ffed4456f395077f45315e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 285968241f46fe10ec7bf1fb06524c8dcaf6020089b106b4fd5a739a67b4471bcbe32a2030f29c172d83a1ac21612d0498255845a54f15d0958c16e004beed33
|
7
|
+
data.tar.gz: 921c4776e485ae742e3f879a4f1f96087ca4f635338d582db292a537e2e2522c04326f4ed86a68baae22619bb2e4044c9eb74cfe50203bd8bc6cd97c75f7e899
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
opswalrus (1.0.
|
4
|
+
opswalrus (1.0.81)
|
5
5
|
activesupport (~> 7.0)
|
6
6
|
bcrypt_pbkdf (~> 1.1)
|
7
7
|
binding_of_caller (~> 1.0)
|
@@ -19,7 +19,7 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
activesupport (7.1.
|
22
|
+
activesupport (7.1.2)
|
23
23
|
base64
|
24
24
|
bigdecimal
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -56,7 +56,7 @@ GEM
|
|
56
56
|
concurrent-ruby (~> 1.0)
|
57
57
|
jaro_winkler (1.5.6)
|
58
58
|
json (2.6.3)
|
59
|
-
kleene (0.
|
59
|
+
kleene (0.10.0)
|
60
60
|
activesupport (~> 7.1)
|
61
61
|
regexp_parser (~> 2.8)
|
62
62
|
kramdown (2.4.0)
|
@@ -116,7 +116,7 @@ GEM
|
|
116
116
|
ruby-progressbar (1.13.0)
|
117
117
|
ruby2_keywords (0.0.5)
|
118
118
|
rubyzip (2.3.2)
|
119
|
-
semantic_logger (4.
|
119
|
+
semantic_logger (4.15.0)
|
120
120
|
concurrent-ruby (~> 1.0)
|
121
121
|
solargraph (0.49.0)
|
122
122
|
backport (~> 1.2)
|
@@ -60,16 +60,16 @@ module OpsWalrus
|
|
60
60
|
end
|
61
61
|
new_mapping.merge!(password_mappings) if password_mappings
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
debug(Style.green("mapping: #{mapping}"))
|
64
|
+
debug(Style.green("new_mapping: #{new_mapping}"))
|
65
|
+
debug(Style.green("new_mapping.empty?: #{new_mapping.empty?}"))
|
66
|
+
debug(Style.green("new_mapping == @input_mappings: #{new_mapping == @input_mappings}"))
|
67
67
|
if new_mapping.empty? || new_mapping == @input_mappings
|
68
|
-
|
68
|
+
debug(Style.red("with_mapping -> reset"))
|
69
69
|
@online_matcher.reset
|
70
70
|
yield self
|
71
71
|
else
|
72
|
-
|
72
|
+
debug(Style.red("with_mapping -> new mapping"))
|
73
73
|
yield ScopedMappingInteractionHandler.new(new_mapping, lookback_window_chars)
|
74
74
|
end
|
75
75
|
end
|
@@ -97,7 +97,7 @@ module OpsWalrus
|
|
97
97
|
# trace(Style.yellow("data=`#{data}`"))
|
98
98
|
# trace(Style.yellow("buffer=#{@online_matcher.instance_exec { @buffer } }"))
|
99
99
|
new_matches = @online_matcher.ingest(data)
|
100
|
-
|
100
|
+
debug(Style.yellow("new_matches=`#{new_matches}`"))
|
101
101
|
response_data = new_matches.find_map do |online_match|
|
102
102
|
mapped_output_value = @input_mappings[online_match.regex]
|
103
103
|
case mapped_output_value
|
@@ -107,7 +107,7 @@ module OpsWalrus
|
|
107
107
|
mapped_output_value
|
108
108
|
end
|
109
109
|
end
|
110
|
-
|
110
|
+
debug(Style.yellow("response_data=`#{response_data.inspect}`"))
|
111
111
|
|
112
112
|
# response_data = @input_mappings.find_map do |pattern, mapped_output_value|
|
113
113
|
# pattern = pattern.is_a?(String) ? Regexp.new(Regexp.escape(pattern)) : pattern
|
@@ -124,8 +124,8 @@ module OpsWalrus
|
|
124
124
|
if response_data.nil?
|
125
125
|
trace(Style.red("No interaction handler mapping for #{stream_name}: `#{data}` so no response was sent"))
|
126
126
|
else
|
127
|
-
debug(Style.
|
128
|
-
debug(Style.
|
127
|
+
debug(Style.yellow("Handling #{stream_name} message |>#{data}<|"))
|
128
|
+
debug(Style.yellow("Sending response |>#{response_data}<|"))
|
129
129
|
if response_channel.respond_to?(:send_data) # Net SSH Channel
|
130
130
|
App.instance.trace "writing: #{response_data.to_s} to Net SSH Channel"
|
131
131
|
response_channel.send_data(response_data.to_s)
|
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.81
|
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-11-
|
11
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|