From 20373aa0d7295fb1303a4bf1aba0b30fa01bd84d Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 6 Apr 2014 21:34:58 -0300 Subject: [PATCH] Fix GH-96 --- CHANGELOG.md | 5 +++++ lib/vagrant-cachier/bucket/apt_cacher.rb | 3 ++- locales/en.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fca22c5..c010206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,13 @@ FEATURES: - ["Generic" cache bucket](http://fgrehm.viewdocs.io/vagrant-cachier/buckets/generic) [[GH-94]] / [[GH-4]]. +BUG FIXES: + + - Fix apt-cacher bucket undefined method error [[GH-96]] + [GH-94]: https://github.com/fgrehm/vagrant-cachier/pull/94 [GH-4]: https://github.com/fgrehm/vagrant-cachier/issues/4 +[GH-96]: https://github.com/fgrehm/vagrant-cachier/issues/96 ## [0.6.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.5.1...v0.6.0) (Feb 26, 2014) diff --git a/lib/vagrant-cachier/bucket/apt_cacher.rb b/lib/vagrant-cachier/bucket/apt_cacher.rb index 5e81405..65abe85 100644 --- a/lib/vagrant-cachier/bucket/apt_cacher.rb +++ b/lib/vagrant-cachier/bucket/apt_cacher.rb @@ -11,7 +11,8 @@ module VagrantPlugins def install if guest.capability?(:apt_cacher_dir) if guest_path = guest.capability(:apt_cacher_dir) - if machine.config.cache.enable_nfs + synced_folder_type = machine.config.cache.synced_folder_opts[:type] + if synced_folder_type && synced_folder_type.to_sym == :nfs symlink(guest_path) else @env[:ui].info I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher') diff --git a/locales/en.yml b/locales/en.yml index c67c616..3bca3be 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -8,7 +8,7 @@ en: Unknown cache scope '%{cache_scope}' (allowed scopes: %{allowed}) nfs_required: |- The '%{bucket}' cache bucket requires NFS to be enabled, please add - `config.cache.enable_nfs = true` to your Vagrantfile. + `config.cache.synced_folder_opts = {type: :nfs}` to your Vagrantfile. will_fix_machine_cache_dir: |- A vagrant-cachier provider specific cache dir was found under '%{current_path}' and it will be moved to