1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Follow up r60970 for bundler's examples.

r60970 break Gemfile.lock format with file protocol after bundle
  install/update. I addd hostname to these examples.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-12-07 08:08:56 +00:00
parent 15c977803d
commit c02174354e
10 changed files with 113 additions and 113 deletions

View file

@ -36,7 +36,7 @@ RSpec.describe Bundler::Definition do
build_lib "foo", "1.0", :path => lib_path("foo") build_lib "foo", "1.0", :path => lib_path("foo")
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "foo", :path => "#{lib_path("foo")}" gem "foo", :path => "#{lib_path("foo")}"
G G
@ -55,7 +55,7 @@ RSpec.describe Bundler::Definition do
rack (= 1.0) rack (= 1.0)
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -115,7 +115,7 @@ RSpec.describe Bundler::Definition do
end end
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "foo", :path => "#{lib_path("foo")}" gem "foo", :path => "#{lib_path("foo")}"
G G
@ -130,7 +130,7 @@ RSpec.describe Bundler::Definition do
rack (= 1.0) rack (= 1.0)
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -184,7 +184,7 @@ RSpec.describe Bundler::Definition do
it "for a rubygems gem" do it "for a rubygems gem" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "foo" gem "foo"
G G
@ -193,7 +193,7 @@ RSpec.describe Bundler::Definition do
expect(out).to match(/using resolution from the lockfile/) expect(out).to match(/using resolution from the lockfile/)
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
foo (1.0) foo (1.0)

View file

@ -13,7 +13,7 @@ RSpec.describe "bundle lock" do
before :each do before :each do
gemfile <<-G gemfile <<-G
source "file://#{repo}" source "file://localhost#{repo}"
gem "rails" gem "rails"
gem "with_license" gem "with_license"
gem "foo" gem "foo"
@ -21,7 +21,7 @@ RSpec.describe "bundle lock" do
@lockfile = strip_lockfile <<-L @lockfile = strip_lockfile <<-L
GEM GEM
remote: file:#{repo}/ remote: file://localhost#{repo}/
specs: specs:
actionmailer (2.3.2) actionmailer (2.3.2)
activesupport (= 2.3.2) activesupport (= 2.3.2)
@ -228,7 +228,7 @@ RSpec.describe "bundle lock" do
end end
gemfile <<-G gemfile <<-G
source "file:#{gem_repo4}" source "file://localhost#{gem_repo4}"
gem "mixlib-shellout" gem "mixlib-shellout"
gem "gssapi" gem "gssapi"
@ -238,7 +238,7 @@ RSpec.describe "bundle lock" do
expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G)) expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G))
GEM GEM
remote: file:#{gem_repo4}/ remote: file://localhost#{gem_repo4}/
specs: specs:
ffi (1.9.14-x86-mingw32) ffi (1.9.14-x86-mingw32)
gssapi (1.2.0) gssapi (1.2.0)
@ -263,7 +263,7 @@ RSpec.describe "bundle lock" do
expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G)) expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G))
GEM GEM
remote: file:#{gem_repo4}/ remote: file://localhost#{gem_repo4}/
specs: specs:
ffi (1.9.14) ffi (1.9.14)
ffi (1.9.14-x86-mingw32) ffi (1.9.14-x86-mingw32)

View file

