Merge pull request #75 from tuminoid/patch-1

README.md - conditional plugin specific configs
This commit is contained in:
Teemu Matilainen 2014-01-08 04:31:38 -08:00
commit 12f7963d1f
3 changed files with 17 additions and 8 deletions

View file

@ -23,10 +23,12 @@ from within your `Vagrantfile`:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'your-box'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect = true
# If you are using VirtualBox, you might want to enable NFS for shared folders
# config.cache.enable_nfs = true
end
end
```
For more information please read the documentation available at

View file

@ -23,10 +23,12 @@ from within your `Vagrantfile`:
```ruby
Vagrant.configure("2") do |config|
config.vm.box = 'your-box'
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect = true
# If you are using VirtualBox, you might want to enable NFS for shared folders
# config.cache.enable_nfs = true
end
end
```
For more information please check out the links on the menu above.

View file

@ -3,13 +3,18 @@
## Auto detect supported cache buckets
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_:
your `Vagrantfile` you can enable automatic detection of supported cache _buckets_.
It is a good practise to wrap plugin specific configuration with `has_plugin?` checks
so the user's Vagrantfiles do not break if plugin is uninstalled or Vagrantfile shared
with people not having the plugin installed.
```ruby
Vagrant.configure("2") do |config|
# ...
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.auto_detect = true
end
end
```
This will make vagrant-cachier do its best to find out what is supported on the