ADB 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog CHANGED
@@ -1,5 +1,9 @@
1
- === Release 0.5.1
2
- * Bug Fixes
1
+ === Release 0.5.2 / 2012-9-18
2
+ * Fixes
3
+ * Corrected install when path has space
4
+
5
+ === Release 0.5.1 / 2012-9-11
6
+ * Fixes
3
7
  * Corrected filename for stdout and stderr so it will work properly on Windows
4
8
 
5
9
  === Release 0.5 / 2012-9-9
@@ -11,7 +15,7 @@
11
15
  * Added ability to pass options to the install command
12
16
 
13
17
  === Release 0.3 / 2012-8-22
14
- * Bug Fixes
18
+ * Fixes
15
19
  * DateTime adjustment bug on Linux
16
20
  * Add wait-for-device for install on Linux
17
21
 
data/lib/ADB.rb CHANGED
@@ -94,7 +94,7 @@ module ADB
94
94
  # seconds.
95
95
  #
96
96
  def install(installable, options=nil, target={}, timeout=30)
97
- execute_adb_with(timeout, "#{which_one(target)} wait-for-device install #{options} #{installable}")
97
+ execute_adb_with_exactly(timeout, *"#{which_one(target)} wait-for-device install #{options}".split, installable)
98
98
  raise ADBError, "Could not install #{installable}" unless stdout_contains "Success"
99
99
  end
100
100
 
@@ -204,7 +204,11 @@ module ADB
204
204
 
205
205
  def execute_adb_with(timeout, arguments)
206
206
  args = arguments.split
207
- process = ChildProcess.build('adb', *args)
207
+ execute_adb_with_exactly timeout, *args
208
+ end
209
+
210
+ def execute_adb_with_exactly(timeout, *arguments)
211
+ process = ChildProcess.build('adb', *arguments)
208
212
  process.io.stdout, process.io.stderr = std_out_err
209
213
  process.start
210
214
  kill_if_longer_than(process, timeout)
@@ -1,3 +1,3 @@
1
1
  module ADB
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -133,6 +133,12 @@ describe ADB do
133
133
  ADB.install 'Test.apk'
134
134
  end
135
135
 
136
+ it "should be able to install an application with spaces in the path" do
137
+ ADB.should_receive(:last_stdout).and_return("Success")
138
+ should_call_adb_with('wait-for-device', 'install', 'Test Path With Spaces.apk')
139
+ ADB.install 'Test Path With Spaces.apk'
140
+ end
141
+
136
142
  it "should install to the only connected device" do
137
143
  ADB.should_receive(:last_stdout).and_return("Success")
138
144
  should_call_adb_with('-d', 'wait-for-device', 'install', 'Test.apk')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ADB
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-11 00:00:00.000000000 Z
13
+ date: 2012-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: childprocess
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  segments:
106
106
  - 0
107
- hash: 3370634203742753858
107
+ hash: -4396733677998798054
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  none: false
110
110
  requirements:
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: 3370634203742753858
116
+ hash: -4396733677998798054
117
117
  requirements: []
118
118
  rubyforge_project:
119
119
  rubygems_version: 1.8.24