devicefarm 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devicefarm.rb +11 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3b92621f6fb3c658fe029f09e61d100e765a33b
|
4
|
+
data.tar.gz: 47eaae12f02829036ca563cac8f88a0edaee137c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36e68109a77dc2fa523744af4e74e40c90c46d04961494cc974cc6ff72c11042a23b6ba4506fc0b2626d65c2e4f395a56a9f770603e3ae6b551e1902519778b1
|
7
|
+
data.tar.gz: 79be70250dfe9813bf99a0f99b1a2b26d2d32dce1fa3a64b1b1454f28b922d64920d2da865db86d3e8097972dabcaebc6f301183d38f4fa0f5617afa938f87f3
|
data/lib/devicefarm.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
class DeviceFarm
|
2
2
|
|
3
|
+
def self.get_device_type_by_binary(binary_path)
|
4
|
+
if binary_path.include? ".apk"
|
5
|
+
"ANDROID_APP"
|
6
|
+
else
|
7
|
+
"IOS_APP"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
3
11
|
def self.test_with_calabash(
|
4
12
|
project_name:,
|
5
13
|
device_pool_name:,
|
6
|
-
|
14
|
+
binary_path:,
|
7
15
|
calabash_test_package_path:)
|
8
16
|
|
9
17
|
devicefarmapi = DeviceFarm::DeviceFarmApi.new()
|
@@ -12,8 +20,8 @@ class DeviceFarm
|
|
12
20
|
pool_name:device_pool_name,
|
13
21
|
project:project)
|
14
22
|
upload_apk = devicefarmapi.upload_artifact(
|
15
|
-
file_path:
|
16
|
-
type:
|
23
|
+
file_path:binary_path,
|
24
|
+
type: get_device_type_by_binary,
|
17
25
|
project:project)
|
18
26
|
upload_artifact_test = devicefarmapi.upload_artifact(
|
19
27
|
file_path:calabash_test_package_path,
|