@ -426,7 +426,7 @@ RSpec.describe "bundle install from an existing gemspec" do
%w[ruby jruby].each do |platform| %w[ruby jruby].each do |platform|
simulate_platform(platform) do simulate_platform(platform) do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
gemspec gemspec
G G
end end
@ -450,7 +450,7 @@ RSpec.describe "bundle install from an existing gemspec" do
platform_specific platform_specific
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
platform_specific (1.0) platform_specific (1.0)
platform_specific (1.0-java) platform_specific (1.0-java)
@ -480,7 +480,7 @@ RSpec.describe "bundle install from an existing gemspec" do
foo (1.0) foo (1.0)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
platform_specific (1.0) platform_specific (1.0)
platform_specific (1.0-java) platform_specific (1.0-java)
@ -512,7 +512,7 @@ RSpec.describe "bundle install from an existing gemspec" do
foo (1.0) foo (1.0)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
indirect_platform_specific (1.0) indirect_platform_specific (1.0)
platform_specific platform_specific
@ -545,7 +545,7 @@ RSpec.describe "bundle install from an existing gemspec" do
expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY"
expect(lockfile).to eq strip_whitespace(<<-L) expect(lockfile).to eq strip_whitespace(<<-L)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
platform_specific (1.0) platform_specific (1.0)
platform_specific (1.0-java) platform_specific (1.0-java)
@ -576,7 +576,7 @@ RSpec.describe "bundle install from an existing gemspec" do
expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY"
expect(lockfile).to eq strip_whitespace(<<-L) expect(lockfile).to eq strip_whitespace(<<-L)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
platform_specific (1.0) platform_specific (1.0)
platform_specific (1.0-java) platform_specific (1.0-java)
@ -608,7 +608,7 @@ RSpec.describe "bundle install from an existing gemspec" do
expect(the_bundle).to include_gems "foo 1.0", "indirect_platform_specific 1.0", "platform_specific 1.0 RUBY" expect(the_bundle).to include_gems "foo 1.0", "indirect_platform_specific 1.0", "platform_specific 1.0 RUBY"
expect(lockfile).to eq strip_whitespace(<<-L) expect(lockfile).to eq strip_whitespace(<<-L)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
indirect_platform_specific (1.0) indirect_platform_specific (1.0)
platform_specific platform_specific

View file

@ -20,8 +20,8 @@ RSpec.describe "bundle install with gems on multiple sources" do
before do before do
gemfile <<-G gemfile <<-G
source "file://#{gem_repo3}" source "file://localhost#{gem_repo3}"
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama" gem "rack-obama"
gem "rack" gem "rack"
G G
@ -33,7 +33,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.")
expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
expect(out).to include("Installed from: file:#{gem_repo1}") expect(out).to include("Installed from: file://localhost#{gem_repo1}")
expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1")
end end
@ -50,8 +50,8 @@ RSpec.describe "bundle install with gems on multiple sources" do
before do before do
gemfile <<-G gemfile <<-G
source "file://#{gem_repo3}" source "file://localhost#{gem_repo3}"
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama" gem "rack-obama"
gem "rack", "1.0.0" # force it to install the working version in repo1 gem "rack", "1.0.0" # force it to install the working version in repo1
G G
@ -63,7 +63,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.")
expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
expect(out).to include("Installed from: file:#{gem_repo1}") expect(out).to include("Installed from: file://localhost#{gem_repo1}")
expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1") expect(the_bundle).to include_gems("rack-obama 1.0.0", "rack 1.0.0", :source => "remote1")
end end
end end
@ -240,9 +240,9 @@ RSpec.describe "bundle install with gems on multiple sources" do
context "and in yet another source" do context "and in yet another source" do
before do before do
gemfile <<-G gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
source "file://#{gem_repo3}" do source "file://localhost#{gem_repo3}" do
gem "depends_on_rack" gem "depends_on_rack"
end end
G G
@ -253,7 +253,7 @@ RSpec.describe "bundle install with gems on multiple sources" do
bundle :install bundle :install
expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.") expect(out).to have_major_deprecation a_string_including("Your Gemfile contains multiple primary sources.")
expect(out).to include("Warning: the gem 'rack' was found in multiple sources.") expect(out).to include("Warning: the gem 'rack' was found in multiple sources.")
expect(out).to include("Installed from: file:#{gem_repo2}") expect(out).to include("Installed from: file://localhost#{gem_repo2}")
expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0") expect(the_bundle).to include_gems("depends_on_rack 1.0.1", "rack 1.0.0")
end end
end end

View file

@ -247,19 +247,19 @@ RSpec.describe "bundle flex_install" do
it "updates the lockfile", :bundler => "< 2" do it "updates the lockfile", :bundler => "< 2" do
build_repo2 build_repo2
install_gemfile! <<-G install_gemfile! <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
install_gemfile! <<-G install_gemfile! <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
gem "rack" gem "rack"
G G
lockfile_should_be <<-L lockfile_should_be <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
rack (1.0.0) rack (1.0.0)

View file

