vagrant-shell-commander 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- vagrant-shell-commander (0.1.1)
16
+ vagrant-shell-commander (0.1.2)
17
17
 
18
18
  GEM
19
19
  remote: https://rubygems.org/
@@ -35,8 +35,9 @@ module VagrantShellCommander
35
35
 
36
36
  machine.communicate.
37
37
  execute(add_cwd_to_command(cli_options[:values][:cmd],
38
- cli_options[:values][:cwd])) do |type, data|
39
- env.ui.info("#{machine.name}:: #{data}")
38
+ cli_options[:values][:dir])) do |type, data|
39
+ env.ui.success("#{machine.name}::")
40
+ env.ui.info(data)
40
41
  end
41
42
  end
42
43
 
@@ -1,3 +1,3 @@
1
1
  module VagrantShellCommander
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -67,7 +67,7 @@ describe VagrantShellCommander::Command do
67
67
 
68
68
  context 'running machine' do
69
69
  let(:cmd) {'command'}
70
- let(:cwd) {'cwd'}
70
+ let(:dir) {'dir'}
71
71
  let(:communicate) {double(execute: true)}
72
72
 
73
73
  before(:each) do
@@ -87,14 +87,15 @@ describe VagrantShellCommander::Command do
87
87
 
88
88
  communicate.stub(:execute).and_yield('type', data)
89
89
 
90
- ui.should_receive(:info).with("#{machine_name}:: #{data}")
90
+ ui.should_receive(:success).with("#{machine_name}::")
91
+ ui.should_receive(:info).with(data)
91
92
  end
92
93
 
93
- it 'executes the command in the given cwd' do
94
+ it 'executes the command in the given dir' do
94
95
  VagrantShellCommander::OptionManager.stub_chain(:new, :execute).
95
- and_return(parser: 'parser', values: {cmd: cmd, cwd: cwd})
96
+ and_return(parser: 'parser', values: {cmd: cmd, dir: dir})
96
97
 
97
- communicate.should_receive(:execute).with("cd #{cwd} && #{cmd}")
98
+ communicate.should_receive(:execute).with("cd #{dir} && #{cmd}")
98
99
  end
99
100
 
100
101
  describe 'does nothing' do
@@ -104,12 +105,12 @@ describe VagrantShellCommander::Command do
104
105
 
105
106
  it 'an empty command' do
106
107
  VagrantShellCommander::OptionManager.stub_chain(:new, :execute).
107
- and_return(parser: 'parser', values: {cmd: '', cwd: cwd})
108
+ and_return(parser: 'parser', values: {cmd: '', dir: dir})
108
109
  end
109
110
 
110
111
  it 'non present command' do
111
112
  VagrantShellCommander::OptionManager.stub_chain(:new, :execute).
112
- and_return(parser: 'parser', values: {cwd: cwd})
113
+ and_return(parser: 'parser', values: {dir: dir})
113
114
  end
114
115
  end
115
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-shell-commander
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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: 2013-07-11 00:00:00.000000000 Z
12
+ date: 2013-07-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler