vagrant-vbguest 0.6.0.pre3 → 0.6.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/Readme.md +8 -3
- data/lib/vagrant-vbguest/helpers.rb +3 -3
- data/lib/vagrant-vbguest/middleware.rb +8 -6
- data/lib/vagrant-vbguest/version.rb +1 -1
- data/locales/en.yml +6 -6
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/Readme.md
CHANGED
@@ -133,7 +133,7 @@ When everything is fine, and no update is needed, you see log like:
|
|
133
133
|
When you switched off the middleware auto update, or you have a box up and running you may also run the installer manually.
|
134
134
|
|
135
135
|
```bash
|
136
|
-
$ vagrant vbguest [vm-name] [
|
136
|
+
$ vagrant vbguest [vm-name] [--do start|rebuild|install] [--status] [-f|--force] [-b|--auto-reboot] [-R|--no-remote] [--iso VBoxGuestAdditions.iso]
|
137
137
|
```
|
138
138
|
|
139
139
|
For example, when you just updated Virtual Box on your host system, you should update the gust additions right away. However, you may need to reload the box to get the guest additions working.
|
@@ -141,14 +141,14 @@ For example, when you just updated Virtual Box on your host system, you should u
|
|
141
141
|
If you want to check the guest additions versions, without installing them, you may run:
|
142
142
|
|
143
143
|
```bash
|
144
|
-
$ vagrant vbguest --
|
144
|
+
$ vagrant vbguest --status
|
145
145
|
```
|
146
146
|
|
147
147
|
Telling you either about a version mismatch:
|
148
148
|
|
149
149
|
[default] Virtualbox Guest Additions on host: 4.1.14 - guest's version is 4.1.0
|
150
150
|
|
151
|
-
or a match:
|
151
|
+
or a match:
|
152
152
|
|
153
153
|
[default] Detected Virtualbox Guest Additions 4.1.14 --- OK
|
154
154
|
|
@@ -193,6 +193,11 @@ Installers take care of the whole installation process, that includes where to s
|
|
193
193
|
|
194
194
|
```ruby
|
195
195
|
class MyInstaller < VagrantVbguest::Installers::Linux
|
196
|
+
|
197
|
+
def self.match?(vm)
|
198
|
+
super && vm.channel.test("test -d /temp")
|
199
|
+
end
|
200
|
+
|
196
201
|
# use /temp instead of /tmp
|
197
202
|
def tmp_path
|
198
203
|
'/temp/VBoxGuestAdditions.iso'
|
@@ -4,7 +4,7 @@ module VagrantVbguest
|
|
4
4
|
@@rebooted = {}
|
5
5
|
|
6
6
|
def rebooted?(vm)
|
7
|
-
!!@@rebooted[vm.
|
7
|
+
!!@@rebooted[vm.uuid]
|
8
8
|
end
|
9
9
|
|
10
10
|
def reboot(vm, options)
|
@@ -13,9 +13,9 @@ module VagrantVbguest
|
|
13
13
|
false
|
14
14
|
elsif options[:auto_reboot]
|
15
15
|
vm.ui.warn(I18n.t("vagrant.plugins.vbguest.restart_vm"))
|
16
|
-
@@rebooted[vm.
|
16
|
+
@@rebooted[vm.uuid] = true
|
17
17
|
else
|
18
|
-
|
18
|
+
vm.ui.warn(I18n.t("vagrant.plugins.vbguest.suggest_restart", :name => vm.name))
|
19
19
|
false
|
20
20
|
end
|
21
21
|
end
|
@@ -7,20 +7,22 @@ module VagrantVbguest
|
|
7
7
|
class Middleware
|
8
8
|
include VagrantVbguest::Helpers::Rebootable
|
9
9
|
|
10
|
-
def initialize(app, env
|
10
|
+
def initialize(app, env)
|
11
11
|
@app = app
|
12
12
|
@env = env
|
13
|
-
@vm = env[:vm]
|
14
13
|
end
|
15
14
|
|
16
15
|
def call(env)
|
17
|
-
|
16
|
+
@env = env
|
17
|
+
vm = env[:vm]
|
18
|
+
options = vm.config.vbguest.to_hash
|
19
|
+
|
18
20
|
if options[:auto_update]
|
19
|
-
machine = VagrantVbguest::Machine.new
|
21
|
+
machine = VagrantVbguest::Machine.new vm, options
|
20
22
|
status = machine.state
|
21
|
-
|
23
|
+
vm.ui.send (:ok == status ? :success : :warn), I18n.t("vagrant.plugins.vbguest.status.#{status}", machine.info)
|
22
24
|
machine.run
|
23
|
-
reboot(
|
25
|
+
reboot(vm, options) if machine.reboot?
|
24
26
|
end
|
25
27
|
@app.call(env)
|
26
28
|
end
|
data/locales/en.yml
CHANGED
@@ -4,10 +4,10 @@ en:
|
|
4
4
|
vbguest:
|
5
5
|
skiped_installation: "Updating GuestAdditions skipped."
|
6
6
|
skiped_rebuild: "Rebuilding GuestAdditions skipped."
|
7
|
-
installing: "Installing Virtualbox Guest Additions %{installer_version} - guest
|
8
|
-
installing_forced: "Forcing installation of Virtualbox Guest Additions %{installer_version} - guest
|
9
|
-
rebuild: "Rebuilding Virtualbox Guest Additions %{guest_version} (Your host
|
10
|
-
rebuild_forced: "Forcing rebuilding of Virtualbox Guest Additions %{guest_version} (Your host
|
7
|
+
installing: "Installing Virtualbox Guest Additions %{installer_version} - guest version is %{guest_version}"
|
8
|
+
installing_forced: "Forcing installation of Virtualbox Guest Additions %{installer_version} - guest version is %{guest_version}"
|
9
|
+
rebuild: "Rebuilding Virtualbox Guest Additions %{guest_version} (Your host version is %{host_version})"
|
10
|
+
rebuild_forced: "Forcing rebuilding of Virtualbox Guest Additions %{guest_version} (Your host version is %{host_version})"
|
11
11
|
start_copy_iso: "Copy iso file %{from} into the box %{to}"
|
12
12
|
restart_vm: "Restarting VM to apply changes..."
|
13
13
|
suggest_restart: "Guest Additions got installed. However, they seem not be loaded correctly. Please restart the box runing `vagrant reload %{name}`"
|
@@ -21,8 +21,8 @@ en:
|
|
21
21
|
|
22
22
|
status:
|
23
23
|
clean: "No installation found."
|
24
|
-
unmatched: "GuestAdditions versions on your host (%{host_version}) and guest (%{guest_version})
|
25
|
-
not_running: "GuestAdditions seems to be installed (%{guest_version}) correctly, but
|
24
|
+
unmatched: "GuestAdditions versions on your host (%{host_version}) and guest (%{guest_version}) do not match."
|
25
|
+
not_running: "GuestAdditions seems to be installed (%{guest_version}) correctly, but not running."
|
26
26
|
ok: "GuestAdditions %{guest_version} running --- OK."
|
27
27
|
|
28
28
|
errors:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vbguest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0.
|
4
|
+
version: 0.6.0.pre4
|
5
5
|
prerelease: 6
|
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: 2013-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: micromachine
|