rubysh 0.0.8 → 0.0.9
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/lib/rubysh/command.rb +2 -2
- data/lib/rubysh/version.rb +1 -1
- data/test/unit/lib/rubysh/command.rb +10 -0
- metadata +4 -4
data/lib/rubysh/command.rb
CHANGED
@@ -53,11 +53,11 @@ module Rubysh
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def status(runner)
|
56
|
-
state(runner)[:subprocess].status
|
56
|
+
(subprocess = state(runner)[:subprocess]) ? subprocess.status : nil
|
57
57
|
end
|
58
58
|
|
59
59
|
def pid(runner)
|
60
|
-
state(runner)[:subprocess].pid
|
60
|
+
(subprocess = state(runner)[:subprocess]) ? subprocess.pid : nil
|
61
61
|
end
|
62
62
|
|
63
63
|
def prepare!(runner)
|
data/lib/rubysh/version.rb
CHANGED
@@ -16,5 +16,15 @@ module RubyshTest::Unit
|
|
16
16
|
assert_equal('Command: ls /tmp 2>&1 /foo', command.to_s)
|
17
17
|
end
|
18
18
|
end
|
19
|
+
|
20
|
+
describe 'when calling #run_async' do
|
21
|
+
it 'raises the expected error when duplicating a named target' do
|
22
|
+
cmd = Rubysh::Command.new(['ls', '/tmp', Rubysh.>, Rubysh.>])
|
23
|
+
error = assert_raises(Rubysh::Error::BaseError) do
|
24
|
+
cmd.run_async
|
25
|
+
end
|
26
|
+
assert_match(/already has a named target/, error.message)
|
27
|
+
end
|
28
|
+
end
|
19
29
|
end
|
20
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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-
|
12
|
+
date: 2013-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
segments:
|
140
140
|
- 0
|
141
|
-
hash:
|
141
|
+
hash: 3714832706588225343
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
none: false
|
144
144
|
requirements:
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
segments:
|
149
149
|
- 0
|
150
|
-
hash:
|
150
|
+
hash: 3714832706588225343
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
153
|
rubygems_version: 1.8.23
|