cap-util 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,8 +19,8 @@ module CapUtil
19
19
  @struct.respond_to?(method) ? true : super
20
20
  end
21
21
 
22
- def run(*args)
23
- @cmds_run << args
22
+ def run(cmd, *args)
23
+ @cmds_run << cmd
24
24
  end
25
25
 
26
26
  def fetch(var_name)
@@ -1,3 +1,3 @@
1
1
  module CapUtil
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -15,14 +15,11 @@ module CapUtil
15
15
  should have_imeths :run, :fetch, :role
16
16
  should have_readers :roles, :cmds_run
17
17
 
18
- should "store off args to run cmd calls" do
18
+ should "store off cmds that have been run" do
19
19
  assert_empty subject.cmds_run
20
20
 
21
- subject.run(:a, 1)
22
- assert_equal [:a, 1], subject.cmds_run.last
23
-
24
- subject.run
25
- assert_equal [], subject.cmds_run.last
21
+ subject.run('a_cmd', 1)
22
+ assert_equal 'a_cmd', subject.cmds_run.last
26
23
  end
27
24
 
28
25
  end
@@ -49,7 +49,7 @@ module CapUtil
49
49
  exp_cmd = "cd /a/current/path && bundle exec rake a:task:to:run"
50
50
  subject.run
51
51
 
52
- assert_equal [exp_cmd], @fake_cap.cmds_run.last
52
+ assert_equal exp_cmd, @fake_cap.cmds_run.last
53
53
  end
54
54
 
55
55
  end
@@ -22,7 +22,7 @@ module CapUtil
22
22
  subject.rm_rf 'cached-copy'
23
23
  exp_cmd = "rm -rf #{File.expand_path("tmp/shared/cached-copy")}"
24
24
 
25
- assert_equal [exp_cmd], @fake_cap.cmds_run.last
25
+ assert_equal exp_cmd, @fake_cap.cmds_run.last
26
26
  end
27
27
 
28
28
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cap-util
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kelly Redding
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-12-13 00:00:00 Z
19
+ date: 2013-01-15 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: assert