opswalrus 1.0.82 → 1.0.84
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 +9 -3
- data/lib/opswalrus/interaction_handlers.rb +8 -8
- data/lib/opswalrus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab59b5d4b053dd7a147aeaa20fed1132bf50d4ec3e60d222bf925a74e0577cc7
|
4
|
+
data.tar.gz: 6992e419cef9d10ba4640d7d3c86dc5b79c3030ff8bfed4e3ad3fa2ed8e8d737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ead6e3532a2427439f73f75d930ff45ef5ea7a105b9d1b2a5da2c77defed7a7b1ebf564acce1c112906a77bf85b1d788349a8516408f9beeee7225edf6a5d12
|
7
|
+
data.tar.gz: fd1f83cd7ccadf2c082ca3c9a2ddb6caa0ff2ee4d852489fc0e3e26777f6a135318af28ae563dfd98b872effe49b42c8114d68175fc1e5b9f879be6af80beb8e
|
data/Gemfile.lock
CHANGED
data/lib/opswalrus/app.rb
CHANGED
@@ -239,7 +239,9 @@ module OpsWalrus
|
|
239
239
|
puts output
|
240
240
|
exit_status
|
241
241
|
rescue Error => e
|
242
|
-
|
242
|
+
message = "Runtime error: #{e.message}"
|
243
|
+
puts message
|
244
|
+
print_script_result(message)
|
243
245
|
1
|
244
246
|
end
|
245
247
|
|
@@ -269,7 +271,9 @@ module OpsWalrus
|
|
269
271
|
|
270
272
|
exit_status
|
271
273
|
rescue Error => e
|
272
|
-
|
274
|
+
message = "Runtime error: #{e.message}"
|
275
|
+
puts message
|
276
|
+
print_script_result(message)
|
273
277
|
1
|
274
278
|
ensure
|
275
279
|
FileUtils.remove_entry(tmp_bundle_root_dir) if tmp_bundle_root_dir
|
@@ -299,7 +303,9 @@ module OpsWalrus
|
|
299
303
|
|
300
304
|
exit_status
|
301
305
|
rescue Error => e
|
302
|
-
|
306
|
+
message = "Runtime error: #{e.message}"
|
307
|
+
puts message
|
308
|
+
print_script_result(message)
|
303
309
|
1
|
304
310
|
ensure
|
305
311
|
FileUtils.remove_entry(tmp_bundle_root_dir) if tmp_bundle_root_dir
|
@@ -60,16 +60,16 @@ module OpsWalrus
|
|
60
60
|
end
|
61
61
|
new_mapping.merge!(password_mappings) if password_mappings
|
62
62
|
|
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}"))
|
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
|
-
debug(Style.red("with_mapping -> reset"))
|
68
|
+
# debug(Style.red("with_mapping -> reset"))
|
69
69
|
@online_matcher.reset
|
70
70
|
yield self
|
71
71
|
else
|
72
|
-
debug(Style.red("with_mapping -> new mapping"))
|
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
|
-
debug(Style.yellow("new_matches=`#{new_matches}`"))
|
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
|
-
debug(Style.yellow("response_data=`#{response_data.inspect}`"))
|
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
|
data/lib/opswalrus/version.rb
CHANGED