summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-03-08 22:09:01 +0000
committerBundlerbot <bot@bundler.io>2019-03-08 22:09:01 +0000
commit1ba671ba459353470b68e61a869e16a00c07ccbf (patch)
tree7c4d2e83c3aec62862a0be8c50c3339a91a85533
parent6c841ad68e5c42445179ba2ccabe6de2b472099e (diff)
parent8573555eef40da55b15840d9f18fe64c28857867 (diff)
downloadbundler-1ba671ba459353470b68e61a869e16a00c07ccbf.tar.gz
Merge #7024
7024: Remove old 1.8.7 remanents r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that we have some really legacy code in our specs. ### What was your diagnosis of the problem? My diagnosis was that we forgot to remove/update these bits when dropping support. ### What is your fix for the problem, implemented in this PR? My fix is to remove the legacy code. ### Why did you choose this fix out of the possible options? I chose this fix because it's the only fix, really. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--spec/bundler/bundler_spec.rb15
-rw-r--r--spec/support/rubygems_ext.rb2
2 files changed, 4 insertions, 13 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb
index bbfd877210..e33c8dc606 100644
--- a/spec/bundler/bundler_spec.rb
+++ b/spec/bundler/bundler_spec.rb
@@ -312,10 +312,9 @@ EOF
let(:bundle_path) { Pathname("#{tmpdir}/bundle") }
def clear_cached_requires_sudo
- # Private in ruby 1.8.7
return unless Bundler.instance_variable_defined?(:@requires_sudo_ran)
- Bundler.send(:remove_instance_variable, :@requires_sudo_ran)
- Bundler.send(:remove_instance_variable, :@requires_sudo)
+ Bundler.remove_instance_variable(:@requires_sudo_ran)
+ Bundler.remove_instance_variable(:@requires_sudo)
end
before do
@@ -382,14 +381,8 @@ EOF
after do
FileUtils.rm_rf("tmp/vendor/bundle")
FileUtils.rm_rf("tmp/vendor/bin_dir")
- if Bundler.respond_to?(:remove_instance_variable)
- Bundler.remove_instance_variable(:@requires_sudo_ran)
- Bundler.remove_instance_variable(:@requires_sudo)
- else
- # TODO: Remove these code when Bundler drops Ruby 1.8.7 support
- Bundler.send(:remove_instance_variable, :@requires_sudo_ran)
- Bundler.send(:remove_instance_variable, :@requires_sudo)
- end
+ Bundler.remove_instance_variable(:@requires_sudo_ran)
+ Bundler.remove_instance_variable(:@requires_sudo)
end
context "writable paths" do
it "should return false and display nothing" do
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index 478cd12eb5..f031570e33 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -47,8 +47,6 @@ module Spec
def self.install_gems(gems)
reqs, no_reqs = gems.partition {|_, req| !req.nil? && !req.split(" ").empty? }
- # TODO: remove when we drop ruby 1.8.7-2.2.2 support
- reqs = reqs.sort_by {|name, _| name == "rack" ? 0 : 1 }.sort_by {|name, _| name =~ /rack/ ? 0 : 1 }
no_reqs.map!(&:first)
reqs.map! {|name, req| "'#{name}:#{req}'" }
deps = reqs.concat(no_reqs).join(" ")