From 6b6fd16219880f47d807e5c6970cf204b265bda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 11 Jun 2024 18:37:53 +0200 Subject: [PATCH] [rubygems/rubygems] Fix typo https://github.com/rubygems/rubygems/commit/19a0e3730c --- lib/bundler/compact_index_client.rb | 2 +- spec/bundler/install/gems/compact_index_spec.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/bundler/compact_index_client.rb b/lib/bundler/compact_index_client.rb index 692d68e579..a4f5bb1638 100644 --- a/lib/bundler/compact_index_client.rb +++ b/lib/bundler/compact_index_client.rb @@ -75,7 +75,7 @@ module Bundler end def info(name) - Bundler::CompactIndexClient.debug { "info(#{names})" } + Bundler::CompactIndexClient.debug { "info(#{name})" } @parser.info(name) end diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 50add8743b..bd741685d9 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -15,6 +15,21 @@ RSpec.describe "compact index api" do expect(the_bundle).to include_gems "rack 1.0.0" end + it "has a debug mode" do + gemfile <<-G + source "#{source_uri}" + gem "rack" + G + + bundle :install, artifice: "compact_index", env: { "DEBUG_COMPACT_INDEX" => "true" } + expect(out).to include("Fetching gem metadata from #{source_uri}") + expect(err).to include("[Bundler::CompactIndexClient] available?") + expect(err).to include("[Bundler::CompactIndexClient] fetching versions") + expect(err).to include("[Bundler::CompactIndexClient] info(rack)") + expect(err).to include("[Bundler::CompactIndexClient] fetching info/rack") + expect(the_bundle).to include_gems "rack 1.0.0" + end + it "should URI encode gem names" do gemfile <<-G source "#{source_uri}"