vagrant-shell-commander 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +7 -7
- data/LICENSE.txt +1 -1
- data/README.md +13 -5
- data/lib/vagrant-shell-commander/action.rb +29 -22
- data/lib/vagrant-shell-commander/command.rb +52 -49
- data/lib/vagrant-shell-commander/config.rb +18 -16
- data/lib/vagrant-shell-commander/option_manager.rb +30 -29
- data/lib/vagrant-shell-commander/plugin.rb +19 -17
- data/lib/vagrant-shell-commander/version.rb +4 -2
- data/spec/action_spec.rb +20 -8
- data/spec/command_spec.rb +15 -12
- data/spec/config_spec.rb +1 -1
- data/spec/option_manager_spec.rb +1 -1
- data/spec/plugin_spec.rb +5 -5
- data/spec/spec_helper.rb +0 -7
- data/vagrant-shell-commander.gemspec +1 -1
- metadata +9 -3
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/mitchellh/vagrant.git
|
3
|
-
revision:
|
3
|
+
revision: 862331fbf02deb7f3c7e00967359e3debd1f9809
|
4
4
|
specs:
|
5
|
-
vagrant (1.
|
5
|
+
vagrant (1.5.0.dev)
|
6
6
|
childprocess (~> 0.3.7)
|
7
7
|
erubis (~> 2.7.0)
|
8
8
|
i18n (~> 0.6.0)
|
9
9
|
log4r (~> 1.1.9)
|
10
10
|
net-scp (~> 1.1.0)
|
11
|
-
net-ssh (
|
11
|
+
net-ssh (>= 2.6.6, < 2.8.0)
|
12
12
|
|
13
13
|
PATH
|
14
14
|
remote: .
|
15
15
|
specs:
|
16
|
-
vagrant-shell-commander (0.
|
16
|
+
vagrant-shell-commander (0.3.0)
|
17
17
|
|
18
18
|
GEM
|
19
19
|
remote: https://rubygems.org/
|
@@ -24,13 +24,13 @@ GEM
|
|
24
24
|
ffi (~> 1.0, >= 1.0.11)
|
25
25
|
diff-lcs (1.2.4)
|
26
26
|
erubis (2.7.0)
|
27
|
-
ffi (1.9.
|
28
|
-
i18n (0.6.
|
27
|
+
ffi (1.9.3)
|
28
|
+
i18n (0.6.9)
|
29
29
|
log4r (1.1.10)
|
30
30
|
multi_json (1.7.7)
|
31
31
|
net-scp (1.1.2)
|
32
32
|
net-ssh (>= 2.6.5)
|
33
|
-
net-ssh (2.
|
33
|
+
net-ssh (2.7.0)
|
34
34
|
parallel (0.7.1)
|
35
35
|
rake (10.1.0)
|
36
36
|
reek (1.3.1)
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,7 @@ execute:
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
To execute a command on all the machines:
|
29
|
+
The command line utility is very similar to the ```vagrant ssh -c``` builtin command, but with multinode support and additional options. To execute a command on all the machines:
|
30
30
|
|
31
31
|
$ vagrant sh -c free
|
32
32
|
|
@@ -38,6 +38,14 @@ Specify the working directory (remember to quote multiword commands):
|
|
38
38
|
|
39
39
|
$ vagrant sh -c 'ls -al' -d /srv/www
|
40
40
|
|
41
|
+
Execute as specific user:
|
42
|
+
|
43
|
+
$ vagrant sh -c 'cap production deploy' -u 'deployer'
|
44
|
+
|
45
|
+
Get help:
|
46
|
+
|
47
|
+
$ vagrant sh -h
|
48
|
+
|
41
49
|
To execute a command once the machine(s) has booted, add this configuration option to the Vagrantfile:
|
42
50
|
|
43
51
|
```ruby
|
@@ -49,10 +57,6 @@ Vagrant.configure("2") do |config|
|
|
49
57
|
end
|
50
58
|
```
|
51
59
|
|
52
|
-
Get help:
|
53
|
-
|
54
|
-
$ vagrant sh -h
|
55
|
-
|
56
60
|
## Contributing
|
57
61
|
|
58
62
|
1. Fork it
|
@@ -61,3 +65,7 @@ Get help:
|
|
61
65
|
4. Commit your changes (`git commit -am 'Add some feature'`)
|
62
66
|
5. Push to the branch (`git push origin my-new-feature`)
|
63
67
|
6. Create new Pull Request
|
68
|
+
|
69
|
+
|
70
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/fgimenez/vagrant-shell-commander/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
71
|
+
|
@@ -1,26 +1,33 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# @param app [Action] Next middleware to call
|
7
|
-
# @param env [Hash] Action environment
|
8
|
-
# @return nil
|
9
|
-
#
|
10
|
-
def initialize(app, env)
|
11
|
-
@app = app
|
12
|
-
@machine = env[:machine]
|
13
|
-
end
|
1
|
+
module VagrantPlugins
|
2
|
+
module ShellCommander
|
3
|
+
# Action for shell command hooking
|
4
|
+
class Action
|
5
|
+
include Vagrant::Action::Builtin
|
14
6
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
7
|
+
# Constructor
|
8
|
+
#
|
9
|
+
# @param app [Action] Next middleware to call
|
10
|
+
# @param env [Hash] Action environment
|
11
|
+
# @return nil
|
12
|
+
#
|
13
|
+
def initialize(app, env)
|
14
|
+
@app = app
|
15
|
+
@machine = env[:machine]
|
16
|
+
end
|
17
|
+
|
18
|
+
# Call method of this middleware
|
19
|
+
#
|
20
|
+
# @param env [Hash] Action environment
|
21
|
+
# @return nil
|
22
|
+
#
|
23
|
+
def call(env)
|
24
|
+
@app.call(env)
|
25
|
+
unless env[:global_config].sh.after_share_folders.nil?
|
26
|
+
@machine.action(:ssh_run,
|
27
|
+
ssh_run_command: env[:global_config].sh.after_share_folders,
|
28
|
+
ssh_opts: {extra_args: []})
|
29
|
+
end
|
30
|
+
end
|
24
31
|
end
|
25
32
|
end
|
26
33
|
end
|
@@ -1,58 +1,61 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
# Main entry point of this command
|
7
|
-
#
|
8
|
-
def execute
|
9
|
-
cli_options = OptionManager.new.execute
|
10
|
-
argv = parse_options(cli_options[:parser])
|
1
|
+
module VagrantPlugins
|
2
|
+
module ShellCommander
|
3
|
+
# Main plugin command
|
4
|
+
class Command < Vagrant.plugin("2", "command")
|
5
|
+
attr_accessor :env
|
11
6
|
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
# Main entry point of this command
|
8
|
+
#
|
9
|
+
def execute
|
10
|
+
cli_options = OptionManager.new.execute
|
11
|
+
argv = parse_options(cli_options[:parser])
|
12
|
+
|
13
|
+
return unless argv
|
14
|
+
|
15
|
+
if [nil, ''].include? cli_options[:values][:cmd]
|
15
16
|
env.ui.info cli_options[:parser]
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
else
|
18
|
+
with_target_vms(argv) do |machine|
|
19
|
+
manage_machine(machine, cli_options)
|
20
|
+
end
|
19
21
|
end
|
22
|
+
0
|
20
23
|
end
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
# Executes actions for a given machine
|
28
|
+
#
|
29
|
+
# @param [Vagrant::Machine] subject vm
|
30
|
+
# @param [Hash] Parser (:parser key) and parsed options (:values key)
|
31
|
+
# @return nil
|
32
|
+
#
|
33
|
+
def manage_machine(machine, cli_options)
|
34
|
+
if machine.state.id != :running
|
35
|
+
env.ui.warn("Machine #{machine.name} is not running.")
|
36
|
+
return
|
37
|
+
end
|
38
|
+
|
39
|
+
env.ui.success("#{machine.name}::")
|
40
|
+
machine.action(:ssh_run,
|
41
|
+
ssh_run_command: add_options_to_command(cli_options[:values][:cmd],
|
42
|
+
cli_options[:values][:dir],
|
43
|
+
cli_options[:values][:user]),
|
44
|
+
ssh_opts: {extra_args: []})
|
36
45
|
end
|
37
46
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
# @return [String] Command with directory change if cwd is present and optional executing user
|
51
|
-
#
|
52
|
-
def add_options_to_command(cmd, cwd=nil, user=nil)
|
53
|
-
cmd = "cd #{cwd} && #{cmd}" if cwd
|
54
|
-
cmd = "sudo su - #{user} -c \"#{cmd}\"" if user
|
55
|
-
cmd
|
47
|
+
# Adds the options to the given command
|
48
|
+
#
|
49
|
+
# @param cmd [String] Shell command
|
50
|
+
# @param cwd [String] Optional working directory
|
51
|
+
# @param user [String] Optional executing user
|
52
|
+
# @return [String] Command with directory change if cwd is present and optional executing user
|
53
|
+
#
|
54
|
+
def add_options_to_command(cmd, cwd=nil, user=nil)
|
55
|
+
cmd = "cd #{cwd} && #{cmd}" if cwd
|
56
|
+
cmd = "sudo su - #{user} -c \"#{cmd}\"" if user
|
57
|
+
cmd
|
58
|
+
end
|
56
59
|
end
|
57
60
|
end
|
58
61
|
end
|
@@ -1,19 +1,21 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
module VagrantPlugins
|
2
|
+
module ShellCommander
|
3
|
+
# Configuration options
|
4
|
+
class Config < Vagrant.plugin("2", "config")
|
5
|
+
attr_accessor :after_share_folders
|
6
|
+
|
7
|
+
# Initialize override, setting config options default values
|
8
|
+
# for merging
|
9
|
+
def initialize
|
10
|
+
super
|
11
|
+
|
12
|
+
@after_share_folders = UNSET_VALUE
|
13
|
+
end
|
14
|
+
|
15
|
+
# finalize! override, unseting config options
|
16
|
+
def finalize!
|
17
|
+
@after_share_folders = nil if @after_share_folders == UNSET_VALUE
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -1,36 +1,37 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
class OptionManager
|
5
|
-
# Main parsing method
|
6
|
-
# @return [Hash] The keys are :parser for the object returned by
|
7
|
-
# OptionParser and :values for the actual option values
|
1
|
+
module VagrantPlugins
|
2
|
+
module ShellCommander
|
3
|
+
# Option parser
|
8
4
|
#
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
5
|
+
class OptionManager
|
6
|
+
# Main parsing method
|
7
|
+
# @return [Hash] The keys are :parser for the object returned by
|
8
|
+
# OptionParser and :values for the actual option values
|
9
|
+
#
|
10
|
+
def execute
|
11
|
+
options = {}
|
12
|
+
block = lambda do |parser|
|
13
|
+
parser.banner = "Usage: vagrant sh -c 'COMMAND' -d [DIR] [MACHINE]"
|
14
|
+
|
15
|
+
parser.separator ''
|
16
|
+
|
17
|
+
parser.on('-d [DIR]', '--directory [DIR]',
|
18
|
+
'Directory to execute the command') do |dir|
|
19
|
+
options[:dir] = dir
|
20
|
+
end
|
21
|
+
|
22
|
+
parser.on('-u [USER]', '--user [USER]',
|
23
|
+
'User to execute the command') do |user|
|
24
|
+
options[:user] = user
|
25
|
+
end
|
26
|
+
|
27
|
+
parser.on("-c 'COMMAND'", "--command 'COMMAND'",
|
28
|
+
'Command to execute, quotes required for multiword') do |cmd|
|
29
|
+
options[:cmd] = cmd
|
30
|
+
end
|
24
31
|
end
|
25
32
|
|
26
|
-
parser.
|
27
|
-
'Command to execute, quotes required for multiword') do |cmd|
|
28
|
-
options[:cmd] = cmd
|
29
|
-
end
|
33
|
+
{parser: OptionParser.new(&block), values: options}
|
30
34
|
end
|
31
|
-
|
32
|
-
{parser: OptionParser.new(&block), values: options}
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
36
|
-
|
@@ -1,20 +1,22 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
module VagrantPlugins
|
2
|
+
module ShellCommander
|
3
|
+
# Plugin definition
|
4
|
+
#
|
5
|
+
class Plugin < Vagrant.plugin("2")
|
6
|
+
name 'vagrant shell commander'
|
7
|
+
|
8
|
+
command 'sh' do
|
9
|
+
Command
|
10
|
+
end
|
11
|
+
|
12
|
+
config 'sh' do
|
13
|
+
Config
|
14
|
+
end
|
15
|
+
|
16
|
+
%w[up reload].each do |event|
|
17
|
+
action_hook("sh_hook_#{event}".to_sym, "machine_action_#{event}".to_sym) do |hook|
|
18
|
+
hook.append(Action)
|
19
|
+
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
data/spec/action_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe VagrantPlugins::ShellCommander::Action do
|
4
4
|
let(:app) {double(call: true)}
|
5
5
|
let(:machine) {double(action: true)}
|
6
6
|
let(:env) {double(:[] => machine)}
|
@@ -11,18 +11,30 @@ describe VagrantShellCommander::Action do
|
|
11
11
|
let(:subject) {described_class.new(app, env)}
|
12
12
|
|
13
13
|
describe "#call" do
|
14
|
-
after(:each) do
|
15
|
-
subject.call(action_env)
|
16
|
-
end
|
17
|
-
|
18
14
|
it "should call the next middleware" do
|
19
15
|
expect(app).to receive(:call).with(action_env)
|
16
|
+
|
17
|
+
subject.call(action_env)
|
20
18
|
end
|
21
19
|
|
22
|
-
|
23
|
-
|
20
|
+
describe "SSHRun call" do
|
21
|
+
it "should call SSHRun action of the current machine with the after_boot option as command" do
|
22
|
+
allow(env).to receive(:[]).with(:machine).and_return(machine)
|
23
|
+
|
24
|
+
expect(machine).to receive(:action).with(:ssh_run, ssh_run_command: cmd, ssh_opts: {:extra_args=>[]})
|
25
|
+
|
26
|
+
subject.call(action_env)
|
27
|
+
end
|
24
28
|
|
25
|
-
|
29
|
+
it "should not call SSHRun action if after_boot option is nil" do
|
30
|
+
sh = double(after_share_folders: nil)
|
31
|
+
global_config = double(sh: sh)
|
32
|
+
action_env = {global_config: global_config}
|
33
|
+
|
34
|
+
expect(machine).not_to receive(:action)
|
35
|
+
|
36
|
+
subject.call(action_env)
|
37
|
+
end
|
26
38
|
end
|
27
39
|
end
|
28
40
|
end
|
data/spec/command_spec.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe VagrantPlugins::ShellCommander::Command do
|
4
4
|
let(:subject) {described_class.new('2', 'command')}
|
5
5
|
let(:argv) {double}
|
6
6
|
let(:opts) {{parser: 'parser', values: {cmd: 'cmd'}}}
|
7
7
|
|
8
8
|
before(:each) do
|
9
|
-
|
9
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
10
10
|
and_return(opts)
|
11
11
|
|
12
12
|
subject.stub(:with_target_vms)
|
@@ -72,7 +72,7 @@ describe VagrantShellCommander::Command do
|
|
72
72
|
let(:communicate) {double(execute: true)}
|
73
73
|
|
74
74
|
before(:each) do
|
75
|
-
|
75
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
76
76
|
and_return(parser: 'parser', values: {cmd: cmd})
|
77
77
|
|
78
78
|
machine.stub_chain(:state, :id).and_return(:running)
|
@@ -81,7 +81,7 @@ describe VagrantShellCommander::Command do
|
|
81
81
|
end
|
82
82
|
|
83
83
|
it 'executes the given command' do
|
84
|
-
expect(machine).to receive(:action).with(:ssh_run, ssh_run_command: cmd)
|
84
|
+
expect(machine).to receive(:action).with(:ssh_run, ssh_run_command: cmd, ssh_opts: {:extra_args=>[]})
|
85
85
|
end
|
86
86
|
|
87
87
|
it 'shows the machine name' do
|
@@ -89,27 +89,30 @@ describe VagrantShellCommander::Command do
|
|
89
89
|
end
|
90
90
|
|
91
91
|
it 'executes the command in the given dir' do
|
92
|
-
|
92
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
93
93
|
and_return(parser: 'parser', values: {cmd: cmd, dir: dir})
|
94
94
|
|
95
95
|
expect(machine).to receive(:action).with(:ssh_run,
|
96
|
-
ssh_run_command: "cd #{dir} && #{cmd}"
|
96
|
+
ssh_run_command: "cd #{dir} && #{cmd}",
|
97
|
+
ssh_opts: {:extra_args=>[]})
|
97
98
|
end
|
98
99
|
|
99
100
|
it 'executes the command for the given user' do
|
100
|
-
|
101
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
101
102
|
and_return(parser: 'parser', values: {cmd: cmd, user: user})
|
102
103
|
|
103
104
|
expect(machine).to receive(:action).with(:ssh_run,
|
104
|
-
ssh_run_command: "sudo su - #{user} -c \"#{cmd}\""
|
105
|
+
ssh_run_command: "sudo su - #{user} -c \"#{cmd}\"",
|
106
|
+
ssh_opts: {:extra_args=>[]})
|
105
107
|
end
|
106
108
|
|
107
109
|
it 'executes the command for the given user and the given dir' do
|
108
|
-
|
110
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
109
111
|
and_return(parser: 'parser', values: {cmd: cmd, user: user, dir: dir})
|
110
112
|
|
111
113
|
expect(machine).to receive(:action).with(:ssh_run,
|
112
|
-
ssh_run_command: "sudo su - #{user} -c \"cd #{dir} && #{cmd}\""
|
114
|
+
ssh_run_command: "sudo su - #{user} -c \"cd #{dir} && #{cmd}\"",
|
115
|
+
ssh_opts: {:extra_args=>[]})
|
113
116
|
end
|
114
117
|
|
115
118
|
describe 'shows help' do
|
@@ -121,12 +124,12 @@ describe VagrantShellCommander::Command do
|
|
121
124
|
end
|
122
125
|
|
123
126
|
it 'an empty command' do
|
124
|
-
|
127
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
125
128
|
and_return(parser: parser, values: {cmd: '', dir: dir})
|
126
129
|
end
|
127
130
|
|
128
131
|
it 'non present command' do
|
129
|
-
|
132
|
+
VagrantPlugins::ShellCommander::OptionManager.stub_chain(:new, :execute).
|
130
133
|
and_return(parser: parser, values: {user: user})
|
131
134
|
end
|
132
135
|
end
|
data/spec/config_spec.rb
CHANGED
data/spec/option_manager_spec.rb
CHANGED
data/spec/plugin_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe VagrantPlugins::ShellCommander::Plugin do
|
4
4
|
it 'should have a name' do
|
5
5
|
expect(described_class.name).not_to be_nil
|
6
6
|
end
|
@@ -8,12 +8,12 @@ describe VagrantShellCommander::Plugin do
|
|
8
8
|
it "should define a command of type Command" do
|
9
9
|
default_command = described_class.command.
|
10
10
|
to_hash[:"sh"]
|
11
|
-
expect(default_command).to be(
|
11
|
+
expect(default_command).to be(VagrantPlugins::ShellCommander::Command)
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should define a config of type Config" do
|
15
15
|
default_config = described_class.components.configs[:top].to_hash[:"sh"]
|
16
|
-
expect(default_config).to be(
|
16
|
+
expect(default_config).to be(VagrantPlugins::ShellCommander::Config)
|
17
17
|
end
|
18
18
|
|
19
19
|
context 'action hooks' do
|
@@ -22,14 +22,14 @@ describe VagrantShellCommander::Plugin do
|
|
22
22
|
it "should define an action hook for machine_action_up" do
|
23
23
|
hook_proc = described_class.components.action_hooks[:machine_action_up][0]
|
24
24
|
hook = double
|
25
|
-
expect(hook).to receive(:append).with(
|
25
|
+
expect(hook).to receive(:append).with(VagrantPlugins::ShellCommander::Action)
|
26
26
|
hook_proc.call(hook)
|
27
27
|
end
|
28
28
|
|
29
29
|
it "should define an action hook for machine_action_reload" do
|
30
30
|
hook_proc = described_class.components.action_hooks[:machine_action_reload][0]
|
31
31
|
hook = double
|
32
|
-
expect(hook).to receive(:append).with(
|
32
|
+
expect(hook).to receive(:append).with(VagrantPlugins::ShellCommander::Action)
|
33
33
|
hook_proc.call(hook)
|
34
34
|
end
|
35
35
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,13 +3,6 @@ SimpleCov.start
|
|
3
3
|
|
4
4
|
require 'vagrant'
|
5
5
|
|
6
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
7
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
8
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
9
|
-
# loaded once.
|
10
|
-
#
|
11
|
-
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
12
|
-
|
13
6
|
Dir['lib/**/*.rb'].each {|f| require File.expand_path(f)}
|
14
7
|
|
15
8
|
RSpec.configure do |config|
|
@@ -5,7 +5,7 @@ require 'vagrant-shell-commander/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "vagrant-shell-commander"
|
8
|
-
spec.version =
|
8
|
+
spec.version = VagrantPlugins::ShellCommander::VERSION
|
9
9
|
spec.authors = ["Federico Gimenez Nieto"]
|
10
10
|
spec.email = ["federico.gimenez@gmail.com"]
|
11
11
|
spec.description = %q{Vagrant plugin for executing shell commands on guests machines and hooking them in the boot process}
|
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.
|
4
|
+
version: 0.3.0
|
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:
|
12
|
+
date: 2014-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -170,15 +170,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
- - ! '>='
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
|
+
segments:
|
174
|
+
- 0
|
175
|
+
hash: -2972945200673106497
|
173
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
177
|
none: false
|
175
178
|
requirements:
|
176
179
|
- - ! '>='
|
177
180
|
- !ruby/object:Gem::Version
|
178
181
|
version: '0'
|
182
|
+
segments:
|
183
|
+
- 0
|
184
|
+
hash: -2972945200673106497
|
179
185
|
requirements: []
|
180
186
|
rubyforge_project:
|
181
|
-
rubygems_version: 1.8.
|
187
|
+
rubygems_version: 1.8.24
|
182
188
|
signing_key:
|
183
189
|
specification_version: 3
|
184
190
|
summary: Some variations to shell command execution on guest(s)
|