bugsnag-maze-runner 9.14.0 → 9.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb842b24909ce9e347d04a2c37cdd108f22a5261faa41566188cb7eae9b7f8a0
4
- data.tar.gz: 9d17559ba0c60a8707629dca8d9bf43a9d599a7f314750451c5a75beead78f5b
3
+ metadata.gz: ee36c242d277dcadc7deb388ddc408bdbc416fef634f4dcd50b8f47ab001483f
4
+ data.tar.gz: 806dbe2236e1e8d4dbc65eda74e63e49fefacfede87752f5beee19127b5df4e1
5
5
  SHA512:
6
- metadata.gz: a44150cac8caac4e3e555857d7eb46749e86e56015b8a8d9404af4281b953b86c7dd55b5b54aabb8216ef2d993e91a1285f617986f75565bb486a18b376895f2
7
- data.tar.gz: 04a683fc786c1ac1d0bebc4b0422002423545d9af567693eaa5d0e96a3b760952ed34f5ac9da7da3cb17d096c508dc236b657e16b5198db5fd2a34a6afcc6c15
6
+ metadata.gz: 601b6afc508d59eedb48080be2980d66868ae253ea0114740dee82c2db0e2e92159a8b023dc204f7e9056acf47ad8a1e7f62e218c54712094758ca60e72cfed0
7
+ data.tar.gz: 404f98797234da38d267f9078769f4505449f7748d99f3365ea0cef682b8864c7089703591c8cad911d38fd736b88dc8ec17169240833a216ce846bc2dcf615f
data/bin/maze-runner CHANGED
@@ -174,7 +174,8 @@ class MazeRunnerEntry
174
174
 
175
175
  # Parse args, processing any Maze Runner specific options
176
176
  @args = args.dup
177
- options = Maze::Option::Parser.parse args
177
+ load_options_from_files
178
+ options = Maze::Option::Parser.parse @args
178
179
 
179
180
  if options[Maze::Option::LIST_DEVICES]
180
181
  case options[Maze::Option::FARM].to_sym
@@ -211,7 +212,6 @@ class MazeRunnerEntry
211
212
  Maze::Option::Processor.populate Maze.config, options
212
213
 
213
214
  # Adjust CL options before calling down to Cucumber
214
- load_options_from_files
215
215
  remove_maze_runner_args
216
216
  add_cucumber_args
217
217
 
@@ -270,7 +270,7 @@ def attribute_value_matches?(attribute_value, expected_type, expected_value)
270
270
  when 'intValue'
271
271
  expected_value.to_i.eql?(attribute_value[expected_type].to_i)
272
272
  when 'doubleValue'
273
- expected_value.to_f.eql?(attribute_value[expected_type])
273
+ expected_value.to_f.eql?(attribute_value[expected_type].to_f)
274
274
  when 'boolValue'
275
275
  expected_value.eql?('true').eql?(attribute_value[expected_type])
276
276
  when 'arrayValue'
@@ -77,16 +77,17 @@ module Maze
77
77
  'ANDROID_11' => make_android_hash('Google Pixel 4', '11.0'),
78
78
  'ANDROID_10' => make_android_hash('Google Pixel 4', '10.0'),
79
79
  'ANDROID_9' => make_android_hash('Google Pixel 3', '9.0'),
80
- 'ANDROID_8' => make_android_hash('Samsung Galaxy Note 9', '8.1'),
80
+ 'ANDROID_8' => make_android_hash('Samsung Galaxy S9', '8.0'),
81
81
  'ANDROID_7' => make_android_hash('Samsung Galaxy S8', '7.0'),
82
82
 
83
83
  # iOS devices
84
+ 'IOS_18' => make_ios_hash('iPhone 14', '18'),
84
85
  'IOS_17' => make_ios_hash('iPhone 15', '17'),
85
86
  'IOS_16' => make_ios_hash('iPhone 14', '16'),
86
87
  'IOS_15' => make_ios_hash('iPhone 13', '15'),
87
88
  'IOS_14' => make_ios_hash('iPhone 11', '14'),
88
89
  'IOS_13' => make_ios_hash('iPhone 11', '13'),
89
- 'IOS_12' => make_ios_hash('iPhone 8', '12'),
90
+ 'IOS_12' => make_ios_hash('iPhone XS', '12'),
90
91
  }
91
92
 
