Skip to content

Commit

Permalink
Use require instead of autoload for bundler/plugin/api
Browse files Browse the repository at this point in the history
This was originally a workaround fix in rubygems#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:
rubygems@6167ec8

```
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.
  • Loading branch information
btsai authored Jan 29, 2017
1 parent 8c0cbf3 commit 245bf33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bundler/plugin/api.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
#
Expand Down

0 comments on commit 245bf33

Please sign in to comment.