From 4c8fe42d70c31312ec3d954df58af8b1a59e6b02 Mon Sep 17 00:00:00 2001 From: Philip Wrenn Date: Fri, 31 Oct 2014 13:20:23 -0400 Subject: [PATCH 1/2] Ignore possible version directories that are hidden folders, i.e. dot folders. --- lib/vagrant/box_collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 925f62a87..74c34e84a 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -224,7 +224,7 @@ module Vagrant # Otherwise, traverse the subdirectories and see what versions # we have. child.children(true).each do |versiondir| - next if !versiondir.directory? + next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' version = versiondir.basename.to_s @@ -269,7 +269,7 @@ module Vagrant end versions = box_directory.children(true).map do |versiondir| - next if !versiondir.directory? + next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' version = versiondir.basename.to_s Gem::Version.new(version) end.compact From 345935887f01ce5c39e72d4d83693d81d5a8bd37 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Tue, 2 Jun 2015 17:10:13 -0400 Subject: [PATCH 2/2] Style fixes --- lib/vagrant/box_collection.rb | 7 +++++-- vagrant.gemspec | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 74c34e84a..a7599f7c2 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -224,7 +224,8 @@ module Vagrant # Otherwise, traverse the subdirectories and see what versions # we have. child.children(true).each do |versiondir| - next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' + next if !versiondir.directory? + next if versiondir.basename.to_s.start_with?(".") version = versiondir.basename.to_s @@ -269,7 +270,9 @@ module Vagrant end versions = box_directory.children(true).map do |versiondir| - next if !versiondir.directory? || versiondir.basename.to_s[0] == '.' + next if !versiondir.directory? + next if versiondir.basename.to_s.start_with?(".") + version = versiondir.basename.to_s Gem::Version.new(version) end.compact diff --git a/vagrant.gemspec b/vagrant.gemspec index 00b5ebb4c..a23a42874 100644 --- a/vagrant.gemspec +++ b/vagrant.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = ">= 1.3.6" s.rubyforge_project = "vagrant" - s.add_dependency "bundler", ">= 1.5.2", "< 1.8.0" + s.add_dependency "bundler", ">= 1.5.2"#, "< 1.8.0" s.add_dependency "childprocess", "~> 0.5.0" s.add_dependency "erubis", "~> 2.7.0" s.add_dependency "i18n", ">= 0.6.0", "<= 0.8.0"