vagrant_bootstrap 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module VagrantBootstrap
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/vagrant_init.rb CHANGED
@@ -1,6 +1,24 @@
1
1
  require 'vagrant'
2
2
  require 'vagrant_bootstrap/commands/bootstrap'
3
3
  require 'vagrant_bootstrap/action/destroy'
4
+ require 'pathname'
5
+
6
+ #
7
+ # monkey patch in our system-wide vagrant box path, and then fail over to the
8
+ # default one
9
+ #
10
+ module Vagrant
11
+ class Environment
12
+ alias_method :original_boxes_path, :boxes_path
13
+ def boxes_path
14
+ Pathname.new(
15
+ %W[/var/lib/vagrant/boxes #{original_boxes_path}].each do |path|
16
+ break path if File.exists?(path) and File.directory?(path) and File.writable?(path)
17
+ end
18
+ )
19
+ end
20
+ end
21
+ end
4
22
 
5
23
  Vagrant.commands.register(:bootstrap) { VagrantBootstrap::Commands::Bootstrap }
6
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
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-08-29 00:00:00.000000000 Z
12
+ date: 2012-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: vagrant