Exit_Zero 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/lib/Exit_Zero.rb +2 -0
- data/lib/Exit_Zero/version.rb +1 -1
- data/spec/tests/Exit_Zero.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -25,9 +25,12 @@ Useage
|
|
25
25
|
require "Exit_Zero"
|
26
26
|
|
27
27
|
Exit_Zero( 'uptime' )
|
28
|
+
Exit_Zero( 'ls', :input=>' /some/dir ')
|
29
|
+
Exit_Zero { system "uptime" }
|
28
30
|
|
29
31
|
# The following raises an error.
|
30
32
|
Exit_Zero( 'uptimess' )
|
33
|
+
Exit_Zero { `uptimesss` }
|
31
34
|
|
32
35
|
Run Tests
|
33
36
|
---------
|
data/lib/Exit_Zero.rb
CHANGED
@@ -14,8 +14,10 @@ def Exit_Zero *cmd, &blok
|
|
14
14
|
else
|
15
15
|
r = p = Exit_Zero::Child.new(*cmd)
|
16
16
|
msg = p.err.strip.empty? ? p.cmd : p.err
|
17
|
+
msg << " (command: #{cmd})"
|
17
18
|
end
|
18
19
|
|
20
|
+
|
19
21
|
(r = r.status) if r.respond_to?(:status)
|
20
22
|
raise(Exit_Zero::Unknown_Exit, msg.inspect) unless r.respond_to?(:exitstatus)
|
21
23
|
raise(Exit_Zero::Non_Zero, "#{r.exitstatus} => #{msg}") if r.exitstatus != 0
|
data/lib/Exit_Zero/version.rb
CHANGED
data/spec/tests/Exit_Zero.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Exit_Zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
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: 2012-04-
|
12
|
+
date: 2012-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bacon
|