92
93
  # Specific Android devices
@@ -97,15 +98,8 @@ module Maze
97
98
  add_android 'Motorola Moto G9 Play', '10.0', hash # ANDROID_10_0_MOTOROLA_MOTO_G9_PLAY
98
99
  add_android 'OnePlus 8', '10.0', hash # ANDROID_10_0_ONEPLUS_8
99
100
 
100
- add_android 'Google Pixel 2', '9.0', hash # ANDROID_9_0_GOOGLE_PIXEL_2
101
- add_android 'Samsung Galaxy Note 9', '8.1', hash # ANDROID_8_1_SAMSUNG_GALAXY_NOTE_9
102
- add_android 'Samsung Galaxy Tab S4', '8.1', hash # ANDROID_8_1_SAMSUNG_GALAXY_TAB_S4
103
- add_android 'Samsung Galaxy Tab S3', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_TAB_S3
104
101
  add_android 'Samsung Galaxy S9', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_S9
105
- add_android 'Samsung Galaxy S9 Plus', '8.0', hash # ANDROID_8_0_SAMSUNG_GALAXY_S9_PLUS
106
102
 
107
- add_android 'Samsung Galaxy A8', '7.1', hash # ANDROID_7_1_SAMSUNG_GALAXY_A8
108
- add_android 'Samsung Galaxy Note 8', '7.1', hash # ANDROID_7_1_SAMSUNG_GALAXY_NOTE_8
109
103
  add_android 'Samsung Galaxy S8', '7.0', hash # ANDROID_7_0_SAMSUNG_GALAXY_S8
110
104
 
111
105
  # Specific iOS devices
@@ -12,6 +12,7 @@ module Maze
12
12
  capabilities.merge! browsers[config.browser]
13
13
  capabilities.merge! JSON.parse(config.capabilities_option)
14
14
  capabilities['bitbar:options']['testTimeout'] = 900
15
+ capabilities['acceptInsecureCerts'] = true
15
16
  config.capabilities = capabilities
16
17
 
17
18
  if Maze::Client::BitBarClientUtils.use_local_tunnel?
@@ -16,6 +16,7 @@ module Maze
16
16
  capabilities['browserstack.local'] = 'true'
17
17
  capabilities['browserstack.localIdentifier'] = Maze.run_uuid
18
18
  capabilities['browserstack.console'] = 'errors'
19
+ capabilities['acceptInsecureCerts'] = 'true'
19
20
 
20
21
  # Convert W3S capabilities to JSON-WP
21
22
  capabilities['browser'] = browser['browserName']
@@ -29,6 +30,7 @@ module Maze
29
30
  config.capabilities = capabilities
30
31
  else
