device_api-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: 0b60870bbe796b5e2159978faead21a5260f4d9f
4
- data.tar.gz: a6eff328f6783300d43e12fe42037fd3e573643d
3
+ metadata.gz: 8773e437f656fab409c1c1a23c82f0969a0db275
4
+ data.tar.gz: dc4e96ed58cf640128888db2e24bcd85a516f01c
5
5
  SHA512:
6
- metadata.gz: 519fcb4f8f592fdcc7980ad36c73c84983d70e4a17b82c21c3720b66fd9b1b568a612e451b162fec8e6791052ad09b7933c783ccf7e035a892aa8ca614aa774f
7
- data.tar.gz: 0dea576c56c809f100b62796756798cc24d1e0d5ccfeccc9bc2186384ddd6d4c03bcbe2bfef5e3b52e1c51278ffd8c3f2582435d77381849d26f375656441045
6
+ metadata.gz: 141cc0380819f0922d773f151bffaef4a511f19a433a30b6c3500d94d306c990a08ef7b09e2e80f551653c26a1371d0ef5c4bd1d28766b4df6642633e04fb6b0
7
+ data.tar.gz: 66f64edadf6e2fdff3eb33670c4bbec918bf223103fe1f130b0399e156fb6242273c0604481e7d37dd0c54f5fab0a4691607261f39bdf3a0abe56ed115515707
@@ -55,7 +55,7 @@ module DeviceAPI
55
55
 
56
56
  # Return the device type used in determining which Device Object to create
57
57
  def self.get_device_type(options)
58
- return :default if options.values.first == 'unauthorized'
58
+ return :default if ['unauthorized', 'offline', 'unknown'].include? options.values.first
59
59
  serial = options.keys.first
60
60
  state = ADB.get_state(serial)
61
61
  begin
@@ -32,7 +32,7 @@ module DeviceAPI
32
32
  @remote = options[:remote] ? true : false
33
33
  if is_remote?
34
34
  set_ip_and_port
35
- @serial = self.serial_no
35
+ @serial = self.serial_no if !["unknown", "offline"].include? @state
36
36
  end
37
37
  end
38
38
 
@@ -54,7 +54,8 @@ module DeviceAPI
54
54
  'no device' => :dead,
55
55
  'offline' => :offline,
56
56
  'unauthorized' => :unauthorized,
57
- 'no permissions' => :no_permissions
57
+ 'no permissions' => :no_permissions,
58
+ 'unknown' => :unknown
58
59
  }[@state]
59
60
  end
60
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: device_api-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.11
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Buckhurst
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-11 00:00:00.000000000 Z
14
+ date: 2016-10-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: device_api
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.5.0
82
+ rubygems_version: 2.5.1
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Android Device Management API