@ -4,7 +4,7 @@ RSpec.describe "bundle install with a mirror configured" do
describe "when the mirror does not match the gem source" do describe "when the mirror does not match the gem source" do
before :each do before :each do
gemfile <<-G gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
@ -13,7 +13,7 @@ RSpec.describe "bundle install with a mirror configured" do
it "installs from the normal location" do it "installs from the normal location" do
bundle :install bundle :install
expect(out).to include("Fetching source index from file:#{gem_repo1}") expect(out).to include("Fetching source index from file://localhost#{gem_repo1}")
expect(the_bundle).to include_gems "rack 1.0" expect(the_bundle).to include_gems "rack 1.0"
end end
end end
@ -22,17 +22,17 @@ RSpec.describe "bundle install with a mirror configured" do
before :each do before :each do
gemfile <<-G gemfile <<-G
# This source is bogus and doesn't have the gem we're looking for # This source is bogus and doesn't have the gem we're looking for
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
gem "rack" gem "rack"
G G
bundle "config --local mirror.file://#{gem_repo2} file://#{gem_repo1}" bundle "config --local mirror.file://localhost#{gem_repo2} file://localhost#{gem_repo1}"
end end
it "installs the gem from the mirror" do it "installs the gem from the mirror" do
bundle :install bundle :install
expect(out).to include("Fetching source index from file:#{gem_repo1}") expect(out).to include("Fetching source index from file://localhost#{gem_repo1}")
expect(out).not_to include("Fetching source index from file:#{gem_repo2}") expect(out).not_to include("Fetching source index from file://localhost#{gem_repo2}")
expect(the_bundle).to include_gems "rack 1.0" expect(the_bundle).to include_gems "rack 1.0"
end end
end end

View file

