calabash-cucumber 0.23.5 → 0.23.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 887f28d38bd67a94af95b2fcd048a0dfb8b89ab8ec8fc23967c87a4a69e3d8bb
4
- data.tar.gz: 59078f1e554c259710688f7c37d85a087583e79cfbdbe95697afe11490d187ed
3
+ metadata.gz: 99bf212acb6176f34796ba11ac08fa2a0a764a8b89b7c61a9210f8be84c92d3c
4
+ data.tar.gz: 9a5f5d3cf015ae7cc5acc72e2e12c9f498a15d0dbce34634c84f8f1db59ea4e0
5
5
  SHA512:
6
- metadata.gz: 204bf47b8a6b969fd4cc36d4f55cf210552fa0b1347ca9c6bf989edaf618e010fe01b4ae301a1ffa3786a4aca4067ad70a74c95f583a0ef9e270373ca3b8ec66
7
- data.tar.gz: 969f4af008ac53bfcc9e63d585b993d58abe0a9924475233f48b8501710119bb9135b9dd3ddd3d34435812c7d16fb108ad333b7cfacf627ba5627fbc21f8f81c
6
+ metadata.gz: 51883d729a66ab586d52ad1a11cac9d186e36d890e619138dc906465febdd1d2e3c3d86298e56c00502129e6d142c205a9adc69e672fc57317fdf4ae59fad936
7
+ data.tar.gz: 9ad9ddfc3e088307b3e4ea66d7d8b44117999303e99bbee510e6ca40211475d71f2953a72ab7acb4101ed89fd30a1aff56e98aa37c5432e1e1972af00a345012
@@ -6,7 +6,7 @@ module Calabash
6
6
  # @!visibility private
7
7
  module HTTPHelpers
8
8
 
9
- require "calabash-cucumber/environment"
9
+ require 'calabash-cucumber/environment'
10
10
 
11
11
  # @!visibility private
12
12
  CAL_HTTP_RETRY_COUNT=3
@@ -30,19 +30,23 @@ module Calabash
30
30
  options[:body] = data.to_json
31
31
  end
32
32
  end
33
- res = make_http_request(options)
34
- res.force_encoding("UTF-8") if res.respond_to?(:force_encoding)
33
+ res = Timeout.timeout(45) do
34
+ make_http_request(options)
35
+ end
36
+ res.force_encoding('UTF-8') if res.respond_to?(:force_encoding)
35
37
 
36
38
  _private_dismiss_springboard_alerts
37
39
 
38
40
  res
41
+ rescue Timeout::Error
42
+ raise Timeout::Error, 'The http call to Calabash web-server has timed out. It may mean that your app has crashed or frozen'
39
43
  end
40
44
 
41
45
  # @!visibility private
42
46
  def url_for(verb)
43
47
  url = URI.parse(Calabash::Cucumber::Environment.device_endpoint)
44
48
  path = url.path
45
- if path.end_with? "/"
49
+ if path.end_with? '/'
46
50
  path = "#{path}#{verb}"
47
51
  else
48
52
  path = "#{path}/#{verb}"
@@ -97,9 +101,9 @@ module Calabash
97
101
  # @!visibility private
98
102
  def init_request(options={})
99
103
  http = HTTPClient.new
100
- http.connect_timeout = 30
101
- http.send_timeout = 120
102
- http.receive_timeout = 120
104
+ http.connect_timeout = 5
105
+ http.send_timeout = 15
106
+ http.receive_timeout = 15
103
107
  if options[:debug] || (ENV['DEBUG_HTTP'] == '1' && options[:debug] != false)
104
108
  http.debug_dev = $stdout
105
109
  end
@@ -112,7 +116,7 @@ module Calabash
112
116
  #
113
117
  # Do not call this method.
114
118
  def _private_dismiss_springboard_alerts
115
- require "calabash-cucumber/launcher"
119
+ require 'calabash-cucumber/launcher'
116
120
  launcher = Calabash::Cucumber::Launcher.launcher_if_used
117
121
  if launcher && launcher.automator && launcher.automator.name == :device_agent
118
122
  launcher.automator.client.send(:_dismiss_springboard_alerts)
@@ -3,10 +3,10 @@ module Calabash
3
3
 
4
4
  # @!visibility public
5
5
  # The Calabash iOS gem version.
6
- VERSION = "0.23.5"
6
+ VERSION = "0.23.7"
7
7
 
8
8
  # @!visibility public
9
9
  # The minimum required version of the Calabash embedded server.
10
- MIN_SERVER_VERSION = "0.23.5"
10
+ MIN_SERVER_VERSION = "0.23.4"
11
11
  end
12
12
  end
@@ -274,7 +274,7 @@ module Calabash
274
274
 
275
275
  # @!visibility private
276
276
  def wait_for_condition(options = {})
277
- timeout = options[:timeout] || ENV['WAIT_TIMEOUT']
277
+ timeout = options[:timeout] || ENV['WAIT_TIMEOUT'].to_i
278
278
  timeout = DEFAULT_OPTS[:timeout] unless timeout && timeout > 0
279
279
 
280
280
  options[:query] = options[:query] || '*'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.5
4
+ version: 0.23.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-20 00:00:00.000000000 Z
11
+ date: 2023-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -445,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
445
445
  - !ruby/object:Gem::Version
446
446
  version: '0'
447
447
  requirements: []
448
- rubygems_version: 3.3.26
448
+ rubygems_version: 3.3.3
449
449
  signing_key:
450
450
  specification_version: 4
451
451
  summary: Client for calabash-ios-server for automated functional testing on iOS