bugsnag-maze-runner 10.4.1 → 10.5.0
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/bin/maze-runner +1 -0
- data/lib/maze/client/selenium/bs_browsers.yml +6 -48
- data/lib/maze/request_list.rb +3 -1
- data/lib/maze/server.rb +1 -0
- data/lib/maze/servlets/idempotent_command_servlet.rb +86 -0
- data/lib/maze.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26d2aaea7ff0a765fd06e46247a51dfb467a5ced471753a5e5fab232ac2f584a
|
4
|
+
data.tar.gz: 8e0606052630e861d959127ba8c4461f19f2431e9de1ef1c7dfe238369ad9e32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 341ddb3af26761202dc718118ce192664d8853202d15244bafe282579ebb0cffc0c953a754870119ae651461a008fcb00b2dff2984d132508a485008a80afdb3
|
7
|
+
data.tar.gz: 2354d453f2f4e68a89c61a08c07f514fc210185f3709e84b587d0b668b98efde72cce8921d4c6b24e29162a577b2f75bf6b15467ff02fecb9a1d5cd277d0703d
|
data/bin/maze-runner
CHANGED
@@ -62,6 +62,7 @@ require_relative '../lib/maze/loggers/logger'
|
|
62
62
|
require_relative '../lib/maze/servlets/base_servlet'
|
63
63
|
require_relative '../lib/maze/servlets/all_commands_servlet'
|
64
64
|
require_relative '../lib/maze/servlets/command_servlet'
|
65
|
+
require_relative '../lib/maze/servlets/idempotent_command_servlet'
|
65
66
|
require_relative '../lib/maze/servlets/error_config_servlet'
|
66
67
|
require_relative '../lib/maze/servlets/servlet'
|
67
68
|
require_relative '../lib/maze/servlets/log_servlet'
|
@@ -24,12 +24,6 @@ ie_11:
|
|
24
24
|
os: "windows"
|
25
25
|
osVersion: "10"
|
26
26
|
|
27
|
-
edge_14:
|
28
|
-
browserName: "edge"
|
29
|
-
browserVersion: "14"
|
30
|
-
os: "windows"
|
31
|
-
osVersion: "10"
|
32
|
-
|
33
27
|
edge_15:
|
34
28
|
browserName: "edge"
|
35
29
|
browserVersion: "15"
|
@@ -68,7 +62,7 @@ safari_6:
|
|
68
62
|
|
69
63
|
safari_10:
|
70
64
|
browserName: "safari"
|
71
|
-
browserVersion: "10.
|
65
|
+
browserVersion: "10.1"
|
72
66
|
os: "OS X"
|
73
67
|
osVersion: "sierra"
|
74
68
|
|
@@ -86,29 +80,22 @@ safari_13:
|
|
86
80
|
|
87
81
|
safari_14:
|
88
82
|
browserName: "Safari"
|
89
|
-
browserVersion: "14.
|
83
|
+
browserVersion: "14.1"
|
90
84
|
os: "OS X"
|
91
85
|
osVersion: "Big Sur"
|
92
86
|
|
93
87
|
safari_15:
|
94
88
|
browserName: "Safari"
|
95
|
-
browserVersion: "15.
|
89
|
+
browserVersion: "15.6"
|
96
90
|
os: "OS X"
|
97
91
|
osVersion: "Monterey"
|
98
92
|
|
99
93
|
safari_16:
|
100
94
|
browserName: "Safari"
|
101
|
-
browserVersion: "16.
|
95
|
+
browserVersion: "16.5"
|
102
96
|
os: "OS X"
|
103
97
|
osVersion: "Ventura"
|
104
98
|
|
105
|
-
ios_9:
|
106
|
-
browserName: "iphone"
|
107
|
-
device: "iPhone 6S"
|
108
|
-
os: "ios"
|
109
|
-
osVersion: "9.0"
|
110
|
-
realMobile: true
|
111
|
-
|
112
99
|
ios_10:
|
113
100
|
browserName: "iphone"
|
114
101
|
device: "iPhone 7"
|
@@ -123,14 +110,6 @@ ios_11:
|
|
123
110
|
osVersion: "11"
|
124
111
|
realMobile: true
|
125
112
|
|
126
|
-
# Using iPad Pro here because no iPhone is available on BrowserStack with iOS 12
|
127
|
-
ios_12:
|
128
|
-
browserName: "iphone"
|
129
|
-
device: "iPad Pro 12.9 2018"
|
130
|
-
os: "ios"
|
131
|
-
osVersion: "12"
|
132
|
-
realMobile: true
|
133
|
-
|
134
113
|
ios_13:
|
135
114
|
browserName: "iphone"
|
136
115
|
device: "iPhone 11"
|
@@ -172,32 +151,11 @@ ios_18:
|
|
172
151
|
osVersion: "18"
|
173
152
|
realMobile: true
|
174
153
|
|
175
|
-
android_4:
|
176
|
-
browserName: "Android Browser"
|
177
|
-
device: "Google Nexus 5"
|
178
|
-
os: "android"
|
179
|
-
osVersion: "4.4"
|
180
|
-
realMobile: true
|
181
|
-
|
182
|
-
android_5:
|
183
|
-
browserName: "Android Browser"
|
184
|
-
device: "Samsung Galaxy S6"
|
185
|
-
os: "android"
|
186
|
-
osVersion: "5.0"
|
187
|
-
realMobile: true
|
188
|
-
|
189
|
-
android_6:
|
190
|
-
browserName: "Android Browser"
|
191
|
-
device: "Samsung Galaxy S7"
|
192
|
-
os: "android"
|
193
|
-
osVersion: "6.0"
|
194
|
-
realMobile: true
|
195
|
-
|
196
154
|
android_8:
|
197
155
|
browserName: "Android Browser"
|
198
|
-
device: "Samsung Galaxy
|
156
|
+
device: "Samsung Galaxy Note 9"
|
199
157
|
os: "android"
|
200
|
-
osVersion: "8.
|
158
|
+
osVersion: "8.1"
|
201
159
|
realMobile: true
|
202
160
|
|
203
161
|
android_9:
|
data/lib/maze/request_list.rb
CHANGED
@@ -26,8 +26,10 @@ module Maze
|
|
26
26
|
# @param request The new request, from which a clone is made
|
27
27
|
def add(request)
|
28
28
|
clone = request.clone
|
29
|
-
# UUID primarily used for commands, but no harm to set on everything
|
29
|
+
# UUID and other metadata primarily used for commands, but no harm to set on everything
|
30
30
|
clone[:uuid] = SecureRandom.uuid
|
31
|
+
clone[:cucumber_scenario_name] = Maze.scenario.name
|
32
|
+
clone[:cucumber_scenario_location] = Maze.scenario.location
|
31
33
|
clone[:run_uuid] = Maze.run_uuid
|
32
34
|
@requests.append clone
|
33
35
|
@count += 1
|
data/lib/maze/server.rb
CHANGED
@@ -272,6 +272,7 @@ module Maze
|
|
272
272
|
server.mount '/breakpad-symbol', Servlets::Servlet, :sourcemaps
|
273
273
|
server.mount '/unity-line-mappings', Servlets::Servlet, :sourcemaps
|
274
274
|
server.mount '/command', Servlets::CommandServlet
|
275
|
+
server.mount '/idem-command', Servlets::IdempotentCommandServlet
|
275
276
|
server.mount '/commands', Servlets::AllCommandsServlet
|
276
277
|
server.mount '/error-config', Servlets::ErrorConfigServlet
|
277
278
|
server.mount '/logs', Servlets::LogServlet
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module Maze
|
6
|
+
module Servlets
|
7
|
+
|
8
|
+
# Allows clients to queue up "commands", in the form of Ruby hashes, using Maze::Server.commands.add. GET
|
9
|
+
# requests made to the /command endpoint will then respond with each queued command in turn.
|
10
|
+
class IdempotentCommandServlet < BaseServlet
|
11
|
+
|
12
|
+
NOOP_COMMAND = '{"action": "noop", "message": "No commands queued"}'
|
13
|
+
RESET_COMMAND = '{"action": "reset_uuid", "message": "The UUID given was unknown - client must reset its last known UUID"}'
|
14
|
+
|
15
|
+
# Serves the next command, if there is one.
|
16
|
+
#
|
17
|
+
# @param request [HTTPRequest] The incoming GET request
|
18
|
+
# @param response [HTTPResponse] The response to return
|
19
|
+
def do_GET(request, response)
|
20
|
+
after_uuid = request.query['after']
|
21
|
+
if after_uuid.nil?
|
22
|
+
response.body = "The 'after' query parameter must be provided, but may be an empty string"
|
23
|
+
response.status = 400
|
24
|
+
else
|
25
|
+
command_after(after_uuid, response)
|
26
|
+
end
|
27
|
+
|
28
|
+
response.header['Access-Control-Allow-Origin'] = '*'
|
29
|
+
end
|
30
|
+
|
31
|
+
def send_current_command(response)
|
32
|
+
commands = Maze::Server.commands
|
33
|
+
|
34
|
+
if commands.size_remaining == 0
|
35
|
+
response.body = NOOP_COMMAND
|
36
|
+
response.status = 200
|
37
|
+
else
|
38
|
+
command = commands.current
|
39
|
+
response.body = JSON.pretty_generate(command)
|
40
|
+
response.status = 200
|
41
|
+
commands.next
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def command_after(uuid, response)
|
46
|
+
commands = Maze::Server.commands
|
47
|
+
if uuid.empty?
|
48
|
+
# Return the first command in the list, if there is one
|
49
|
+
index = -1
|
50
|
+
else
|
51
|
+
# Find the matching command
|
52
|
+
index = commands.all.find_index {|command| command[:uuid] == uuid }
|
53
|
+
end
|
54
|
+
|
55
|
+
if index.nil?
|
56
|
+
# No matching command - client must reset its UUID
|
57
|
+
response.body = RESET_COMMAND
|
58
|
+
response.status = 200
|
59
|
+
else
|
60
|
+
if index + 1 < commands.size_all
|
61
|
+
# Respond with the next command in the queue
|
62
|
+
command = commands.get(index + 1)
|
63
|
+
command_json = JSON.pretty_generate(command)
|
64
|
+
response.body = command_json
|
65
|
+
response.status = 200
|
66
|
+
else
|
67
|
+
# The UUID given was for the last command in the list
|
68
|
+
response.body = NOOP_COMMAND
|
69
|
+
response.status = 200
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Logs and returns a set of valid headers for this servlet.
|
75
|
+
#
|
76
|
+
# @param request [HTTPRequest] The incoming GET request
|
77
|
+
# @param response [HTTPResponse] The response to return
|
78
|
+
def do_OPTIONS(request, response)
|
79
|
+
super
|
80
|
+
|
81
|
+
response.header['Access-Control-Allow-Methods'] = 'POST, OPTIONS'
|
82
|
+
response.status = Server.status_code('OPTIONS')
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
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 = '10.
|
11
|
+
VERSION = '10.5.0'
|
12
12
|
|
13
13
|
class << self
|
14
14
|
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugsnag-maze-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Kirkland
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-10-
|
12
|
+
date: 2025-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
@@ -514,6 +514,7 @@ files:
|
|
514
514
|
- lib/maze/servlets/base_servlet.rb
|
515
515
|
- lib/maze/servlets/command_servlet.rb
|
516
516
|
- lib/maze/servlets/error_config_servlet.rb
|
517
|
+
- lib/maze/servlets/idempotent_command_servlet.rb
|
517
518
|
- lib/maze/servlets/log_servlet.rb
|
518
519
|
- lib/maze/servlets/reflective_servlet.rb
|
519
520
|
- lib/maze/servlets/servlet.rb
|