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 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
  ---------
@@ -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
@@ -1,3 +1,3 @@
1
1
  class Exit_Zero
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
@@ -10,7 +10,7 @@ describe "Exit_Zero *cmd" do
10
10
  lambda {
11
11
  Exit_Zero 'uptimes'
12
12
  }.should.raise(Exit_Zero::Non_Zero)
13
- .message.should == %!127 => uptimes!
13
+ .message.should.match %r!127 => uptimes!
14
14
  end
15
15
 
16
16
  it "returns a Exit_Zero::Child" do
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.2
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-10 00:00:00.000000000 Z
12
+ date: 2012-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon