summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-30 18:07:32 +0100
committergit <svn-admin@ruby-lang.org>2021-12-02 18:10:31 +0900
commitcf882713312576a827abff8ddf7eb620e1f3f6d8 (patch)
tree64357e60f3758efc8782554601ee247eb8d06f51 /spec
parent2a15b28a9ec59d41fc3f9a5e17cf3efe6d0817b6 (diff)
[rubygems/rubygems] Fix gemspec source unlocking also for prereleases like 0.0.0.SNAPSHOT
The default prerelease requirement in rubygems doesn't actually match things like "0.0.0.SNAPSHOT". https://github.com/rubygems/rubygems/commit/711498b342
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/install/gemfile/path_spec.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb
index db5db31d42..bea7c11dec 100644
--- a/spec/bundler/install/gemfile/path_spec.rb
+++ b/spec/bundler/install/gemfile/path_spec.rb
@@ -216,6 +216,39 @@ RSpec.describe "bundle install with explicit source paths" do
expect(the_bundle).to include_gems "foo 0.0.0.dev"
end
+ it "works when using uppercase prereleases of 0.0.0" do
+ build_lib "foo", "0.0.0.SNAPSHOT", :path => lib_path("foo")
+
+ gemfile <<~G
+ source "#{file_uri_for(gem_repo1)}"
+ gem "foo", :path => "#{lib_path("foo")}"
+ G
+
+ lockfile <<~L
+ PATH
+ remote: #{lib_path("foo")}
+ specs:
+ foo (0.0.0.SNAPSHOT)
+
+ GEM
+ remote: #{file_uri_for(gem_repo1)}/
+ specs:
+
+ PLATFORMS
+ #{lockfile_platforms}
+
+ DEPENDENCIES
+ foo!
+
+ BUNDLED WITH
+ #{Bundler::VERSION}
+ L
+
+ bundle :install
+
+ expect(the_bundle).to include_gems "foo 0.0.0.SNAPSHOT"
+ end
+
it "handles downgrades" do
build_lib "omg", "2.0", :path => lib_path("omg")