diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-12-24 20:42:50 +0100 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-12-25 05:55:36 +0900 |
| commit | 8f05e4f54bdb3bcf05574bd5f12e56f7e010c8a2 (patch) | |
| tree | f84580ebe619c61036604163ca17aa33a141fda2 /spec | |
| parent | 3cbe37bd357464c0ce665770998b691cad022a24 (diff) | |
Update Bundler to 2.4.1 & and RubyGems to 3.4.1
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7020
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/bundler/install/gemfile/git_spec.rb | 1 | ||||
| -rw-r--r-- | spec/bundler/install/gemfile/platform_spec.rb | 20 | ||||
| -rw-r--r-- | spec/bundler/lock/git_spec.rb | 36 |
3 files changed, 57 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 6a9532332c..3f386f65f4 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -193,6 +193,7 @@ RSpec.describe "bundle install with git sources" do gem "foo" end G + expect(err).to be_empty run <<-RUBY require 'foo' diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index 69918cf9f9..e9cf0cb636 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -572,6 +572,26 @@ RSpec.describe "bundle install with platform conditionals" do #{Bundler::VERSION} L end + + it "resolves fine when a dependency is unused on a platform different from the current one, but reintroduced transitively" do + bundle "config set --local force_ruby_platform true" + + build_repo4 do + build_gem "listen", "3.7.1" do |s| + s.add_dependency "ffi" + end + + build_gem "ffi", "1.15.5" + end + + install_gemfile <<~G + source "#{file_uri_for(gem_repo4)}" + + gem "listen" + gem "ffi", :platform => :windows + G + expect(err).to be_empty + end end RSpec.describe "when a gem has no architecture" do diff --git a/spec/bundler/lock/git_spec.rb b/spec/bundler/lock/git_spec.rb index dfcbb645b1..a633bd546e 100644 --- a/spec/bundler/lock/git_spec.rb +++ b/spec/bundler/lock/git_spec.rb @@ -90,6 +90,42 @@ RSpec.describe "bundle lock with git gems" do expect(err).to be_empty end + it "properly fetches a git source locked to an annotated tag" do + # Create an annotated tag + git("tag -a v1.0 -m 'Annotated v1.0'", lib_path("foo-1.0")) + annotated_tag = git("rev-parse v1.0", lib_path("foo-1.0")) + + gemfile <<-G + source "#{file_uri_for(gem_repo1)}" + gem 'foo', :git => "#{lib_path("foo-1.0")}" + G + + lockfile <<-L + GIT + remote: #{lib_path("foo-1.0")} + revision: #{annotated_tag} + specs: + foo (1.0) + + GEM + remote: #{file_uri_for(gem_repo1)}/ + specs: + + PLATFORMS + #{lockfile_platforms} + + DEPENDENCIES + foo! + + BUNDLED WITH + #{Bundler::VERSION} + L + + bundle "install" + + expect(err).to be_empty + end + it "provides correct #full_gem_path" do run <<-RUBY puts Bundler.rubygems.find_name('foo').first.full_gem_path |
