vagrant-shell-commander 0.1.2 → 0.1.3
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/README.md +3 -3
- data/lib/vagrant-shell-commander/option_manager.rb +3 -3
- data/lib/vagrant-shell-commander/version.rb +1 -1
- data/spec/option_manager_spec.rb +2 -2
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -15,15 +15,15 @@ As usual with vagrant plugins:
|
|
15
15
|
|
16
16
|
To execute a command on all the machines:
|
17
17
|
|
18
|
-
$ vagrant sh
|
18
|
+
$ vagrant sh -c 'free'
|
19
19
|
|
20
20
|
Restrict the machine to run:
|
21
21
|
|
22
|
-
$ vagrant sh
|
22
|
+
$ vagrant sh -c 'free' machine1
|
23
23
|
|
24
24
|
Specify the working directory:
|
25
25
|
|
26
|
-
$ vagrant sh
|
26
|
+
$ vagrant sh -c 'ls -al' -d '/srv/www'
|
27
27
|
|
28
28
|
Get help:
|
29
29
|
|
@@ -9,16 +9,16 @@ module VagrantShellCommander
|
|
9
9
|
def execute
|
10
10
|
options = {}
|
11
11
|
block = lambda do |parser|
|
12
|
-
parser.banner = "Usage: vagrant sh
|
12
|
+
parser.banner = "Usage: vagrant sh -c 'COMMAND' -d [DIR] [MACHINE]"
|
13
13
|
|
14
14
|
parser.separator ''
|
15
15
|
|
16
|
-
parser.on('
|
16
|
+
parser.on('-d [DIR]', '--directory [DIR]',
|
17
17
|
'Directory to execute the command') do |dir|
|
18
18
|
options[:dir] = dir
|
19
19
|
end
|
20
20
|
|
21
|
-
parser.on("
|
21
|
+
parser.on("-c 'COMMAND'", "--command 'COMMAND'",
|
22
22
|
'Command to execute') do |cmd|
|
23
23
|
options[:cmd] = cmd
|
24
24
|
end
|
data/spec/option_manager_spec.rb
CHANGED
@@ -29,7 +29,7 @@ describe VagrantShellCommander::OptionManager do
|
|
29
29
|
it 'has a dir option' do
|
30
30
|
dir_value = 'dir'
|
31
31
|
|
32
|
-
option_parser.stub(:on).with('
|
32
|
+
option_parser.stub(:on).with('-d [DIR]',
|
33
33
|
anything,
|
34
34
|
anything).
|
35
35
|
and_yield(dir_value)
|
@@ -42,7 +42,7 @@ describe VagrantShellCommander::OptionManager do
|
|
42
42
|
it 'has a cmd option' do
|
43
43
|
cmd_value = 'cmd'
|
44
44
|
|
45
|
-
option_parser.stub(:on).with("
|
45
|
+
option_parser.stub(:on).with("-c 'COMMAND'",
|
46
46
|
anything,
|
47
47
|
anything).
|
48
48
|
and_yield(cmd_value)
|
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.
|
4
|
+
version: 0.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: 2013-07-
|
12
|
+
date: 2013-07-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|