bugsnag-maze-runner 9.23.0 → 9.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/maze/aws/sam.rb +5 -8
  3. data/lib/maze.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8884abca15e25562492a3411949b061374130f0975c39da3635939c31ab94ccb
4
- data.tar.gz: fe80b49925c6579219f0e8a307d31be1915e6cfacabe30293d3c24898e663a29
3
+ metadata.gz: 79e35c02b13ac2de4eb68fc7f6474d7de9d79292d3a3bf0f5c02486b4c76b072
4
+ data.tar.gz: 3208fde266b0c77da43eda01beefbf91ebd083256b2a062849693677547a86f1
5
5
  SHA512:
6
- metadata.gz: 748f7b6a945799d375b4b7d18d3183b3627f696fa229c0572e21ba5074b8d23f4c7833605b470deaaf3ef00acef2b6f54f48a3d3a4eb8f105f62de592903a20e
7
- data.tar.gz: a06ea26f1055c4837fe9ccf22703bdcad6bab92dc58caa2c04edfa5aaefec0950c82bc39805dc5dd47fb7a8ce754dc6a6888cda11ff04f9ff9c428ec354a94a3
6
+ metadata.gz: e4b9616d4ef517e60f90ad89ee1d551a0155ef17f02817189e7a5a925cfb29ac9029bde09112a8e1adb3bdd04aff19dee20ce145435cb0eb1829cf8dc0830ede
7
+ data.tar.gz: 761cea46e96dde5ce1c179e31b9edacb3f564458545a5cac0e6e5c6961ec361e0276723077e24d934c376a20f877310b19b9b760767b73602d13f10aff3c542f
data/lib/maze/aws/sam.rb CHANGED
@@ -62,6 +62,7 @@ module Maze
62
62
  #
63
63
  # @return [Hash]
64
64
  def parse(output)
65
+
65
66
  unless valid?(output)
66
67
  message = <<-WARNING
67
68
  The lambda function did not successfully complete.
@@ -76,14 +77,10 @@ module Maze
76
77
  end
77
78
 
78
79
  # Attempt to parse response line of the output.
79
- # It's possible for a Lambda to output nothing,
80
- # e.g. if it forcefully exited, so we allow JSON parse failures here
81
- begin
82
- response_line = output.find { |line| /{.*}/.match(line.strip) }
83
- parsed_output = JSON.parse(response_line)
84
- rescue JSON::ParserError
85
- return {}
86
- end
80
+ # We can assume that the output is the last line present that is JSON parsable
81
+ response_lines = output.find_all { |line| /^{.*}$/.match(line.strip) }
82
+ response_line = response_lines.last
83
+ parsed_output = response_line.nil? ? {} : JSON.parse(response_line)
87
84
 
88
85
  # Error output has no "body" of additional JSON so we can stop here
89
86
  return parsed_output unless parsed_output.key?('body')
data/lib/maze.rb CHANGED
@@ -8,7 +8,7 @@ require_relative 'maze/timers'
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
10
 
11
- VERSION = '9.23.0'
11
+ VERSION = '9.23.1'
12
12
 
13
13
  class << self
14
14
  attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag-maze-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.23.0
4
+ version: 9.23.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-18 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber