diff options
author | Bundlerbot <bot@bundler.io> | 2019-04-29 21:58:48 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-04-29 21:58:48 +0000 |
commit | 68d6e628e19e1e842bb09d4eb231c3bcff541033 (patch) | |
tree | 26c234b848519fd28b3f99e5c8dd9d7f457949d6 /lib/bundler/shared_helpers.rb | |
parent | 896269a45902f587bb722ebbd50dbf1eeee9d25b (diff) | |
parent | 11597fef24274bf1542384512faed697d7f41e3b (diff) | |
download | bundler-68d6e628e19e1e842bb09d4eb231c3bcff541033.tar.gz |
Merge #7138
7138: Remove unnecessary `BUNDLER_SPEC_RUN` env variable r=indirect a=deivid-rodriguez
### What was the end-user problem that led to this PR?
The problem was that our library code contains logic that's only necessary for bundler's specs. I think library code should not contain this kind of code, since it affects end users.
### What is your fix for the problem, implemented in this PR?
My fix is to remove the logic, and instead ensure the specs satisfy what the code wanted to ensure (that specs pass even when there's a Gemfile further up in the directory hierarchy outside of the bundler's development copy).
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r-- | lib/bundler/shared_helpers.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index a0982f561f..e56a44a559 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -253,19 +253,6 @@ module Bundler current = File.expand_path(SharedHelpers.pwd).untaint until !File.directory?(current) || current == previous - if ENV["BUNDLE_SPEC_RUN"] - # avoid stepping above the tmp directory when testing - gemspec = if ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"] - # for Ruby Core - "lib/bundler/bundler.gemspec" - else - "bundler.gemspec" - end - - # avoid stepping above the tmp directory when testing - return nil if File.file?(File.join(current, gemspec)) - end - names.each do |name| filename = File.join(current, name) yield filename |