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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.6.0 (unreleased)
2
+
3
+
4
+
1
5
  ## 0.5.1 (2012-11-30)
2
6
 
3
7
  - Fix: Provisioning will not run twice when rebooted due
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] [-f|--force] [--auto-reboot] [-I|--no-install] [-R|--no-remote] [--iso VBoxGuestAdditions.iso]
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 --no-install
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.name]
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.name] = true
16
+ @@rebooted[vm.uuid] = true
17
17
  else
18
- @vm.ui.warn(I18n.t("vagrant.plugins.vbguest.suggest_restart", :name => vm.name))
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, options = {})
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
- options = @vm.config.vbguest.to_hash
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 @vm, options
21
+ machine = VagrantVbguest::Machine.new vm, options
20
22
  status = machine.state
21
- @vm.ui.send (:ok == status ? :success : :warn), I18n.t("vagrant.plugins.vbguest.status.#{status}", machine.info)
23
+ vm.ui.send (:ok == status ? :success : :warn), I18n.t("vagrant.plugins.vbguest.status.#{status}", machine.info)
22
24
  machine.run
23
- reboot(@vm, options) if machine.reboot?
25
+ reboot(vm, options) if machine.reboot?
24
26
  end
25
27
  @app.call(env)
26
28
  end
@@ -1,3 +1,3 @@
1
1
  module VagrantVbguest
2
- VERSION = "0.6.0.pre3"
2
+ VERSION = "0.6.0.pre4"
3
3
  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's version is %{guest_version}"
8
- installing_forced: "Forcing installation of Virtualbox Guest Additions %{installer_version} - guest's version is %{guest_version}"
9
- rebuild: "Rebuilding Virtualbox Guest Additions %{guest_version} (Your host's version is %{host_version})"
10
- rebuild_forced: "Forcing rebuilding of Virtualbox Guest Additions %{guest_version} (Your host's version is %{host_version})"
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}) does not match."
25
- not_running: "GuestAdditions seems to be installed (%{guest_version}) correctly, but don't run."
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.pre3
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: 2012-12-24 00:00:00.000000000 Z
12
+ date: 2013-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: micromachine