mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Sync latest bundler & rubygems development version
This commit is contained in:
parent
9952e9358e
commit
6e2240a2f9
Notes:
git
2021-07-07 13:30:45 +09:00
111 changed files with 1575 additions and 1099 deletions
|
|
@ -298,6 +298,30 @@ RSpec.describe "bundle cache" do
|
|||
expect(out).to include("frozen").or include("deployment")
|
||||
end
|
||||
end
|
||||
|
||||
context "with gems with extensions" do
|
||||
before do
|
||||
build_repo2 do
|
||||
build_gem "racc", "2.0" do |s|
|
||||
s.add_dependency "rake"
|
||||
s.extensions << "Rakefile"
|
||||
s.write "Rakefile", "task(:default) { puts 'INSTALLING rack' }"
|
||||
end
|
||||
end
|
||||
|
||||
gemfile <<~G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
|
||||
gem "racc"
|
||||
G
|
||||
end
|
||||
|
||||
it "installs them properly from cache to a different path" do
|
||||
bundle "cache"
|
||||
bundle "config set --local path vendor/bundle"
|
||||
bundle "install --local"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.describe "bundle install with gem sources" do
|
||||
|
|
@ -317,7 +341,7 @@ RSpec.describe "bundle install with gem sources" do
|
|||
expect(the_bundle).to include_gems "rack 1.0.0"
|
||||
end
|
||||
|
||||
it "does not hit the remote at all" do
|
||||
it "does not hit the remote at all in frozen mode" do
|
||||
build_repo2
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
|
|
@ -334,6 +358,24 @@ RSpec.describe "bundle install with gem sources" do
|
|||
expect(the_bundle).to include_gems "rack 1.0.0"
|
||||
end
|
||||
|
||||
it "does not hit the remote at all when cache_all_platforms configured" do
|
||||
build_repo2
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo2)}"
|
||||
gem "rack"
|
||||
G
|
||||
|
||||
bundle :cache
|
||||
simulate_new_machine
|
||||
FileUtils.rm_rf gem_repo2
|
||||
|
||||
bundle "config set --local cache_all_platforms true"
|
||||
bundle "config set --local path vendor/bundle"
|
||||
bundle "install --local"
|
||||
expect(out).not_to include("Fetching gem metadata")
|
||||
expect(the_bundle).to include_gems "rack 1.0.0"
|
||||
end
|
||||
|
||||
it "does not reinstall already-installed gems" do
|
||||
install_gemfile <<-G
|
||||
source "#{file_uri_for(gem_repo1)}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue