Moved standard library requirements to the files which use them. Cleaned up vagrant.rb quite a bit.
This commit is contained in:
parent
cd82c8d7f8
commit
4844d6c12f
|
@ -1,8 +1,6 @@
|
|||
# First, load the various libs which Vagrant requires
|
||||
%w{tempfile json pathname logger virtualbox net/ssh archive/tar/minitar
|
||||
net/scp fileutils mario}.each do |lib|
|
||||
require lib
|
||||
end
|
||||
require 'json'
|
||||
require 'virtualbox'
|
||||
require "vagrant/util/glob_loader"
|
||||
|
||||
module Vagrant
|
||||
class << self
|
||||
|
@ -14,10 +12,8 @@ module Vagrant
|
|||
end
|
||||
end
|
||||
|
||||
# Then load the glob loader, which will handle loading everything else
|
||||
require "vagrant/util/glob_loader"
|
||||
|
||||
# Load them up
|
||||
# Load them up. One day we'll convert this to autoloads. Today
|
||||
# is not that day. Low hanging fruit for anyone wishing to do it.
|
||||
libdir = File.expand_path("lib/vagrant", Vagrant.source_root)
|
||||
Vagrant::GlobLoader.glob_require(libdir, %w{util util/stacked_proc_runner
|
||||
downloaders/base config provisioners/base provisioners/chef systems/base
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'fileutils'
|
||||
|
||||
module Vagrant
|
||||
class Action
|
||||
module Box
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
require 'fileutils'
|
||||
require 'archive/tar/minitar'
|
||||
|
||||
module Vagrant
|
||||
class Action
|
||||
module Box
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
require 'fileutils'
|
||||
require 'archive/tar/minitar'
|
||||
|
||||
module Vagrant
|
||||
class Action
|
||||
module General
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'fileutils'
|
||||
|
||||
module Vagrant
|
||||
class Action
|
||||
module VM
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'fileutils'
|
||||
|
||||
module Vagrant
|
||||
module Downloaders
|
||||
# "Downloads" a file to a temporary file. Basically, this downloader
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
require 'pathname'
|
||||
require 'fileutils'
|
||||
|
||||
module Vagrant
|
||||
# Represents a single Vagrant environment. This class is responsible
|
||||
# for loading all of the Vagrantfile's for the given environment and
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'pathname'
|
||||
|
||||
module Vagrant
|
||||
module Provisioners
|
||||
# This class implements provisioning via chef-client, allowing provisioning
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
require 'net/ssh'
|
||||
require 'net/scp'
|
||||
require 'mario'
|
||||
|
||||
module Vagrant
|
||||
# Manages SSH access to a specific environment. Allows an environment to
|
||||
# replace the process with SSH itself, run a specific set of commands,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'logger'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
# Subclass of the standard library logger which has no format on
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'mario'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
# This class just contains some platform checking code.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require 'thread'
|
||||
require 'mario'
|
||||
|
||||
module Vagrant
|
||||
module Util
|
||||
|
|
Loading…
Reference in New Issue