devicefarm 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/devicefarm.rb +11 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8e53f2560018d6ec78997faecd5ade7715a8432
4
- data.tar.gz: 6c1e23e1bd55b1e674fac39bd15c46986f0983a3
3
+ metadata.gz: c3b92621f6fb3c658fe029f09e61d100e765a33b
4
+ data.tar.gz: 47eaae12f02829036ca563cac8f88a0edaee137c
5
5
  SHA512:
6
- metadata.gz: 90b049ac49ef92674e435426c49a7f504d5f523f1c9e61622dc9b9b3390dbf45dfbdb8f7232cf46988912463197971b069273473d3bfebedef58ca21bf492953
7
- data.tar.gz: ac647a22e88c53d52a05e4a18058009dc12f5fbd59dfeb9660fc11436ad9f826c6bc0dee6ebc80e4cb5153e7265da517dbb9e59ac8b284e2c2c78b7fd5869aad
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
- apk_path:,
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:apk_path,
16
- type: "ANDROID_APP",
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,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devicefarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - viniciusmo