From d823a97cb83d62574b87b6cccdc6b70e2b3daa5e Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 1 Feb 2014 04:36:00 -0200 Subject: [PATCH] When specifying NFS synced folders we need to use a symbol (fix GH-76) --- CHANGELOG.md | 2 +- README.md | 2 +- docs/index.md | 2 +- docs/usage.md | 4 ++-- lib/vagrant-cachier/config.rb | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ada6d9d..58ddd8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ BACKWARDS INCOMPATIBILITY: - Automatic handling of multiple machine scoped cache dirs from versions prior to 0.3.0 of this plugin was removed. - Support for `enable_nfs` has been deprecated and will be removed on 0.7.0, - please use `cache.synced_folder_opts = {type: 'nfs'}` instead. + please use `cache.synced_folder_opts = {type: :nfs}` instead. FEATURES: diff --git a/README.md b/README.md index 7680a82..36cda8c 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Vagrant.configure("2") do |config| # shared folders. This is also very useful for vagrant-libvirt if you want # bi-directional sync config.cache.synced_folder_opts = { - type: 'nfs', + type: :nfs, # The nolock option can be useful for an NFSv3 client that wants to avoid the # NLM sideband protocol. Without this option, apt-get might hang if it tries # to lock files needed for /var/cache/* operations. All of this can be avoided diff --git a/docs/index.md b/docs/index.md index 394541f..4ad4d1c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,7 +35,7 @@ Vagrant.configure("2") do |config| # shared folders. This is also very useful for vagrant-libvirt if you want # bi-directional sync config.cache.synced_folder_opts = { - type: 'nfs', + type: :nfs, # The nolock option can be useful for an NFSv3 client that wants to avoid the # NLM sideband protocol. Without this option, apt-get might hang if it tries # to lock files needed for /var/cache/* operations. All of this can be avoided diff --git a/docs/usage.md b/docs/usage.md index 41a27a7..ef4c047 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -6,7 +6,7 @@ This is the easiest way to get started with plugin. By adding the code below to your `Vagrantfile` you can enable automatic detection of supported cache _buckets_. It is a good practice to wrap plugin specific configuration with `has_plugin?` checks so the user's Vagrantfiles do not break if vagrant-cachier is uninstalled or -the Vagrantfile is shared with people that do not have the plugin installed. +the Vagrantfile is shared with people that don't have the plugin installed. ```ruby Vagrant.configure("2") do |config| @@ -44,7 +44,7 @@ VirtualBox and want to enable NFS for improved performance: ```ruby Vagrant.configure("2") do |config| config.cache.synced_folder_opts = { - type: 'nfs', + type: :nfs, # The nolock option can be useful for an NFSv3 client that wants to avoid the # NLM sideband protocol. Without this option, apt-get might hang if it tries # to lock files needed for /var/cache/* operations. All of this can be avoided diff --git a/lib/vagrant-cachier/config.rb b/lib/vagrant-cachier/config.rb index 1648179..6fc8ec2 100644 --- a/lib/vagrant-cachier/config.rb +++ b/lib/vagrant-cachier/config.rb @@ -21,9 +21,9 @@ module VagrantPlugins # TODO: Show warning!!! @ui.warn "The `enable_nfs` config for vagrant-cachier has been deprecated " \ "and will be removed on 0.7.0, please use " \ - "`synced_folder_opts = { type: 'nfs' }` instead.\n" + "`synced_folder_opts = { type: :nfs }` instead.\n" - @synced_folder_opts = { type: 'nfs', nfs: true } if value + @synced_folder_opts = { type: :nfs } if value end def validate(machine)