From 6794f8cf928ab8c009b301ec49a5a81e97e6eb2f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 2 Feb 2022 16:57:34 +0900 Subject: Merge pull request #5482 from hsbt/rubygems-3-3-bundler-2-3 Merge RubyGems 3.3.x and Bundler 2.3.x --- spec/bundler/support/artifice/endpoint_api_missing.rb | 18 ------------------ spec/bundler/support/artifice/vcr.rb | 2 +- spec/bundler/support/hax.rb | 10 ---------- spec/bundler/support/helpers.rb | 10 ---------- spec/bundler/support/rubygems_ext.rb | 2 +- 5 files changed, 2 insertions(+), 40 deletions(-) delete mode 100644 spec/bundler/support/artifice/endpoint_api_missing.rb (limited to 'spec/bundler/support') diff --git a/spec/bundler/support/artifice/endpoint_api_missing.rb b/spec/bundler/support/artifice/endpoint_api_missing.rb deleted file mode 100644 index 755c42e836..0000000000 --- a/spec/bundler/support/artifice/endpoint_api_missing.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -require_relative "endpoint" - -Artifice.deactivate - -class EndpointApiMissing < Endpoint - get "/fetch/actual/gem/:id" do - warn params[:id] - if params[:id] == "rack-1.0.gemspec.rz" - halt 404 - else - File.binread("#{gem_repo2}/quick/Marshal.4.8/#{params[:id]}") - end - end -end - -Artifice.activate_with(EndpointApiMissing) diff --git a/spec/bundler/support/artifice/vcr.rb b/spec/bundler/support/artifice/vcr.rb index 0d51201bef..ceb133346f 100644 --- a/spec/bundler/support/artifice/vcr.rb +++ b/spec/bundler/support/artifice/vcr.rb @@ -69,7 +69,7 @@ class BundlerVCRHTTP < Net::HTTP end def file_name_for_key(key) - key.join("/").gsub(/[\:*?"<>|]/, "-") + File.join(*key).gsub(/[\:*?"<>|]/, "-") end def request_pair_paths diff --git a/spec/bundler/support/hax.rb b/spec/bundler/support/hax.rb index 4a49ffb49f..3d97b93c5a 100644 --- a/spec/bundler/support/hax.rb +++ b/spec/bundler/support/hax.rb @@ -19,16 +19,6 @@ module Gem @local = new(ENV["BUNDLER_SPEC_PLATFORM"]) end @platforms = [Gem::Platform::RUBY, Gem::Platform.local] - - if ENV["BUNDLER_SPEC_PLATFORM"] == "ruby" - class << self - remove_method :finish_resolve - - def finish_resolve - [] - end - end - end end if ENV["BUNDLER_SPEC_GEM_SOURCES"] diff --git a/spec/bundler/support/helpers.rb b/spec/bundler/support/helpers.rb index 99baec24d4..c27096a0cf 100644 --- a/spec/bundler/support/helpers.rb +++ b/spec/bundler/support/helpers.rb @@ -88,7 +88,6 @@ module Spec requires = options.delete(:requires) || [] realworld = RSpec.current_example.metadata[:realworld] - options[:verbose] = true if options[:verbose].nil? && realworld artifice = options.delete(:artifice) do if realworld @@ -448,15 +447,6 @@ module Spec ENV["BUNDLER_SPEC_PLATFORM"] = old if block_given? end - def simulate_ruby_version(version) - return if version == RUBY_VERSION - old = ENV["BUNDLER_SPEC_RUBY_VERSION"] - ENV["BUNDLER_SPEC_RUBY_VERSION"] = version - yield if block_given? - ensure - ENV["BUNDLER_SPEC_RUBY_VERSION"] = old if block_given? - end - def simulate_windows(platform = mswin) simulate_platform platform do simulate_bundler_version_when_missing_prerelease_default_gem_activation do diff --git a/spec/bundler/support/rubygems_ext.rb b/spec/bundler/support/rubygems_ext.rb index 62ba4d56c4..fd5f06b14f 100644 --- a/spec/bundler/support/rubygems_ext.rb +++ b/spec/bundler/support/rubygems_ext.rb @@ -119,7 +119,7 @@ module Spec ENV["BUNDLE_PATH__SYSTEM"] = "true" end - output = `#{Gem.ruby} #{File.expand_path("support/bundle.rb", Path.spec_dir)} install` + output = `#{Gem.ruby} #{File.expand_path("support/bundle.rb", Path.spec_dir)} install --verbose` raise "Error when installing gems in #{gemfile}: #{output}" unless $?.success? ensure if path -- cgit v1.2.3