@ -7,14 +7,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "generates a simple lockfile for a single source, gem" do it "generates a simple lockfile for a single source, gem" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -37,7 +37,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
specs: specs:
GEM GEM
remote: file://#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -53,14 +53,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
L L
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -80,7 +80,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -95,14 +95,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
L L
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -120,7 +120,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "updates the lockfile's bundler version if not present" do it "updates the lockfile's bundler version if not present" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -132,14 +132,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
L L
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack", "> 0" gem "rack", "> 0"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -157,7 +157,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "outputs a warning if the current is older than lockfile's bundler version" do it "outputs a warning if the current is older than lockfile's bundler version" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -173,7 +173,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
simulate_bundler_version "9999999.0.0" do simulate_bundler_version "9999999.0.0" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
@ -185,7 +185,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -204,7 +204,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "errors if the current is a major version older than lockfile's bundler version" do it "errors if the current is a major version older than lockfile's bundler version" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -219,7 +219,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
L L
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
@ -269,7 +269,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "warns when updating bundler major version" do it "warns when updating bundler major version" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -285,7 +285,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
simulate_bundler_version "9999999.0.0" do simulate_bundler_version "9999999.0.0" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
@ -296,7 +296,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -314,14 +314,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "generates a simple lockfile for a single source, gem with dependencies" do it "generates a simple lockfile for a single source, gem with dependencies" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama" gem "rack-obama"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
rack-obama (1.0) rack-obama (1.0)
@ -340,14 +340,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "generates a simple lockfile for a single source, gem with a version requirement" do it "generates a simple lockfile for a single source, gem with a version requirement" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama", ">= 1.0" gem "rack-obama", ">= 1.0"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
rack-obama (1.0) rack-obama (1.0)
@ -396,13 +396,13 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "generates lockfiles with multiple requirements" do it "generates lockfiles with multiple requirements" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "net-sftp" gem "net-sftp"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
net-sftp (1.1.1) net-sftp (1.1.1)
net-ssh (>= 1.0.0, < 1.99.0) net-ssh (>= 1.0.0, < 1.99.0)
@ -453,7 +453,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
build_lib "omg", :path => lib_path("omg") build_lib "omg", :path => lib_path("omg")
gemfile <<-G gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
platforms :#{not_local_tag} do platforms :#{not_local_tag} do
gem "omg", :path => "#{lib_path("omg")}" gem "omg", :path => "#{lib_path("omg")}"
@ -469,7 +469,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
specs: specs:
GEM GEM
remote: file://#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -640,7 +640,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
bar = build_git "bar" bar = build_git "bar"
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
gem "foo", :path => "#{lib_path("foo-1.0")}" gem "foo", :path => "#{lib_path("foo-1.0")}"
@ -660,7 +660,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
foo (1.0) foo (1.0)
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -679,7 +679,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "lists gems alphabetically" do it "lists gems alphabetically" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "thin" gem "thin"
gem "actionpack" gem "actionpack"
@ -688,7 +688,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
actionpack (2.3.2) actionpack (2.3.2)
activesupport (= 2.3.2) activesupport (= 2.3.2)
@ -714,14 +714,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "orders dependencies' dependencies in alphabetical order" do it "orders dependencies' dependencies in alphabetical order" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rails" gem "rails"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
actionmailer (2.3.2) actionmailer (2.3.2)
activesupport (= 2.3.2) activesupport (= 2.3.2)
@ -753,13 +753,13 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "orders dependencies by version" do it "orders dependencies by version" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem 'double_deps' gem 'double_deps'
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
double_deps (1.0) double_deps (1.0)
net-ssh net-ssh
@ -779,14 +779,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add the :require option to the lockfile" do it "does not add the :require option to the lockfile" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama", ">= 1.0", :require => "rack/obama" gem "rack-obama", ">= 1.0", :require => "rack/obama"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
rack-obama (1.0) rack-obama (1.0)
@ -805,14 +805,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add the :group option to the lockfile" do it "does not add the :group option to the lockfile" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack-obama", ">= 1.0", :group => :test gem "rack-obama", ">= 1.0", :group => :test
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
rack-obama (1.0) rack-obama (1.0)
@ -943,7 +943,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "keeps existing platforms in the lockfile" do it "keeps existing platforms in the lockfile" do
lockfile <<-G lockfile <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -958,7 +958,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
G G
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
@ -967,7 +967,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -991,13 +991,13 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
simulate_platform "universal-java-16" simulate_platform "universal-java-16"
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "platform_specific" gem "platform_specific"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
platform_specific (1.0-java) platform_specific (1.0-java)
@ -1014,19 +1014,19 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add duplicate gems" do it "does not add duplicate gems" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
gem "activesupport" gem "activesupport"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
activesupport (2.3.5) activesupport (2.3.5)
rack (1.0.0) rack (1.0.0)
@ -1045,14 +1045,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add duplicate dependencies" do it "does not add duplicate dependencies" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
gem "rack" gem "rack"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -1069,14 +1069,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add duplicate dependencies with versions" do it "does not add duplicate dependencies with versions" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack", "1.0" gem "rack", "1.0"
gem "rack", "1.0" gem "rack", "1.0"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -1093,14 +1093,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "does not add duplicate dependencies in different groups" do it "does not add duplicate dependencies in different groups" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack", "1.0", :group => :one gem "rack", "1.0", :group => :one
gem "rack", "1.0", :group => :two gem "rack", "1.0", :group => :two
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -1117,7 +1117,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "raises if two different versions are used" do it "raises if two different versions are used" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack", "1.0" gem "rack", "1.0"
gem "rack", "1.1" gem "rack", "1.1"
G G
@ -1128,7 +1128,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "raises if two different sources are used" do it "raises if two different sources are used" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
gem "rack", :git => "git://hubz.com" gem "rack", :git => "git://hubz.com"
G G
@ -1139,13 +1139,13 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "works correctly with multiple version dependencies" do it "works correctly with multiple version dependencies" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack", "> 0.9", "< 1.0" gem "rack", "> 0.9", "< 1.0"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (0.9.1) rack (0.9.1)
@ -1162,14 +1162,14 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "captures the Ruby version in the lockfile" do it "captures the Ruby version in the lockfile" do
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
ruby '#{RUBY_VERSION}' ruby '#{RUBY_VERSION}'
gem "rack", "> 0.9", "< 1.0" gem "rack", "> 0.9", "< 1.0"
G G
lockfile_should_be <<-G lockfile_should_be <<-G
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (0.9.1) rack (0.9.1)
@ -1198,7 +1198,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
revision = revision_for(lib_path("omg")) revision = revision_for(lib_path("omg"))
gemfile <<-G gemfile <<-G
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "omg", :git => "#{lib_path("omg")}", :branch => 'master' gem "omg", :git => "#{lib_path("omg")}", :branch => 'master'
G G
@ -1222,7 +1222,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
omg (1.0) omg (1.0)
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
PLATFORMS PLATFORMS
@ -1249,7 +1249,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
omg (1.0) omg (1.0)
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
PLATFORMS PLATFORMS
@ -1266,7 +1266,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "raises a helpful error message when the lockfile is missing deps" do it "raises a helpful error message when the lockfile is missing deps" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack_middleware (1.0) rack_middleware (1.0)
@ -1295,7 +1295,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
build_repo2 build_repo2
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
gem "rack" gem "rack"
G G
set_lockfile_mtime_to_known_value set_lockfile_mtime_to_known_value
@ -1357,7 +1357,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
it "refuses to install if Gemfile.lock contains conflict markers" do it "refuses to install if Gemfile.lock contains conflict markers" do
lockfile <<-L lockfile <<-L
GEM GEM
remote: file://#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
<<<<<<< <<<<<<<
rack (1.0.0) rack (1.0.0)
@ -1376,7 +1376,7 @@ RSpec.describe "the lockfile format", :bundler => "< 2" do
L L
install_gemfile(<<-G) install_gemfile(<<-G)
source "file://#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G

