From 87d2f357189fc0e1c0521f24e525620a660e00c3 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Wed, 26 Mar 2014 21:04:15 -0300 Subject: [PATCH] providers/docker: Get rid of some explicit requires in favor of autoloading --- plugins/providers/docker/action/prepare_nfs_settings.rb | 2 -- plugins/providers/docker/errors.rb | 2 -- plugins/providers/docker/plugin.rb | 4 ++++ plugins/providers/docker/provider.rb | 3 --- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/providers/docker/action/prepare_nfs_settings.rb b/plugins/providers/docker/action/prepare_nfs_settings.rb index 5d437f472..860d69fac 100644 --- a/plugins/providers/docker/action/prepare_nfs_settings.rb +++ b/plugins/providers/docker/action/prepare_nfs_settings.rb @@ -1,5 +1,3 @@ -require_relative '../errors' - module VagrantPlugins module DockerProvider module Action diff --git a/plugins/providers/docker/errors.rb b/plugins/providers/docker/errors.rb index 68b3fbd71..77824b265 100644 --- a/plugins/providers/docker/errors.rb +++ b/plugins/providers/docker/errors.rb @@ -1,5 +1,3 @@ -require 'vagrant/errors' - module VagrantPlugins module DockerProvider module Errors diff --git a/plugins/providers/docker/plugin.rb b/plugins/providers/docker/plugin.rb index 05d3b8fab..4f67b2a19 100644 --- a/plugins/providers/docker/plugin.rb +++ b/plugins/providers/docker/plugin.rb @@ -1,5 +1,9 @@ module VagrantPlugins module DockerProvider + autoload :Action, File.expand_path("../action", __FILE__) + autoload :Driver, File.expand_path("../driver", __FILE__) + autoload :Errors, File.expand_path("../errors", __FILE__) + class Plugin < Vagrant.plugin("2") name "docker-provider" diff --git a/plugins/providers/docker/provider.rb b/plugins/providers/docker/provider.rb index fcc48230f..c18a7438d 100644 --- a/plugins/providers/docker/provider.rb +++ b/plugins/providers/docker/provider.rb @@ -1,8 +1,5 @@ require "log4r" -require_relative 'driver' -require_relative 'action' - module VagrantPlugins module DockerProvider class Provider < Vagrant.plugin("2", :provider)