From 245bf33f851d55212eebef17c0cad8b1f6ca2f87 Mon Sep 17 00:00:00 2001 From: Brian Tsai Date: Sun, 29 Jan 2017 14:46:06 +0900 Subject: [PATCH] Use `require` instead of `autoload` for bundler/plugin/api This was originally a workaround fix in https://github.com/bundler/bundler/pull/5010, to prevent the following error in fastlane and rdoc on bundler 1.14.3, but the following commit undid this, and this errors is reappearing: https://github.com/bundler/bundler/commit/6167ec85e9ef4e9146fad305864b8359d4a9b021 ``` gems/bundler-1.14.3/lib/bundler/rubygems_ext.rb:45:in `full_gem_path': uninitialized constant Bundler::Plugin::API::Source (NameError) from /lib/ruby/site_ruby/2.0.0/rubygems/basic_specification.rb:144:in `block in full_require_paths' ``` This commit will revert that change. --- lib/bundler/plugin/api.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bundler/plugin/api.rb b/lib/bundler/plugin/api.rb index a2d5cbb4ac5..3771823f062 100644 --- a/lib/bundler/plugin/api.rb +++ b/lib/bundler/plugin/api.rb @@ -1,4 +1,7 @@ # frozen_string_literal: true +# Should not use `autoload :Source, "bundler/plugin/api/source"` as this breaks sdoc, fastlane with this error: +# +require "bundler/plugin/api/source" module Bundler # This is the interfacing class represents the API that we intend to provide @@ -23,7 +26,6 @@ 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. #