hive-runner-android 1.2.12 → 1.2.13
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 574e6cc55a35a36a03cc1b50a132fdb6256721eb
|
4
|
+
data.tar.gz: 4665af1ca9034370704aec0a6f10f8118785cfdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47986ab630f8103e587c377ad7fc7baf4808e5a7ca11fe31625c9d54a407bfef5496db0a112e0e6d80a195ccc1ffbcdad1f47bceaf90b1e5563709156264efcb
|
7
|
+
data.tar.gz: 535aa17aecf859bfa8e78a5a5e674126dcd7afa8572a0aa1fa56c6fff96c0541ba3ecc949d8af798113db1e2845d0d86b077c30aba869e1be89c5ef222fe0182
|
@@ -19,7 +19,7 @@ module Hive
|
|
19
19
|
memory_status = memory
|
20
20
|
config.each do |key, value|
|
21
21
|
raise InvalidParameterError.new("Battery Parameter should be any of ':free', ':used', ':total'") if !memory_status.has_key? key.to_sym
|
22
|
-
data[:"#{key}_memory"] = {:value =>
|
22
|
+
data[:"#{key}_memory"] = {:value => memory_status[:"#{key}"], :unit => "kB"}
|
23
23
|
result = "fail" if !memory_status[:"#{key}"].to_i.send(operator[:"#{key}"], value.to_i)
|
24
24
|
end
|
25
25
|
|
@@ -32,7 +32,7 @@ module Hive
|
|
32
32
|
|
33
33
|
def repair(result)
|
34
34
|
# Add repair for memory
|
35
|
-
self.fail("Cannot repair memory"
|
35
|
+
self.fail("Cannot repair memory")
|
36
36
|
end
|
37
37
|
|
38
38
|
end
|
@@ -9,7 +9,7 @@ module Hive
|
|
9
9
|
@device_api.screenshot(filename: screenshot_file)
|
10
10
|
hive_device = Hive.hive_mind.device_details['connected_devices'].select { |d| d['serial'] == @device_api.serial }.first
|
11
11
|
Hive.hive_mind.send_screenshot( { device_id: hive_device[:id], screenshot: screenshot_file } ) unless hive_device.nil?
|
12
|
-
self.pass('Screenshot captured'
|
12
|
+
self.pass('Screenshot captured')
|
13
13
|
end
|
14
14
|
|
15
15
|
def repair(result)
|
@@ -19,4 +19,4 @@ module Hive
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
end
|
22
|
+
end
|
@@ -10,44 +10,38 @@ module Hive
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def diagnose
|
13
|
-
result =
|
13
|
+
result = "pass"
|
14
14
|
wifi_status = wifi
|
15
|
+
data = {}
|
16
|
+
data[:access_point] = {:value => "#{wifi_status[:"#{key}"]}"}
|
15
17
|
|
16
18
|
if wifi_status[:access_point].capitalize == "Xxxx"
|
17
|
-
result = self.pass("Kindle returns wifi 'xxxx'",
|
19
|
+
result = self.pass("Kindle returns wifi 'xxxx'", data)
|
18
20
|
return result
|
19
21
|
end
|
20
22
|
|
21
23
|
config.each do |key, value|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
rescue
|
31
|
-
Hive.logger.error("Invalid Parameter for Wifi #{key}")
|
32
|
-
raise InvalidParameter.new("Invalid Wifi Parameter for Wifi: #{key}") if !result
|
33
|
-
end
|
34
|
-
else
|
35
|
-
result = self.pass("No parameter specified", "wifi")
|
36
|
-
end
|
24
|
+
result = "fail" if wifi_status[:"#{key}"].capitalize != value.capitalize
|
25
|
+
end
|
26
|
+
|
27
|
+
if result == "pass"
|
28
|
+
self.pass("#{key.capitalize} : #{wifi_status[:"#{key}"]}", data )
|
29
|
+
else
|
30
|
+
self.fail("#{key.capitalize} : #{wifi_status[:"#{key}"]}", data )
|
37
31
|
end
|
38
|
-
result
|
39
32
|
end
|
40
33
|
|
41
34
|
def repair(result)
|
42
|
-
Hive.logger.info("
|
43
|
-
options = {:apk => '/path/to/apk/to/toggle/wifi', :package => '/pkg/name/ex: com.wifi.togglewifi'}
|
35
|
+
Hive.logger.info("Start wifi setting and select first access point")
|
44
36
|
begin
|
45
|
-
self.device_api.
|
46
|
-
|
47
|
-
|
48
|
-
|
37
|
+
self.device_api.intent("start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings")
|
38
|
+
# Select first access point available in list
|
39
|
+
system("adb -s #{@serial} shell input keyevent 20")
|
40
|
+
system("adb -s #{@serial} shell input keyevent 23")
|
41
|
+
# Press home button
|
42
|
+
system("adb -s #{@serial} shell input keyevent 3")
|
49
43
|
rescue
|
50
|
-
Hive.logger.error("Unable to
|
44
|
+
Hive.logger.error("Unable to resolve wifi issue")
|
51
45
|
end
|
52
46
|
diagnose
|
53
47
|
end
|
@@ -55,4 +49,4 @@ module Hive
|
|
55
49
|
end
|
56
50
|
end
|
57
51
|
end
|
58
|
-
end
|
52
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hive-runner-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: device_api-android
|