ruby-changes:61504
From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:33:32 +0900 (JST)
Subject: [ruby-changes:61504] f02f19d62f (master): [rubygems/rubygems] Rewrite dependency API specs to use new deployment mode
https://git.ruby-lang.org/ruby.git/commit/?id=f02f19d62f From f02f19d62f70bc3b38ff9f2902f99e3bfefefa23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Fri, 29 May 2020 13:06:07 +0200 Subject: [rubygems/rubygems] Rewrite dependency API specs to use new deployment mode Some of them were passing "by chance" because they used a `bundle install` command that failed, but the assertion was using the result of the previous. Others were skipped on bundler 3. Now they all pass in all versions. https://github.com/rubygems/rubygems/commit/cedf611e11 diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 4760d13..b9ceefa 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -73,7 +73,7 @@ RSpec.describe "compact index api" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/compact_index_spec.rb#L73 expect(the_bundle).to include_gems "net-sftp 1.1.1" end - it "should use the endpoint when using --deployment" do + it "should use the endpoint when using deployment mode" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -103,7 +103,7 @@ RSpec.describe "compact index api" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/compact_index_spec.rb#L103 expect(the_bundle).to include_gems("rails 2.3.2") end - it "handles git dependencies that are in rubygems using --deployment" do + it "handles git dependencies that are in rubygems using deployment mode" do build_git "foo" do |s| s.executables = "foobar" s.add_dependency "rails", "2.3.2" @@ -116,12 +116,13 @@ RSpec.describe "compact index api" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/compact_index_spec.rb#L116 bundle! :install, :artifice => "compact_index" - bundle "install --deployment", :artifice => "compact_index" + bundle "config --local deployment true" + bundle :install, :artifice => "compact_index" expect(the_bundle).to include_gems("rails 2.3.2") end - it "doesn't fail if you only have a git gem with no deps when using --deployment" do + it "doesn't fail if you only have a git gem with no deps when using deployment mode" do build_git "foo" gemfile <<-G source "#{source_uri}" @@ -473,7 +474,7 @@ The checksum of /versions does not match the checksum provided by the server! So https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/compact_index_spec.rb#L474 expect(the_bundle).to include_gems "back_deps 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment with blocks" do + it "fetches again when more dependencies are found in subsequent sources using deployment mode with blocks" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -489,8 +490,8 @@ The checksum of /versions does not match the checksum provided by the server! So https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/compact_index_spec.rb#L490 G bundle! :install, :artifice => "compact_index_extra" - - bundle "install --deployment", :artifice => "compact_index_extra" + bundle "config --local deployment true" + bundle! :install, :artifice => "compact_index_extra" expect(the_bundle).to include_gems "back_deps 1.0" end diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb index d1af4d7..5b1beeb 100644 --- a/spec/bundler/install/gems/dependency_api_spec.rb +++ b/spec/bundler/install/gems/dependency_api_spec.rb @@ -53,7 +53,7 @@ RSpec.describe "gemcutter's dependency API" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/dependency_api_spec.rb#L53 expect(the_bundle).to include_gems "net-sftp 1.1.1" end - it "should use the endpoint when using --deployment" do + it "should use the endpoint when using deployment mode" do gemfile <<-G source "#{source_uri}" gem "rack" @@ -83,7 +83,7 @@ RSpec.describe "gemcutter's dependency API" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/dependency_api_spec.rb#L83 expect(the_bundle).to include_gems("rails 2.3.2") end - it "handles git dependencies that are in rubygems using --deployment" do + it "handles git dependencies that are in rubygems using deployment mode" do build_git "foo" do |s| s.executables = "foobar" s.add_dependency "rails", "2.3.2" @@ -96,12 +96,13 @@ RSpec.describe "gemcutter's dependency API" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/dependency_api_spec.rb#L96 bundle :install, :artifice => "endpoint" - bundle "install --deployment", :artifice => "endpoint" + bundle "config --local deployment true" + bundle :install, :artifice => "endpoint" expect(the_bundle).to include_gems("rails 2.3.2") end - it "doesn't fail if you only have a git gem with no deps when using --deployment" do + it "doesn't fail if you only have a git gem with no deps when using deployment mode" do build_git "foo" gemfile <<-G source "#{source_uri}" @@ -446,7 +447,7 @@ RSpec.describe "gemcutter's dependency API" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/dependency_api_spec.rb#L447 expect(the_bundle).to include_gems "back_deps 1.0" end - it "fetches again when more dependencies are found in subsequent sources using --deployment with blocks" do + it "fetches again when more dependencies are found in subsequent sources using deployment mode with blocks" do build_repo2 do build_gem "back_deps" do |s| s.add_dependency "foo" @@ -463,7 +464,8 @@ RSpec.describe "gemcutter's dependency API" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/dependency_api_spec.rb#L464 bundle :install, :artifice => "endpoint_extra" - bundle "install --deployment", :artifice => "endpoint_extra" + bundle "config --local deployment true" + bundle! "install", :artifice => "endpoint_extra" expect(the_bundle).to include_gems "back_deps 1.0" end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/