childprocess 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,9 @@
1
1
  rvm:
2
2
  - 1.8.7
3
- - 1.9.2
4
3
  - 1.9.3
5
4
  - jruby
6
5
  - rbx
6
+ - 2.0.0
7
7
  - ruby-head
8
8
  env:
9
9
  - CHILDPROCESS_POSIX_SPAWN=true
@@ -32,6 +32,10 @@ module ChildProcess
32
32
  #
33
33
 
34
34
  def initialize(args)
35
+ unless args.all? { |e| e.kind_of?(String) }
36
+ raise ArgumentError, "all arguments must be String: #{args.inspect}"
37
+ end
38
+
35
39
  @args = args
36
40
  @started = false
37
41
  @exit_code = nil
@@ -1,3 +1,3 @@
1
1
  module ChildProcess
2
- VERSION = "0.3.8"
2
+ VERSION = "0.3.9"
3
3
  end
@@ -18,7 +18,12 @@ describe ChildProcess do
18
18
  # We could work around this by doing the PATH search ourselves, but not sure
19
19
  # it's worth it.
20
20
  it "raises ChildProcess::LaunchError if the process can't be started", :posix_spawn_on_linux => false do
21
- lambda { invalid_process.start }.should raise_error(ChildProcess::LaunchError)
21
+ expect { invalid_process.start }.to raise_error(ChildProcess::LaunchError)
22
+ end
23
+
24
+ it 'raises ArgumentError if given a non-string argument' do
25
+ expect { ChildProcess.build(nil, "unlikelytoexist") }.to raise_error(ArgumentError)
26
+ expect { ChildProcess.build("foo", 1) }.to raise_error(ArgumentError)
22
27
  end
23
28
 
24
29
  it "knows if the process crashed" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: childprocess
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-10 00:00:00.000000000 Z
12
+ date: 2013-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project: childprocess
156
- rubygems_version: 1.8.25
156
+ rubygems_version: 1.8.23
157
157
  signing_key:
158
158
  specification_version: 3
159
159
  summary: This gem aims at being a simple and reliable solution for controlling external