diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 12:47:04 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-04-15 15:36:15 +0900 |
commit | ed149dbf46d1a8b16e6de9c3dbbcc10f72c9c019 (patch) | |
tree | 1c8c755fa592e280dc7718dc8a9317d1ac368394 /spec/bundler/lock | |
parent | 0d9496f924d36534bd524791554d49dc0026b0e0 (diff) |
Merge the master branch of Bundler
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4383
Diffstat (limited to 'spec/bundler/lock')
-rw-r--r-- | spec/bundler/lock/lockfile_spec.rb | 59 |
1 files changed, 25 insertions, 34 deletions
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)}/" |