calabash-android 0.3.2.pre4 → 0.3.2.pre5
Sign up to get free protection for your applications and to get access to all the features.
Binary file
|
@@ -30,7 +30,10 @@ module Operations
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
def default_device
|
33
|
-
|
33
|
+
unless @default_device
|
34
|
+
@default_device = Device.new(self, ENV["ADB_DEVICE_ARG"], ENV["TEST_SERVER_PORT"], ENV["APP_PATH"], ENV["TEST_APP_PATH"])
|
35
|
+
end
|
36
|
+
@default_device
|
34
37
|
end
|
35
38
|
|
36
39
|
def performAction(action, *arguments)
|
@@ -120,20 +123,13 @@ module Operations
|
|
120
123
|
end
|
121
124
|
|
122
125
|
class Device
|
123
|
-
@@default_device = nil
|
124
|
-
|
125
|
-
def self.default_device
|
126
|
-
unless @@default_device
|
127
|
-
@@default_device = Device.new(ENV["ADB_DEVICE_ARG"], ENV["TEST_SERVER_PORT"], ENV["APP_PATH"], ENV["TEST_APP_PATH"])
|
128
|
-
end
|
129
|
-
@@default_device
|
130
|
-
end
|
131
126
|
|
132
127
|
def make_default_device
|
133
|
-
|
128
|
+
@cucumber_world.default_device = self
|
134
129
|
end
|
135
130
|
|
136
|
-
def initialize(serial, server_port, app_path, test_server_path)
|
131
|
+
def initialize(cucumber_world, serial, server_port, app_path, test_server_path)
|
132
|
+
@cucumber_world = cucumber_world
|
137
133
|
@serial = serial
|
138
134
|
@server_port = server_port
|
139
135
|
@app_path = app_path
|
@@ -186,7 +182,7 @@ module Operations
|
|
186
182
|
raise "Empty result from TestServer" if result.chomp.empty?
|
187
183
|
result = JSON.parse(result)
|
188
184
|
if not result["success"] then
|
189
|
-
screenshot_embed
|
185
|
+
@cucumber_world.screenshot_embed
|
190
186
|
if result["bonusInformation"] && result["bonusInformation"].size > 0 && result["bonusInformation"][0].include?("Exception")
|
191
187
|
log result["bonusInformation"][0]
|
192
188
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.2.
|
4
|
+
version: 0.3.2.pre5
|
5
5
|
prerelease: 6
|
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-10-
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber
|