From ed149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 15 Apr 2021 12:47:04 +0900 Subject: Merge the master branch of Bundler --- spec/bundler/lock/lockfile_spec.rb | 59 ++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 34 deletions(-) (limited to 'spec/bundler/lock') diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index 976db33b0e..d68410824e 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -318,40 +318,7 @@ RSpec.describe "the lockfile format" do G end - it "generates a lockfile without credentials for a configured source", :bundler => "< 3" do - bundle "config set http://localgemserver.test/ user:pass" - - install_gemfile(<<-G, :artifice => "endpoint_strict_basic_authentication", :quiet => true) - source "http://localgemserver.test/" do - - end - - source "http://user:pass@othergemserver.test/" do - gem "rack-obama", ">= 1.0" - end - G - - lockfile_should_be <<-G - GEM - remote: http://localgemserver.test/ - remote: http://user:pass@othergemserver.test/ - specs: - rack (1.0.0) - rack-obama (1.0) - rack - - PLATFORMS - #{lockfile_platforms} - - DEPENDENCIES - rack-obama (>= 1.0)! - - BUNDLED WITH - #{Bundler::VERSION} - G - end - - it "generates a lockfile without credentials for a configured source", :bundler => "3" do + it "generates a lockfile without credentials for a configured source" do bundle "config set http://localgemserver.test/ user:pass" install_gemfile(<<-G, :artifice => "endpoint_strict_basic_authentication", :quiet => true) @@ -674,6 +641,30 @@ RSpec.describe "the lockfile format" do G end + it "removes redundant sources" do + install_gemfile <<-G + source "#{file_uri_for(gem_repo2)}/" + + gem "rack", :source => "#{file_uri_for(gem_repo2)}/" + G + + lockfile_should_be <<-G + GEM + remote: #{file_uri_for(gem_repo2)}/ + specs: + rack (1.0.0) + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + rack! + + BUNDLED WITH + #{Bundler::VERSION} + G + end + it "lists gems alphabetically" do install_gemfile <<-G source "#{file_uri_for(gem_repo2)}/" -- cgit v1.2.3