calabash-cucumber 0.9.105 → 0.9.106
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.
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
calabash-cucumber (0.9.
|
4
|
+
calabash-cucumber (0.9.106)
|
5
5
|
CFPropertyList
|
6
6
|
bundler (~> 1.1)
|
7
7
|
cucumber
|
8
8
|
httpclient (~> 2.2.7)
|
9
9
|
json
|
10
10
|
location-one (~> 0.0.6)
|
11
|
-
sim_launcher (
|
11
|
+
sim_launcher (>= 0.4.5)
|
12
12
|
slowhandcuke
|
13
13
|
|
14
14
|
GEM
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
rack (1.4.1)
|
35
35
|
rack-protection (1.2.0)
|
36
36
|
rack
|
37
|
-
sim_launcher (0.
|
37
|
+
sim_launcher (0.4.5)
|
38
38
|
sinatra
|
39
39
|
sinatra (1.3.3)
|
40
40
|
rack (~> 1.3, >= 1.3.6)
|
data/calabash-cucumber.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_dependency( "cucumber" )
|
20
20
|
s.add_dependency( "json" )
|
21
21
|
s.add_dependency( "CFPropertyList" )
|
22
|
-
s.add_dependency( "sim_launcher", "0.
|
22
|
+
s.add_dependency( "sim_launcher", ">= 0.4.5")
|
23
23
|
s.add_dependency( "slowhandcuke" )
|
24
24
|
s.add_dependency( "location-one", "~>0.0.6")
|
25
25
|
s.add_dependency( "httpclient","~> 2.2.7")
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'sim_launcher'
|
2
|
+
require 'json'
|
3
|
+
require 'net/http'
|
2
4
|
require 'CFPropertyList'
|
3
5
|
|
4
6
|
module Calabash
|
@@ -68,7 +70,7 @@ module Calabash
|
|
68
70
|
File.basename(xc_proj).downcase.start_with?(xcode_workspace_name)
|
69
71
|
end
|
70
72
|
end
|
71
|
-
|
73
|
+
|
72
74
|
if (build_dirs.count == 0)
|
73
75
|
msg = ["Unable to find your built app."]
|
74
76
|
msg << "This means that Calabash can't automatically launch iOS simulator."
|
@@ -175,7 +177,25 @@ module Calabash
|
|
175
177
|
num_pings = 0
|
176
178
|
until connected or (num_pings == max_ping)
|
177
179
|
begin
|
178
|
-
|
180
|
+
connected = (ping_app == '405')
|
181
|
+
post_connect_sleep = (ENV['POST_START_BREAK'] || "2").to_f
|
182
|
+
sleep(post_connect_sleep) unless post_connect_sleep <= 0
|
183
|
+
server_version = get_version
|
184
|
+
if server_version
|
185
|
+
unless version_check(server_version)
|
186
|
+
msgs = ["You're running an older version of Calabash server with a newer client",
|
187
|
+
"Client:#{Calabash::Cucumber::VERSION}",
|
188
|
+
"Server:#{server_version}",
|
189
|
+
"Minimum server version #{Calabash::Cucumber::FRAMEWORK_VERSION}",
|
190
|
+
"Update recommended:",
|
191
|
+
"https://github.com/calabash/calabash-ios/wiki/B1-Updating-your-Calabash-iOS-version"
|
192
|
+
]
|
193
|
+
|
194
|
+
raise msgs.join("\n")
|
195
|
+
end
|
196
|
+
else
|
197
|
+
connected = false
|
198
|
+
end
|
179
199
|
rescue Exception => e
|
180
200
|
p e if num_pings > 2
|
181
201
|
ensure
|
@@ -216,6 +236,25 @@ module Calabash
|
|
216
236
|
end
|
217
237
|
status
|
218
238
|
end
|
239
|
+
|
240
|
+
def self.get_version
|
241
|
+
endpoint = ENV['DEVICE_ENDPOINT']|| "http://localhost:37265"
|
242
|
+
endpoint += "/" unless endpoint.end_with?"/"
|
243
|
+
url = URI.parse("#{endpoint}version")
|
244
|
+
|
245
|
+
puts "Fetch version #{url}..."
|
246
|
+
begin
|
247
|
+
body = Net::HTTP.get_response(url).body
|
248
|
+
return JSON.parse(body)
|
249
|
+
rescue
|
250
|
+
end
|
251
|
+
nil
|
252
|
+
end
|
253
|
+
|
254
|
+
def self.version_check(version)
|
255
|
+
server_version = version["version"]
|
256
|
+
Calabash::Cucumber::FRAMEWORK_VERSION == server_version
|
257
|
+
end
|
219
258
|
end
|
220
259
|
|
221
260
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.106
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
12
|
+
date: 2012-09-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|
@@ -64,17 +64,17 @@ dependencies:
|
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- - '
|
67
|
+
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.4.5
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- - '
|
75
|
+
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
77
|
+
version: 0.4.5
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: slowhandcuke
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|