device_api-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: 8773e437f656fab409c1c1a23c82f0969a0db275
4
- data.tar.gz: dc4e96ed58cf640128888db2e24bcd85a516f01c
3
+ metadata.gz: 146eee75afcdbe5ceaad41984b5ff79ffec11383
4
+ data.tar.gz: 6d8f513f44fdaf1b83e53260bd07ac76141465fc
5
5
  SHA512:
6
- metadata.gz: 141cc0380819f0922d773f151bffaef4a511f19a433a30b6c3500d94d306c990a08ef7b09e2e80f551653c26a1371d0ef5c4bd1d28766b4df6642633e04fb6b0
7
- data.tar.gz: 66f64edadf6e2fdff3eb33670c4bbec918bf223103fe1f130b0399e156fb6242273c0604481e7d37dd0c54f5fab0a4691607261f39bdf3a0abe56ed115515707
6
+ metadata.gz: cc87659c44a767ceb4f357ea4b61b591fe7923ff7ed6ca339cd54306930150df20f05568e116a0ff63f462c0c5c75b7f88400cc4f1ea5767be694c0e36f456b4
7
+ data.tar.gz: 4f8730f37ab3817f5fd4d97a294501015b4152d095976843254dbca229ba76d172c8ef398d960445fc220d93761ab2960578e0644ee5b744254b1638a6a04c5b
@@ -187,11 +187,21 @@ module DeviceAPI
187
187
  end
188
188
 
189
189
  # Reboots the specified device
190
+ # Remote devices are rebooted and disconnected from system
190
191
  # @param qualifier qualifier of device
191
192
  # @return (nil) Nil if successful, otherwise an error is raised
192
- def self.reboot(qualifier)
193
- result = execute("adb -s #{qualifier} reboot")
194
- raise ADBCommandError.new(result.stderr) if result.exit != 0
193
+ def self.reboot(qualifier, remote)
194
+ if remote
195
+ begin
196
+ system("adb -s #{qualifier} reboot &")
197
+ self.disconnect(qualifier.split(":").first)
198
+ rescue => e
199
+ raise ADBCommandError.new(e)
200
+ end
201
+ else
202
+ result = execute("adb -s #{qualifier} reboot && adb -s #{qualifier} wait-for-device shell 'while [[ $(getprop dev.bootcomplete | tr -d '\r') != 1 ] ]; do sleep 1; printf .; done'")
203
+ raise ADBCommandError.new(result.stderr) if result.exit != 0
204
+ end
195
205
  end
196
206
 
197
207
  # Runs monkey testing
@@ -281,7 +281,7 @@ module DeviceAPI
281
281
 
282
282
  #Reboots the device
283
283
  def reboot
284
- ADB.reboot(qualifier)
284
+ ADB.reboot(qualifier, is_remote?)
285
285
  end
286
286
 
287
287
  # Returns disk status
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.12
4
+ version: 1.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Buckhurst
@@ -11,34 +11,34 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-26 00:00:00.000000000 Z
14
+ date: 2016-10-31 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: device_api
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: 1.0.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.0.2
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ~>
35
35
  - !ruby/object:Gem::Version
36
36
  version: '3'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
43
  version: '3'
44
44
  description: Android implementation of DeviceAPI
@@ -48,17 +48,17 @@ extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
50
  - README.md
51
- - lib/device_api/android.rb
52
51
  - lib/device_api/android/aapt.rb
53
52
  - lib/device_api/android/adb.rb
54
- - lib/device_api/android/device.rb
55
53
  - lib/device_api/android/device/kindle.rb
56
54
  - lib/device_api/android/device/samsung.rb
55
+ - lib/device_api/android/device.rb
57
56
  - lib/device_api/android/plugins/audio.rb
58
57
  - lib/device_api/android/plugins/battery.rb
59
58
  - lib/device_api/android/plugins/disk.rb
60
59
  - lib/device_api/android/plugins/memory.rb
61
60
  - lib/device_api/android/signing.rb
61
+ - lib/device_api/android.rb
62
62
  homepage: https://github.com/bbc/device_api-android
63
63
  licenses:
64
64
  - MIT
@@ -69,17 +69,17 @@ require_paths:
69
69
  - lib
70
70
  required_ruby_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - ">="
77
+ - - '>='
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.5.1
82
+ rubygems_version: 2.0.14
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Android Device Management API