diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-04 17:01:19 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-19 21:09:12 +0900 |
commit | cf9a2883fea3c28c8d869c72b1b407162a28e0b3 (patch) | |
tree | 99789b969cc63394e49ca145be3f456c339cb12f /lib/bundler/capistrano.rb | |
parent | e107f3f4cb2e11ef6fd46db21392a22fdab4eb2a (diff) | |
download | bundler-cf9a2883fea3c28c8d869c72b1b407162a28e0b3.tar.gz |
Prefer `require_relative` for internal requires
Due to the way rubygems monkey-patched require interacts with default
gems, and given that bundler is a default gem, and that bundler
manipulates the LOAD_PATH in very intricated ways, we can reduce the
risk of "leaking" to a different copy of `bundler` by using
`require_relative` for internal requires.
Diffstat (limited to 'lib/bundler/capistrano.rb')
-rw-r--r-- | lib/bundler/capistrano.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/capistrano.rb b/lib/bundler/capistrano.rb index 1b7145b72b..573df95043 100644 --- a/lib/bundler/capistrano.rb +++ b/lib/bundler/capistrano.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "bundler/shared_helpers" +require_relative "shared_helpers" Bundler::SharedHelpers.major_deprecation 2, "The Bundler task for Capistrano. Please use http://github.com/capistrano/bundler" @@ -8,7 +8,7 @@ Bundler::SharedHelpers.major_deprecation 2, # # Add "require 'bundler/capistrano'" in your Capistrano deploy.rb, and # Bundler will be activated after each new deployment. -require "bundler/deployment" +require_relative "deployment" require "capistrano/version" if defined?(Capistrano::Version) && Gem::Version.new(Capistrano::Version).release >= Gem::Version.new("3.0") |