[rubygems/rubygems] Fix error when changing a path source to a git source if frozen mode
https://github.com/rubygems/rubygems/commit/4c79ab9b2e
This commit is contained in:
parent
1e00763688
commit
3a273c4742
@ -53,6 +53,8 @@ module Bundler
|
||||
"source at `#{@path}`"
|
||||
end
|
||||
|
||||
alias_method :to_gemfile, :path
|
||||
|
||||
def hash
|
||||
[self.class, expanded_path, version].hash
|
||||
end
|
||||
|
@ -483,6 +483,27 @@ RSpec.describe "install in deployment or frozen mode" do
|
||||
expect(err).not_to include("You have deleted from the Gemfile")
|
||||
end
|
||||
|
||||
it "explodes if you change a source from path to git" do
|
||||
build_git "myrack", path: lib_path("myrack")
|
||||
|
||||
install_gemfile <<-G
|
||||
source "https://gem.repo1"
|
||||
gem "myrack", :path => "#{lib_path("myrack")}"
|
||||
G
|
||||
|
||||
gemfile <<-G
|
||||
source "https://gem.repo1"
|
||||
gem "myrack", :git => "https:/my-git-repo-for-myrack"
|
||||
G
|
||||
|
||||
bundle "config set --local frozen true"
|
||||
bundle :install, raise_on_error: false
|
||||
expect(err).to include("frozen mode")
|
||||
expect(err).to include("You have changed in the Gemfile:\n* myrack from `#{lib_path("myrack")}` to `https:/my-git-repo-for-myrack`")
|
||||
expect(err).not_to include("You have added to the Gemfile")
|
||||
expect(err).not_to include("You have deleted from the Gemfile")
|
||||
end
|
||||
|
||||
it "remembers that the bundle is frozen at runtime" do
|
||||
bundle :lock
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user