From f38db9efc4c25d4fadda01678d8378224e872cac Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Fri, 18 Oct 2013 18:58:39 -0300
Subject: [PATCH 1/6] Update CHANGELOG

---
 CHANGELOG.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 082f9ed..c0d57dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ FEATURES:
 
   - Support for `apt-cacher-ng` [GH-30]
 
+BUG FIXES:
+
+  - Allow halting nonresponsive machine when plugin is installed [GH-8]
+
 ## [0.3.3](https://github.com/fgrehm/vagrant-cachier/compare/v0.3.2...v0.3.3) (Sep 11, 2013)
 
 BUG FIXES:

From e0eeb125d05019f190b0ca90d5e4e9ae682fa737 Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Fri, 18 Oct 2013 19:15:29 -0300
Subject: [PATCH 2/6] Prevent apt cacher bucket from being installed in case
 NFS is disabled

---
 lib/vagrant-cachier/bucket/apt_cacher.rb | 20 ++++++++++++--------
 locales/en.yml                           |  3 +++
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/lib/vagrant-cachier/bucket/apt_cacher.rb b/lib/vagrant-cachier/bucket/apt_cacher.rb
index de71661..4dfce7d 100644
--- a/lib/vagrant-cachier/bucket/apt_cacher.rb
+++ b/lib/vagrant-cachier/bucket/apt_cacher.rb
@@ -12,17 +12,21 @@ module VagrantPlugins
           guest   = machine.guest
 
           if guest.capability?(:apt_cacher_dir)
-            guest_path = guest.capability(:apt_cacher_dir)
+            if machine.config.cache.enable_nfs
+              guest_path = guest.capability(:apt_cacher_dir)
 
-            @env[:cache_dirs] << guest_path
+              @env[:cache_dirs] << guest_path
 
-            machine.communicate.tap do |comm|
-              comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}")
-              unless comm.test("test -L #{guest_path}")
-                comm.sudo("rm -rf #{guest_path}")
-                comm.sudo("mkdir -p `dirname #{guest_path}`")
-                comm.sudo("ln -s /tmp/vagrant-cache/#{@name} #{guest_path}")
+              machine.communicate.tap do |comm|
+                comm.execute("mkdir -p /tmp/vagrant-cache/#{@name}")
+                unless comm.test("test -L #{guest_path}")
+                  comm.sudo("rm -rf #{guest_path}")
+                  comm.sudo("mkdir -p `dirname #{guest_path}`")
+                  comm.sudo("ln -s /tmp/vagrant-cache/#{@name} #{guest_path}")
+                end
               end
+            else
+              @env[:ui].info I18n.t('vagrant_cachier.nfs_required', bucket: 'apt-cacher')
             end
           else
             @env[:ui].info I18n.t('vagrant_cachier.skipping_bucket', bucket: 'apt-cacher')
diff --git a/locales/en.yml b/locales/en.yml
index b8147ad..8badb39 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -6,6 +6,9 @@ en:
       Skipping %{bucket} cache bucket as the guest machine does not support it
     unknown_cache_scope: |-
       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.
     will_fix_machine_cache_dir: |-
       A vagrant-cachier provider specific cache dir was found under
       '%{current_path}' and it will be moved to

From 850841fe0af57a6e5b58edc9b4b2b848bc8787be Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Fri, 18 Oct 2013 19:15:53 -0300
Subject: [PATCH 3/6] Break some lines

---
 README.md                                | 5 ++++-
 lib/vagrant-cachier/bucket/apt_cacher.rb | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index fae0eed..c03b42f 100644
