2010-09-04 02:25:48 +00:00
|
|
|
require 'pathname'
|
2010-08-24 04:41:40 +00:00
|
|
|
require 'json'
|
2010-08-27 04:56:38 +00:00
|
|
|
require 'i18n'
|
2010-08-24 04:41:40 +00:00
|
|
|
require 'virtualbox'
|
2010-03-13 11:08:26 +00:00
|
|
|
|
2010-08-24 04:33:14 +00:00
|
|
|
module Vagrant
|
2010-08-24 17:27:36 +00:00
|
|
|
# TODO: Move more classes over to the autoload model. We'll
|
|
|
|
# start small, but slowly move everything over.
|
|
|
|
|
2010-09-11 17:17:26 +00:00
|
|
|
autoload :Box, 'vagrant/box'
|
|
|
|
autoload :BoxCollection, 'vagrant/box_collection'
|
|
|
|
autoload :CLI, 'vagrant/cli'
|
|
|
|
autoload :Config, 'vagrant/config'
|
|
|
|
autoload :DataStore, 'vagrant/data_store'
|
|
|
|
autoload :Errors, 'vagrant/errors'
|
2010-09-15 05:10:51 +00:00
|
|
|
autoload :Plugin, 'vagrant/plugin'
|
2010-09-15 15:19:38 +00:00
|
|
|
autoload :TestHelpers, 'vagrant/test_helpers'
|
2010-09-11 17:17:26 +00:00
|
|
|
autoload :Util, 'vagrant/util'
|
2010-08-24 17:27:36 +00:00
|
|
|
|
|
|
|
module Command
|
2010-08-24 17:58:36 +00:00
|
|
|
autoload :Base, 'vagrant/command/base'
|
|
|
|
autoload :GroupBase, 'vagrant/command/group_base'
|
2010-08-25 00:49:22 +00:00
|
|
|
autoload :Helpers, 'vagrant/command/helpers'
|
2010-08-25 06:50:20 +00:00
|
|
|
autoload :NamedBase, 'vagrant/command/named_base'
|
2010-08-24 17:27:36 +00:00
|
|
|
end
|
|
|
|
|
2010-08-24 18:18:29 +00:00
|
|
|
# The source root is the path to the root directory of
|
|
|
|
# the Vagrant gem.
|
|
|
|
def self.source_root
|
2010-09-04 02:25:48 +00:00
|
|
|
@source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
|
2010-08-24 04:33:14 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2010-08-27 04:56:38 +00:00
|
|
|
# Default I18n to load the en locale
|
|
|
|
I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root)
|
|
|
|
|
2010-08-24 04:41:40 +00:00
|
|
|
# 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.
|
2010-08-24 04:33:14 +00:00
|
|
|
libdir = File.expand_path("lib/vagrant", Vagrant.source_root)
|
2010-09-03 16:33:15 +00:00
|
|
|
Vagrant::Util::GlobLoader.glob_require(libdir, %w{
|
2010-09-02 03:37:11 +00:00
|
|
|
downloaders/base provisioners/base provisioners/chef systems/base
|
2010-09-01 17:04:37 +00:00
|
|
|
hosts/base})
|
2010-07-04 02:58:03 +00:00
|
|
|
|
2010-09-15 05:10:51 +00:00
|
|
|
# Initialize the built-in actions and load the plugins.
|
2010-07-04 02:58:03 +00:00
|
|
|
Vagrant::Action.builtin!
|
2010-09-15 05:10:51 +00:00
|
|
|
Vagrant::Plugin.load!
|