diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-12-12 11:48:56 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-12-21 18:40:55 +0100 |
commit | 6167ec85e9ef4e9146fad305864b8359d4a9b021 (patch) | |
tree | 9b75acbd2fed37e7422d4b603019ff963cc99498 | |
parent | 9eefcbece2378b2c355e58f2a5a208d4ab0e8315 (diff) | |
download | bundler-6167ec85e9ef4e9146fad305864b8359d4a9b021.tar.gz |
Improve -rbundler performance by using autoloads
-rw-r--r-- | lib/bundler.rb | 2 | ||||
-rw-r--r-- | lib/bundler/plugin/api.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 0dcaa03965..9b96075ca9 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -7,7 +7,6 @@ require "tmpdir" require "bundler/errors" require "bundler/environment_preserver" -require "bundler/gem_remote_fetcher" require "bundler/plugin" require "bundler/rubygems_ext" require "bundler/rubygems_integration" @@ -32,6 +31,7 @@ module Bundler autoload :FeatureFlag, "bundler/feature_flag" autoload :GemHelper, "bundler/gem_helper" autoload :GemHelpers, "bundler/gem_helpers" + autoload :GemRemoteFetcher, "bundler/gem_remote_fetcher" autoload :GemVersionPromoter, "bundler/gem_version_promoter" autoload :Graph, "bundler/graph" autoload :Index, "bundler/index" diff --git a/lib/bundler/plugin/api.rb b/lib/bundler/plugin/api.rb index bd7cef5382..a2d5cbb4ac 100644 --- a/lib/bundler/plugin/api.rb +++ b/lib/bundler/plugin/api.rb @@ -1,5 +1,4 @@ # frozen_string_literal: true -require "bundler/plugin/api/source" module Bundler # This is the interfacing class represents the API that we intend to provide @@ -24,6 +23,8 @@ module Bundler # and hooks). module Plugin class API + autoload :Source, "bundler/plugin/api/source" + # The plugins should declare that they handle a command through this helper. # # @param [String] command being handled by them |