mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00

rubygems 2.7.x depends bundler-1.15.x. This is preparation for rubygems and bundler migration. * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4 * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches. * https://github.com/bundler/bundler/pull/6007 * Exclude not working examples on ruby repository. * Fake ruby interpriter instead of installed ruby. * Makefile.in: Added test task named `test-bundler`. This task is only working macOS/linux yet. I'm going to support Windows environment later. * tool/sync_default_gems.rb: Added sync task for bundler. [Feature #12733][ruby-core:77172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
67 lines
1.8 KiB
Ruby
67 lines
1.8 KiB
Ruby
# frozen_string_literal: true
|
|
require "spec_helper"
|
|
|
|
RSpec.describe "bundle install with gemfile that uses eval_gemfile" do
|
|
before do
|
|
build_lib("gunks", :path => bundled_app.join("gems/gunks")) do |s|
|
|
s.name = "gunks"
|
|
s.version = "0.0.1"
|
|
end
|
|
end
|
|
|
|
context "eval-ed Gemfile points to an internal gemspec" do
|
|
before do
|
|
create_file "Gemfile-other", <<-G
|
|
gemspec :path => 'gems/gunks'
|
|
G
|
|
end
|
|
|
|
it "installs the gemspec specified gem" do
|
|
install_gemfile <<-G
|
|
eval_gemfile 'Gemfile-other'
|
|
G
|
|
expect(out).to include("Resolving dependencies")
|
|
expect(out).to include("Using gunks 0.0.1 from source at `gems/gunks`")
|
|
expect(out).to include("Bundle complete")
|
|
end
|
|
end
|
|
|
|
context "eval-ed Gemfile has relative-path gems" do
|
|
before do
|
|
build_lib("a", :path => "gems/a")
|
|
create_file "nested/Gemfile-nested", <<-G
|
|
gem "a", :path => "../gems/a"
|
|
G
|
|
|
|
gemfile <<-G
|
|
eval_gemfile "nested/Gemfile-nested"
|
|
G
|
|
end
|
|
|
|
it "installs the path gem" do
|
|
bundle! :install
|
|
expect(the_bundle).to include_gem("a 1.0")
|
|
end
|
|
|
|
# Make sure that we are properly comparing path based gems between the
|
|
# parsed lockfile and the evaluated gemfile.
|
|
it "bundles with --deployment" do
|
|
bundle! :install
|
|
bundle! "install --deployment"
|
|
end
|
|
end
|
|
|
|
context "Gemfile uses gemspec paths after eval-ing a Gemfile" do
|
|
before { create_file "other/Gemfile-other" }
|
|
|
|
it "installs the gemspec specified gem" do
|
|
install_gemfile <<-G
|
|
eval_gemfile 'other/Gemfile-other'
|
|
gemspec :path => 'gems/gunks'
|
|
G
|
|
expect(out).to include("Resolving dependencies")
|
|
expect(out).to include("Using gunks 0.0.1 from source at `gems/gunks`")
|
|
expect(out).to include("Bundle complete")
|
|
end
|
|
end
|
|
end
|