View file

@ -52,7 +52,7 @@ RSpec.describe "real source plugins" do
build_lib "a-path-gem" build_lib "a-path-gem"
gemfile <<-G gemfile <<-G
source "file://#{gem_repo2}" # plugin source source "file://localhost#{gem_repo2}" # plugin source
source "#{lib_path("a-path-gem-1.0")}", :type => :mpath do source "#{lib_path("a-path-gem-1.0")}", :type => :mpath do
gem "a-path-gem" gem "a-path-gem"
end end
@ -78,7 +78,7 @@ RSpec.describe "real source plugins" do
a-path-gem (1.0) a-path-gem (1.0)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
PLATFORMS PLATFORMS
@ -346,7 +346,7 @@ RSpec.describe "real source plugins" do
build_git "ma-gitp-gem" build_git "ma-gitp-gem"
gemfile <<-G gemfile <<-G
source "file://#{gem_repo2}" # plugin source source "file://localhost#{gem_repo2}" # plugin source
source "file://#{lib_path("ma-gitp-gem-1.0")}", :type => :gitp do source "file://#{lib_path("ma-gitp-gem-1.0")}", :type => :gitp do
gem "ma-gitp-gem" gem "ma-gitp-gem"
end end
@ -372,7 +372,7 @@ RSpec.describe "real source plugins" do
ma-gitp-gem (1.0) ma-gitp-gem (1.0)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
PLATFORMS PLATFORMS

View file

@ -1145,7 +1145,7 @@ end
def lock_with(ruby_version = nil) def lock_with(ruby_version = nil)
lock = <<-L lock = <<-L
GEM GEM
remote: file:#{gem_repo1}/ remote: file://localhost#{gem_repo1}/
specs: specs:
rack (1.0.0) rack (1.0.0)
@ -1172,7 +1172,7 @@ end
before do before do
install_gemfile <<-G install_gemfile <<-G
ruby ">= 0" ruby ">= 0"
source "file:#{gem_repo1}" source "file://localhost#{gem_repo1}"
gem "rack" gem "rack"
G G
lockfile lock_with(ruby_version) lockfile lock_with(ruby_version)

View file

@ -291,7 +291,7 @@ RSpec.describe "bundle update" do
@git = build_git "foo", :path => lib_path("bar") @git = build_git "foo", :path => lib_path("bar")
install_gemfile <<-G install_gemfile <<-G
source "file://#{gem_repo2}" source "file://localhost#{gem_repo2}"
git "#{lib_path("bar")}" do git "#{lib_path("bar")}" do
gem 'foo' gem 'foo'
end end
@ -319,7 +319,7 @@ RSpec.describe "bundle update" do
foo (2.0) foo (2.0)
GEM GEM
remote: file:#{gem_repo2}/ remote: file://localhost#{gem_repo2}/
specs: specs:
rack (1.0.0) rack (1.0.0)