vagrant-shell-commander 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- vagrant-shell-commander (0.1.2)
16
+ vagrant-shell-commander (0.1.3)
17
17
 
18
18
  GEM
19
19
  remote: https://rubygems.org/
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 --cmd 'free'
18
+ $ vagrant sh -c 'free'
19
19
 
20
20
  Restrict the machine to run:
21
21
 
22
- $ vagrant sh --cmd 'free' machine1
22
+ $ vagrant sh -c 'free' machine1
23
23
 
24
24
  Specify the working directory:
25
25
 
26
- $ vagrant sh --cmd 'ls -al' --dir '/srv/www'
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 --cmd 'COMMAND' --dir [DIR] [MACHINE]"
12
+ parser.banner = "Usage: vagrant sh -c 'COMMAND' -d [DIR] [MACHINE]"
13
13
 
14
14
  parser.separator ''
15
15
 
16
- parser.on('--dir [DIR]', '--change-working-dir [DIR]',
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("--cmd 'COMMAND'", "--command 'COMMAND'",
21
+ parser.on("-c 'COMMAND'", "--command 'COMMAND'",
22
22
  'Command to execute') do |cmd|
23
23
  options[:cmd] = cmd
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantShellCommander
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -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('--dir [DIR]',
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("--cmd 'COMMAND'",
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.2
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-13 00:00:00.000000000 Z
12
+ date: 2013-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler