optimus-runner 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d939e4827c75b5b0db3bf358f90f68d213f889d023b7efc82f485e9016f46777
4
- data.tar.gz: 78371bb76052b9a9412b08b21cf3ecdfcea7ae246ca128ffae35fb186ff382a6
3
+ metadata.gz: e51bfb8c453718bc033a4bf204817e11b899383af5dd15ec0fb1fb63ba012b03
4
+ data.tar.gz: 2f4af29f668f059192b797d1ef7324fef2af7e9c2124d6aaf9cbd50ebd77543f
5
5
  SHA512:
6
- metadata.gz: 8bf2d1fd6e3e56ab3d0d7bffb7367019fe9d5c9dc94cdc0d9044968065a0d1c663212f62f142e01e10e1c60d6ad4e97d0bd1846e6d01ad82b12b68db81769dc2
7
- data.tar.gz: d5cab378ed06e833d727332a46585d6f2809e5ce55f9993a8f03995040ecaf1c7fc89cbfe0dbc91e84947a45701c1dec8ff8eea6b83648c00de395d2a6c54e5a
6
+ metadata.gz: 58769b289508f5f0477d40daab8e8c92e09c32775e69241f712ea114416feefb5e97764e523358bc884ddd853aa5637321a5cd366bd5b192330712c446cea366
7
+ data.tar.gz: 35c0db5d5470a2887e5b8f1159e8b53f9a9d8ab1953262bb91d7698d389964c6789a847b5f84910d3838abff040f7738481aa26a8a1a1c4766224792fcabfc66
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- optimus-runner (1.1.1)
4
+ optimus-runner (1.1.2)
5
5
  aasm (~> 5.0)
6
6
  daemons (~> 1.3)
7
7
  dotenv (~> 2.1, >= 2.1.1)
8
8
  httparty (~> 0.16.3)
9
+ nenv (~> 0.3.0)
9
10
  open4 (~> 1.3)
10
11
  os (~> 1.0, >= 1.0.1)
11
12
  random-port (~> 0.3.1)
@@ -14,13 +15,13 @@ PATH
14
15
  GEM
15
16
  remote: https://rubygems.org/
16
17
  specs:
17
- aasm (5.0.6)
18
+ aasm (5.0.8)
18
19
  concurrent-ruby (~> 1.0)
19
20
  concurrent-ruby (1.1.6)
20
21
  daemons (1.3.1)
21
22
  diff-lcs (1.3)
22
23
  dotenv (2.7.5)
23
- et-orbi (1.2.2)
24
+ et-orbi (1.2.3)
24
25
  tzinfo
25
26
  fugit (1.3.3)
26
27
  et-orbi (~> 1.1, >= 1.1.8)
@@ -32,6 +33,7 @@ GEM
32
33
  mime-types-data (~> 3.2015)
33
34
  mime-types-data (3.2019.1009)
34
35
  multi_xml (0.6.0)
36
+ nenv (0.3.0)
35
37
  open4 (1.3.4)
36
38
  os (1.0.1)
37
39
  raabro (1.1.6)
@@ -18,10 +18,21 @@ options = {
18
18
  :log_dir => "#{File.expand_path('~')}/optimus_runner/logs",
19
19
  :logfilename => 'optimus-runner.log'
20
20
  }
21
+
22
+ ENV["ANDROID"]="true"
23
+ ENV["IOS"]="true"
21
24
  optparser = OptionParser.new do |parser|
22
25
  parser.on('-e=FILE','--env=FILE', "Optimus Cloud Environment file") do |file|
23
26
  Dotenv.load(file)
24
27
  end
28
+ parser.on('-a','--android-only',"Create sessions for android") do
29
+ ENV["IOS"]="false"
30
+ p "running android"
31
+ end
32
+ parser.on('-i','--ios-only',"Create sessions for iOS") do
33
+ ENV["ANDROID"]="false"
34
+ p "running ios"
35
+ end
25
36
  end
26
37
  optparser.parse!(ARGV)
27
38
  Daemons.run(File.join(File.dirname(__FILE__),'optimus_runner_manager'), options)
@@ -1,6 +1,7 @@
1
1
  require 'HTTParty'
2
2
  require 'optimus-runner/clients/mdb_client'
3
3
  require 'os'
4
+ require 'nenv'
4
5
 
5
6
  class DeviceDetails
6
7
 
@@ -17,12 +18,16 @@ class DeviceDetails
17
18
  end
18
19
 
19
20
  def process_android_devices
20
- devices = `adb devices`
21
+ if(Nenv.android?)
22
+ devices = `adb devices`
23
+ else
24
+ devices = []
25
+ end
21
26
  return MDBClient.new.format_android_devices devices
22
27
  end
23
28
 
24
29
  def process_ios_devices
25
- if(OS.mac?)
30
+ if(OS.mac? && Nenv.ios?)
26
31
  devices = `instruments -s devices | grep 'iPhone'`
27
32
  return [] if devices.length == 0
28
33
  return MDBClient.new.format_ios_devices devices
@@ -32,14 +37,16 @@ class DeviceDetails
32
37
 
33
38
  def find_android_devices(device_names)
34
39
  device_details = []
35
- device_names.each do |a|
36
- puts "adb -s #{a['udid']} shell getprop ro.product.model"
37
- device_model = `adb -s #{a['udid']} shell getprop ro.product.model`
38
- device_os_version = `adb -s #{a['udid']} shell getprop ro.build.version.release`
39
- a['deviceName'] = device_model.to_s.rstrip
40
- a['platformVersion'] = device_os_version.to_s.rstrip
41
- a["platform"] = "ANDROID"
42
- device_details.push(a)
40
+ if(Nenv.android?)
41
+ device_names.each do |a|
42
+ puts "adb -s #{a['udid']} shell getprop ro.product.model"
43
+ device_model = `adb -s #{a['udid']} shell getprop ro.product.model`
44
+ device_os_version = `adb -s #{a['udid']} shell getprop ro.build.version.release`
45
+ a['deviceName'] = device_model.to_s.rstrip
46
+ a['platformVersion'] = device_os_version.to_s.rstrip
47
+ a["platform"] = "ANDROID"
48
+ device_details.push(a)
49
+ end
43
50
  end
44
51
  device_details
45
52
  end
@@ -1,3 +1,3 @@
1
1
  module Gandalf
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
@@ -31,4 +31,5 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'aasm', '~> 5.0'
32
32
  spec.add_dependency 'rufus-scheduler', '~> 3.2'
33
33
  spec.add_dependency 'os', '~> 1.0', '>= 1.0.1'
34
+ spec.add_dependency 'nenv', '~> 0.3.0'
34
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimus-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - KrishnanandB
@@ -182,6 +182,20 @@ dependencies:
182
182
  - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: 1.0.1
185
+ - !ruby/object:Gem::Dependency
186
+ name: nenv
187
+ requirement: !ruby/object:Gem::Requirement
188
+ requirements:
189
+ - - "~>"
190
+ - !ruby/object:Gem::Version
191
+ version: 0.3.0
192
+ type: :runtime
193
+ prerelease: false
194
+ version_requirements: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - "~>"
197
+ - !ruby/object:Gem::Version
198
+ version: 0.3.0
185
199
  description: ''
186
200
  email:
187
201
  - krisnanandb@gmail.com