31
32
  capabilities = {
33
+ 'acceptInsecureCerts' => true,
32
34
  'bstack:options' => {
33
35
  'local' => 'true',
34
36
  'localIdentifier' => Maze.run_uuid
@@ -22,6 +22,9 @@ module Maze
22
22
  # Server configuration
23
23
  #
24
24
 
25
+ # Whether the mock server should use https
26
+ attr_accessor :https
27
+
25
28
  # Mock server bind address
26
29
  attr_accessor :bind_address
27
30
 
@@ -118,7 +118,13 @@ module Maze
118
118
  capabilities: @capabilities
119
119
  end
120
120
  else
121
- driver = ::Selenium::WebDriver.for driver_for
121
+ if driver_for == :chrome
122
+ options = Selenium::WebDriver::Options.chrome
123
+ elsif driver_for == :firefox
124
+ options = Selenium::WebDriver::Options.firefox
125
+ end
126
+ options.accept_insecure_certs = true
127
+ driver = ::Selenium::WebDriver.for driver_for, options: options
122
128
  end
123
129
  $logger.info "Selenium driver started in #{(Time.now - time).to_i}s"
124
130
  @driver = driver
@@ -35,8 +35,12 @@ module Maze
35
35
  begin
36
36
  Maze.driver.terminate_app Maze.driver.app_id
37
37
  rescue Selenium::WebDriver::Error::UnknownError
38
- $logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
39
- Maze.driver.close_app
38
+ if Maze.config.appium_version && Maze.config.appium_version.to_f < 2.0
39
+ $logger.warn 'terminate_app failed, using the slower but more forceful close_app instead'
40
+ Maze.driver.close_app
41
+ else
42
+ $logger.warn 'terminate_app failed, future errors may occur if the application did not close remotely'
43
+ end
40
44
  end
41
45
  Maze::Server.reset!
42
46
  Maze.driver.activate_app Maze.driver.app_id
@@ -60,6 +60,11 @@ module Maze
60
60
  text ''
61
61
  text 'Server options:'
62
62
 
63
+ opt Option::HTTPS,
64
+ 'Use HTTPS for the mock server',
65
+ short: :none,
66
+ type: :boolean,
67
+ default: false
63
68
  opt Option::BIND_ADDRESS,
64
69
  'Mock server bind address',
65
70
  short: :none,
@@ -13,6 +13,7 @@ module Maze
13
13
  def populate(config, options)
14
14
 
15
15
  # Server options
16
+ config.https = options[Maze::Option::HTTPS]
16
17
  config.bind_address = options[Maze::Option::BIND_ADDRESS]
17
18
  config.port = options[Maze::Option::PORT]
18
19
  config.null_port = options[Maze::Option::NULL_PORT]
data/lib/maze/option.rb CHANGED
@@ -6,12 +6,13 @@ module Maze
6
6
  # Document server options
7
7
  DS_BIND_ADDRESS = 'document-server-bind-address'
8
8
  DS_PORT = 'document-server-port'
9
- DS_ROOT = 'document-server-root'
10
9
 
11
10
  # Server options
11
+ HTTPS = 'https'
12
12
  BIND_ADDRESS = 'bind-address'
13
13
  NULL_PORT = 'null-port'
14
14
  PORT = 'port'
15
+ DS_ROOT = 'document-server-root'
15
16
 
16
17
  # Appium options
17
18
  A11Y_LOCATOR = 'a11y-locator'
data/lib/maze/server.rb CHANGED
@@ -209,11 +209,20 @@ module Maze
209
209
  loop do
210
210
 
211
211
  @thread = Thread.new do
212
+
212
213
  options = {
213
- Port: Maze.config.port,
214
- Logger: $logger,
215
- AccessLog: []
214
+ Port: Maze.config.port,
215
+ Logger: $logger,
216
+ AccessLog: []
216
217
  }
218
+ # SSL config if enabled
219
+ if Maze.config.https
220
+ cert_name = [
221
+ %w[CN localhost],
222
+ ]
223
+ options[:SSLEnable] = true
224
+ options[:SSLCertName] = cert_name
225
+ end
217
226
  options[:BindAddress] = Maze.config.bind_address unless Maze.config.bind_address.nil?
218
227
  server = WEBrick::HTTPServer.new(options)
219
228
 
@@ -243,6 +252,7 @@ module Maze
243
252
  server.mount '/metrics', Servlets::Servlet, :metrics
244
253
  server.mount '/reflect', Servlets::ReflectiveServlet
245
254
  server.mount '/docs', WEBrick::HTTPServlet::FileHandler, Maze.config.document_server_root unless Maze.config.document_server_root.nil?
255
+
246
256
  server.start
247
257
  rescue StandardError => e
248
258
  Bugsnag.notify e
data/lib/maze.rb CHANGED
@@ -7,7 +7,7 @@ require_relative 'maze/timers'
7
7
  # Glues the various parts of MazeRunner together that need to be accessed globally,
8
8
  # providing an alternative to the proliferation of global variables or singletons.
9
9
  module Maze
10
- VERSION = '9.14.0'
10
+ VERSION = '9.16.0'
11
11
 
12
12
  class << self
13
13
  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.14.0
4
+ version: 9.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Kirkland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-23 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -234,6 +234,62 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: 2.3.2
237
+ - !ruby/object:Gem::Dependency
238
+ name: ostruct
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: 0.6.0
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: 0.6.0
251
+ - !ruby/object:Gem::Dependency
252
+ name: logger
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '1.6'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '1.6'
265
+ - !ruby/object:Gem::Dependency
266
+ name: base64
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: 0.2.0
272
+ type: :runtime
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: 0.2.0
279
+ - !ruby/object:Gem::Dependency
280
+ name: bigdecimal
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: '3.1'
286
+ type: :runtime
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: '3.1'
237
293
  - !ruby/object:Gem::Dependency
238
294
  name: license_finder
239
295
  requirement: !ruby/object:Gem::Requirement