hive-runner-android 1.2.11 → 1.2.12
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: 39de89de80a97f15ff8eb190ccb9f6ef4a519ae7
|
4
|
+
data.tar.gz: 28e454b0589019ae978601afa503c9d0f1c75f89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995370f9dbca65f791054cdaab5bf32f1fd4dd9f3dc2977d89cf533b75d8f8f35822bd4f75a50f021eedd3255961b8669495be36f61c306abeb2f8393cc86954
|
7
|
+
data.tar.gz: 0a16608ea0bceb72bf65130eafba3eead28029feb8c00ffaf6e32cef7059b0b67842a7a9d802e6d0117dcd82d96533b357a010632faccc9bff58969a556c4d9f
|
@@ -10,7 +10,7 @@ module Hive
|
|
10
10
|
|
11
11
|
def units
|
12
12
|
{
|
13
|
-
:temperature => "
|
13
|
+
:temperature => "ºC",
|
14
14
|
:voltage => "mV"
|
15
15
|
}
|
16
16
|
end
|
@@ -22,6 +22,7 @@ module Hive
|
|
22
22
|
config.keys.each do |c|
|
23
23
|
raise InvalidParameterError.new("Battery Parameter should be any of #{battery_info.keys}") if !battery_info.has_key? c
|
24
24
|
begin
|
25
|
+
battery_info[c] = battery_info[c].to_i/10 if c == "temperature"
|
25
26
|
data[:"#{c}"] = { :value => battery_info[c], :unit => units[:"#{c}"] }
|
26
27
|
result = "fail" if battery_info[c].to_i > config[c].to_i
|
27
28
|
rescue => e
|
@@ -18,7 +18,7 @@ module Hive
|
|
18
18
|
operator = {:free => :>=, :used => :<= , :total => :==}
|
19
19
|
memory_status = memory
|
20
20
|
config.each do |key, value|
|
21
|
-
raise InvalidParameterError.new("Battery Parameter should be any of ':free', ':used', ':total'") if !memory_status.has_key? key
|
21
|
+
raise InvalidParameterError.new("Battery Parameter should be any of ':free', ':used', ':total'") if !memory_status.has_key? key.to_sym
|
22
22
|
data[:"#{key}_memory"] = {:value => value, :unit => "kB"}
|
23
23
|
result = "fail" if !memory_status[:"#{key}"].to_i.send(operator[:"#{key}"], value.to_i)
|
24
24
|
end
|
@@ -22,9 +22,10 @@ module Hive
|
|
22
22
|
def repair(result)
|
23
23
|
data = {}
|
24
24
|
Hive.logger.info("Rebooting the device")
|
25
|
-
begin
|
26
|
-
self.device_api.reboot
|
25
|
+
begin
|
27
26
|
data[:last_rebooted] = {:value => Time.now}
|
27
|
+
self.pass("Reboot", data)
|
28
|
+
self.device_api.reboot
|
28
29
|
rescue
|
29
30
|
Hive.logger.error("Device not found")
|
30
31
|
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.12
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: device_api-android
|