From 8f63272403a1843fdb6040b97821b363ae3318c8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 13 Feb 2010 11:43:58 -0800 Subject: [PATCH] Cleaned up the requiring of files in vagrant.rb --- lib/vagrant.rb | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 6eae2302a..e8e471641 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -2,20 +2,13 @@ libdir = File.dirname(__FILE__) $:.unshift(libdir) PROJECT_ROOT = File.join(libdir, '..') -require 'ftools' -require 'json' -require 'pathname' -require 'logger' -require 'virtualbox' -require 'net/ssh' -require 'net/scp' -require 'tarruby' -require 'fileutils' -require 'vagrant/busy' -require 'vagrant/util' -require 'vagrant/commands' -require 'vagrant/config' -require 'vagrant/env' -require 'vagrant/provisioning' -require 'vagrant/ssh' -require 'vagrant/vm' +# The libs which must be loaded prior to the rest +%w{ftools json pathname logger virtualbox net/ssh + net/scp tarruby fileutils vagrant/util}.each do |f| + require f +end + +# Glob require the rest +Dir[File.join(PROJECT_ROOT, "lib", "vagrant", "**", "*.rb")].each do |f| + require f +end