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 +4 -4
- data/lib/calabash-cucumber/http_helpers.rb +12 -8
- data/lib/calabash-cucumber/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99bf212acb6176f34796ba11ac08fa2a0a764a8b89b7c61a9210f8be84c92d3c
|
4
|
+
data.tar.gz: 9a5f5d3cf015ae7cc5acc72e2e12c9f498a15d0dbce34634c84f8f1db59ea4e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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 =
|
34
|
-
|
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 =
|
101
|
-
http.send_timeout =
|
102
|
-
http.receive_timeout =
|
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
|
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)
|
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.
|
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-
|
11
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|