Permalink
Browse files

Improve -rbundler performance by using autoloads

  • Loading branch information...
segiddins committed Dec 12, 2016
1 parent 9eefcbe commit 6167ec85e9ef4e9146fad305864b8359d4a9b021
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/bundler.rb
  2. +2 −1 lib/bundler/plugin/api.rb
View
@@ -7,7 +7,6 @@
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"
@@ -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

0 comments on commit 6167ec8

Please sign in to comment.