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 +4 -4
- data/Gemfile.lock +5 -3
- data/exe/optimus-runner +11 -0
- data/lib/optimus-runner/DeviceDetails.rb +17 -10
- data/lib/optimus-runner/version.rb +1 -1
- data/optimus-runner.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51bfb8c453718bc033a4bf204817e11b899383af5dd15ec0fb1fb63ba012b03
|
4
|
+
data.tar.gz: 2f4af29f668f059192b797d1ef7324fef2af7e9c2124d6aaf9cbd50ebd77543f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58769b289508f5f0477d40daab8e8c92e09c32775e69241f712ea114416feefb5e97764e523358bc884ddd853aa5637321a5cd366bd5b192330712c446cea366
|
7
|
+
data.tar.gz: 35c0db5d5470a2887e5b8f1159e8b53f9a9d8ab1953262bb91d7698d389964c6789a847b5f84910d3838abff040f7738481aa26a8a1a1c4766224792fcabfc66
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
optimus-runner (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.
|
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.
|
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)
|
data/exe/optimus-runner
CHANGED
@@ -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
|
-
|
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
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
data/optimus-runner.gemspec
CHANGED
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.
|
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
|