hive-runner-ios 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hive/worker/ios.rb +9 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9217a775fece75da70489ef669479a8966b3d98
4
- data.tar.gz: dd897a7898c1ca344e458ac5e03956ff7d758461
3
+ metadata.gz: 7554d4dcd84483385970e99d004127aeb3bf0244
4
+ data.tar.gz: 5db525a3032d331dd8d1cd89ea27bb2b70aa985b
5
5
  SHA512:
6
- metadata.gz: 37018163ec68ba7c02b108f64e1fbbee5fcd4dbb3eb85b4c0a1b0f274b5e3adcf6762548343b96e46d127d8bb08b31d240395a787bcc17c656c708712262d3ed
7
- data.tar.gz: 8f0f4d36c91f07e42040cd84dc602f4af6edabf5ed08283369d25d8ef7d81a41439cdbd44e86fe129f15fd899e6d46894ccc684d28ef0a5d7df8beeeae99e632
6
+ metadata.gz: ce173b6fe0babfcda77d75d205a6a31de72ef436564749340bec9c49c6099e390fe76dc2d13162b0b9d728fd12a263995842af76cf478f7138aa0aff4df2401e
7
+ data.tar.gz: 5ccf13cd04382ef562565c01e140daf44ebf71e3914b212f70f6c3d49146a96214d3a910c77ff3dbe110d16f6998f3cbc2555882a88409e08b55d07afa45376b
@@ -59,6 +59,8 @@ module Hive
59
59
  def pre_script(job, file_system, script)
60
60
  Hive.devicedb('Device').poll(@options['id'], 'busy')
61
61
 
62
+ device = DeviceAPI::IOS.device(self.device['serial'])
63
+
62
64
  if job.build
63
65
  FileUtils.mkdir(file_system.home_path + '/build')
64
66
  app_path = file_system.home_path + '/build/' + 'build.ipa'
@@ -66,7 +68,7 @@ module Hive
66
68
  file_system.fetch_build(job.build, app_path)
67
69
  app_info = DeviceAPI::IOS::Plistutil.get_bundle_id_from_app(app_path)
68
70
  app_bundle = app_info['CFBundleIdentifier']
69
- DeviceAPI::IOS.device(self.device['serial']).install(app_path)
71
+ device.install(app_path)
70
72
  script.set_env 'BUNDLE_ID', app_bundle
71
73
  else
72
74
  alter_project(file_system.home_path + '/test_code/code/')
@@ -87,7 +89,12 @@ module Hive
87
89
  script.set_env 'DEVICE_TARGET', self.device['serial']
88
90
 
89
91
  # Required for Calabash testing
90
- script.set_env 'DEVICE_ENDPOINT', "http://#{ip_address}:37265"
92
+ script.set_env 'DEVICE_ENDPOINT', "http://#{ip_address}:37265" unless ip_address.nil?
93
+
94
+ # Required for Appium testing
95
+ script.set_env 'DEVICE_NAME', device.name
96
+ script.set_env 'PLATFORM_NAME', 'iOS'
97
+ script.set_env 'PLATFORM_VERSION', device.version
91
98
 
92
99
  "#{self.device['serial']} #{@worker_ports.ports['Appium']} #{app_path} #{file_system.results_path}"
93
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hive-runner-ios
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Wilson