tango 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/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tango (0.0.8)
4
+ tango (0.0.9)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/lib/tango/shell.rb CHANGED
@@ -24,6 +24,12 @@ module Tango
24
24
  )
25
25
  end
26
26
 
27
+ def shell!(command, *args)
28
+ result = shell(command, *args)
29
+ raise "Shell command failed with status #{result.status}" if result.failed?
30
+ result
31
+ end
32
+
27
33
  private
28
34
 
29
35
  def fork_and_exec(command, *args)
data/lib/tango/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tango
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -81,8 +81,8 @@ module Tango
81
81
  end
82
82
 
83
83
  def b
84
- met? { @b_done }
85
- meet { @b_done = true }
84
+ met? { true }
85
+ meet { }
86
86
  end
87
87
  end
88
88
 
data/spec/shell_spec.rb CHANGED
@@ -48,5 +48,13 @@ module Tango
48
48
  @stub.shell("echo", "Hello, world!", :echo => false).output.should == "Hello, world!\n"
49
49
  end
50
50
 
51
+ context "shell! method" do
52
+ it "should raise an exception if the command fails" do
53
+ expect {
54
+ @stub_class.new.shell!("test", "a", "=", "b")
55
+ }.should raise_error("Shell command failed with status 1")
56
+ end
57
+ end
58
+
51
59
  end
52
60
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tango
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pete Yandell