tango 0.1.0 → 0.1.2
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 +1 -1
- data/bin/tango +6 -3
- data/lib/tango/contexts/helpers.rb +4 -0
- data/lib/tango/contexts.rb +1 -0
- data/lib/tango/runner.rb +0 -2
- data/lib/tango/usage.rb +10 -0
- data/lib/tango/version.rb +1 -1
- data/lib/tango.rb +2 -0
- data/spec/runner_spec.rb +6 -6
- data/spec/shell_spec.rb +5 -0
- metadata +6 -7
data/Gemfile.lock
CHANGED
data/bin/tango
CHANGED
@@ -3,8 +3,11 @@
|
|
3
3
|
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
4
4
|
require 'tango'
|
5
5
|
|
6
|
-
|
6
|
+
if ARGV[0].nil?
|
7
|
+
Tango.print_usage
|
8
|
+
exit
|
9
|
+
end
|
7
10
|
|
8
|
-
|
11
|
+
load "./tango.rb"
|
9
12
|
|
10
|
-
|
13
|
+
eval ARGV[0]
|
data/lib/tango/contexts.rb
CHANGED
data/lib/tango/runner.rb
CHANGED
data/lib/tango/usage.rb
ADDED
data/lib/tango/version.rb
CHANGED
data/lib/tango.rb
CHANGED
data/spec/runner_spec.rb
CHANGED
@@ -24,7 +24,7 @@ module Tango
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
runner.new.
|
27
|
+
runner.new.send "example step"
|
28
28
|
step_run.should be_true
|
29
29
|
end
|
30
30
|
|
@@ -33,7 +33,7 @@ module Tango
|
|
33
33
|
|
34
34
|
runner = Class.new(StubbedRunner) do
|
35
35
|
step "outer step" do
|
36
|
-
|
36
|
+
send "inner step"
|
37
37
|
end
|
38
38
|
|
39
39
|
step "inner step" do
|
@@ -41,7 +41,7 @@ module Tango
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
runner.new.
|
44
|
+
runner.new.send "outer step"
|
45
45
|
inner_step_run.should be_true
|
46
46
|
end
|
47
47
|
|
@@ -54,13 +54,13 @@ module Tango
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
runner.new.
|
57
|
+
runner.new.send "example step", 1, 2
|
58
58
|
end
|
59
59
|
|
60
60
|
it "should pass arguments when running other steps" do
|
61
61
|
runner = Class.new(StubbedRunner) do
|
62
62
|
step "outer step" do
|
63
|
-
|
63
|
+
send "inner step", 1, 2
|
64
64
|
end
|
65
65
|
|
66
66
|
step "inner step" do |a, b|
|
@@ -69,7 +69,7 @@ module Tango
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
runner.new.
|
72
|
+
runner.new.send "outer step"
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
data/spec/shell_spec.rb
CHANGED
@@ -31,6 +31,11 @@ module Tango
|
|
31
31
|
result.output.should == "Hello, world!\n"
|
32
32
|
end
|
33
33
|
|
34
|
+
it "catches stderr too" do
|
35
|
+
result = @stub_class.new.shell("echo 'Hello, world!' 1>&2")
|
36
|
+
result.output.should == "Hello, world!\n"
|
37
|
+
end
|
38
|
+
|
34
39
|
it "should echo the command and its output" do
|
35
40
|
@stub = @stub_class.new
|
36
41
|
@stub.should_receive(:log).with("% echo Hello, world!\n\n").once.ordered
|
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:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pete Yandell
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-06-30 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: rspec
|
@@ -64,6 +63,7 @@ files:
|
|
64
63
|
- lib/tango/met_and_meet.rb
|
65
64
|
- lib/tango/runner.rb
|
66
65
|
- lib/tango/shell.rb
|
66
|
+
- lib/tango/usage.rb
|
67
67
|
- lib/tango/version.rb
|
68
68
|
- spec/config_files_spec.rb
|
69
69
|
- spec/contexts/chain_spec.rb
|
@@ -75,7 +75,6 @@ files:
|
|
75
75
|
- spec/shell_spec.rb
|
76
76
|
- tango.gemspec
|
77
77
|
- tmp/.gitignore
|
78
|
-
has_rdoc: true
|
79
78
|
homepage: ""
|
80
79
|
licenses: []
|
81
80
|
|
@@ -105,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
104
|
requirements: []
|
106
105
|
|
107
106
|
rubyforge_project: tango
|
108
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.8.5
|
109
108
|
signing_key:
|
110
109
|
specification_version: 3
|
111
110
|
summary: Experiment in deployment tools.
|