calabash-cucumber 0.23.6 → 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: bcf1caa4507be3bf90bea7902ee781b100e71b1939cee788e0d790d2a88b5628
4
- data.tar.gz: fcfcd4778df6ea2afae896f7c6c3655a87ea67508afeb88e3c7a45b68ac80af5
3
+ metadata.gz: 99bf212acb6176f34796ba11ac08fa2a0a764a8b89b7c61a9210f8be84c92d3c
4
+ data.tar.gz: 9a5f5d3cf015ae7cc5acc72e2e12c9f498a15d0dbce34634c84f8f1db59ea4e0
5
5
  SHA512:
6
- metadata.gz: cc7bd44d9a25b6b2bbcc85457d9ec2f7bfcc2318e54f15c814df9c258216c21439d63aaaf91b0362a85acb0979c84ac537b74d91c8a46ee3661ac1d2d5266dd0
7
- data.tar.gz: 53ccdfcd08da4517c56e28be2609073ec1a7f41204d93bb0c8ca3daf225b4a0e693227b64007ad4e2e4702e174ef7a98322abbed142eeda833b9673062c55132
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,7 +3,7 @@ module Calabash
3
3
 
4
4
  # @!visibility public
5
5
  # The Calabash iOS gem version.
6
- VERSION = "0.23.6"
6
+ VERSION = "0.23.7"
7
7
 
8
8
  # @!visibility public
9
9
  # The minimum required version of the Calabash embedded server.
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.6
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-21 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