--- a/README.md
+++ b/README.md
@@ -234,7 +234,10 @@ Vagrant.configure("2") do |config|
 end
 ```
 
-This is useful, if you are using containers inside your VMs, e.g VirtualBox -> LXC. This would allow you to reuse packages without sharing folder inside VirtualBox. Only works with NFS-shared folders (since `vboxsf` is enforcing `vagrant`-user and `apt-cacher` is running under `apt-cacher-ng` user)
+This is useful, if you are using containers inside your VMs, e.g VirtualBox -> LXC.
+This would allow you to reuse packages without sharing folder inside VirtualBox. Only
+works with NFS-shared folders (since `vboxsf` is enforcing `vagrant`-user and `apt-cacher`
+is running under `apt-cacher-ng` user)
 
     # install apt-cacher on (Host)-VM
     $ sudo apt-get install apt-cacher-ng
diff --git a/lib/vagrant-cachier/bucket/apt_cacher.rb b/lib/vagrant-cachier/bucket/apt_cacher.rb
index 4dfce7d..3f4a194 100644
--- a/lib/vagrant-cachier/bucket/apt_cacher.rb
+++ b/lib/vagrant-cachier/bucket/apt_cacher.rb
@@ -1,4 +1,5 @@
-# Apt-Cacher NG is a caching proxy for software packages which are downloaded by Unix/Linux system distribution mechanisms from mirror servers accessible via HTTP.
+# Apt-Cacher NG is a caching proxy for software packages which are downloaded by
+# Unix/Linux system distribution mechanisms from mirror servers accessible via HTTP.
 module VagrantPlugins
   module Cachier
     class Bucket

From b769618f818622f78a61037516bef4f0cefeb1c9 Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Wed, 23 Oct 2013 22:20:28 -0200
Subject: [PATCH 4/6] Update CHANGELOG

---
 CHANGELOG.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0d57dc..1ffd811 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
 
 FEATURES:
 
+  - Support for [npm](https://npmjs.org/) [GH-51]
+  - Support for [Composer](http://getcomposer.org/) [GH-48]
   - Support for `apt-cacher-ng` [GH-30]
 
 BUG FIXES:

From 2b56bef57271faccde733591dd98002ac70d8992 Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Wed, 23 Oct 2013 22:23:19 -0200
Subject: [PATCH 5/6] readme: Add link to npm and mention composer

---
 README.md | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index c03b42f..5771af2 100644
--- a/README.md
+++ b/README.md
@@ -208,7 +208,7 @@ folder under the result of running `rvm info` as the default SSH user (usualy
 it is already installed before enabling the bucket, otherwise you won't benefit
 from this plugin.
 
-#### npm
+#### [npm](https://npmjs.org/)
 
 ```ruby
 Vagrant.configure("2") do |config|
@@ -225,6 +225,18 @@ If you use
 on the guest machine, make sure it is already installed before enabling
 the bucket, otherwise you won't benefit from this plugin.
 
+#### [Composer](http://getcomposer.org/)
+
+```ruby
+Vagrant.configure("2") do |config|
+  config.vm.box = 'some-box-with-php-installed'
+  config.cache.enable :composer
+end
+```
+
+Compatible with probably any type of linux guest distro, will cache guests'
+`$HOME/.composer` if PHP is detected.
+
 ##### APT-CACHER
 
 ```ruby

From 64c9b91cf987396427de206d1400e362880001d0 Mon Sep 17 00:00:00 2001
From: Fabio Rehm <fgrehm@gmail.com>
Date: Fri, 18 Oct 2013 19:16:21 -0300
Subject: [PATCH 6/6] v0.4.0

---
 CHANGELOG.md                   | 2 +-
 Gemfile.lock                   | 2 +-
 lib/vagrant-cachier/version.rb | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ffd811..31eb711 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-## [0.4.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.3.3...v0.4.0) (unreleased)
+## [0.4.0](https://github.com/fgrehm/vagrant-cachier/compare/v0.3.3...v0.4.0) (Oct 23, 2013)
 
 FEATURES:
 
diff --git a/Gemfile.lock b/Gemfile.lock
index ffc6056..1c5beff 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -31,7 +31,7 @@ GIT
 PATH
   remote: .
   specs:
-    vagrant-cachier (0.4.0.dev)
+    vagrant-cachier (0.4.0)
 
 GEM
   remote: https://rubygems.org/
diff --git a/lib/vagrant-cachier/version.rb b/lib/vagrant-cachier/version.rb
index 552f73d..3abef5c 100644
--- a/lib/vagrant-cachier/version.rb
+++ b/lib/vagrant-cachier/version.rb
@@ -1,5 +1,5 @@
 module VagrantPlugins
   module Cachier
-    VERSION = "0.4.0.dev"
+    VERSION = "0.4.0"
   end
 end