vagrant-host-shell 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -16,10 +16,15 @@ Add this to `Vagrantfile`:
16
16
 
17
17
  ```ruby
18
18
  config.vm.provision :host_shell do |host_shell|
19
- host_shell.inline = 'touch /tmp/hostshell-works'
19
+ host_shell.inline = 'touch /tmp/hostshell-works && echo hello from the host && hostname 1>&2'
20
20
  end
21
21
  ```
22
22
 
23
23
  Run `vagrant up` (or `vagrant provision` if machine is already running.)
24
24
 
25
- Observe that `/tmp/hostshell-works` is present on your host.
25
+ Observe that `/tmp/hostshell-works` is present on your host, and that the provisioner output:
26
+
27
+ ```
28
+ [stdout] hello from the host
29
+ [stderr] (your host's hostname)
30
+ ```
data/examples/Vagrantfile CHANGED
@@ -8,6 +8,6 @@ Vagrant.configure("2") do |config|
8
8
  config.vm.box = "precise64"
9
9
 
10
10
  config.vm.provision :host_shell do |host_shell|
11
- host_shell.inline = 'touch /tmp/hostshell-works'
11
+ host_shell.inline = 'touch /tmp/hostshell-works && echo hello from the host && hostname 1>&2'
12
12
  end
13
13
  end
@@ -4,8 +4,11 @@ module VagrantPlugins::HostShell
4
4
  Vagrant::Util::Subprocess.execute(
5
5
  '/bin/bash',
6
6
  '-c',
7
- config.inline
8
- )
7
+ config.inline,
8
+ :notify => [:stdout, :stderr]
9
+ ) do |io_name, data|
10
+ @machine.env.ui.info "[#{io_name}] #{data}"
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module HostShell
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-host-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.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-27 00:00:00.000000000 Z
12
+ date: 2013-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -75,12 +75,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
+ segments:
79
+ - 0
80
+ hash: 3091874001424134458
78
81
  required_rubygems_version: !ruby/object:Gem::Requirement
79
82
  none: false
80
83
  requirements:
81
84
  - - ! '>='
82
85
  - !ruby/object:Gem::Version
83
86
  version: '0'
87
+ segments:
88
+ - 0
89
+ hash: 3091874001424134458
84
90
  requirements: []
85
91
  rubyforge_project:
86
92
  rubygems_version: 1.8.23
@@ -88,4 +94,3 @@ signing_key:
88
94
  specification_version: 3
89
95
  summary: a vagrant provisioner to run commands on the host
90
96
  test_files: []
91
- has_rdoc: