ruby-changes:48952
From: hsbt <ko1@a...>
Date: Thu, 7 Dec 2017 17:09:01 +0900 (JST)
Subject: [ruby-changes:48952] hsbt:r61071 (trunk): Follow up r60970 for bundler's examples.
hsbt 2017-12-07 17:08:56 +0900 (Thu, 07 Dec 2017) New Revision: 61071 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61071 Log: 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. Modified files: trunk/spec/bundler/bundler/definition_spec.rb trunk/spec/bundler/commands/lock_spec.rb trunk/spec/bundler/install/gemfile/gemspec_spec.rb trunk/spec/bundler/install/gemfile/sources_spec.rb trunk/spec/bundler/install/gems/flex_spec.rb trunk/spec/bundler/install/gems/mirror_spec.rb trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb trunk/spec/bundler/plugins/source/example_spec.rb trunk/spec/bundler/runtime/setup_spec.rb trunk/spec/bundler/update/git_spec.rb Index: spec/bundler/commands/lock_spec.rb =================================================================== --- spec/bundler/commands/lock_spec.rb (revision 61070) +++ spec/bundler/commands/lock_spec.rb (revision 61071) @@ -13,7 +13,7 @@ RSpec.describe "bundle lock" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/lock_spec.rb#L13 before :each do gemfile <<-G - source "file://#{repo}" + source "file://localhost#{repo}" gem "rails" gem "with_license" gem "foo" @@ -21,7 +21,7 @@ RSpec.describe "bundle lock" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/lock_spec.rb#L21 @lockfile = strip_lockfile <<-L GEM - remote: file:#{repo}/ + remote: file://localhost#{repo}/ specs: actionmailer (2.3.2) activesupport (= 2.3.2) @@ -228,7 +228,7 @@ RSpec.describe "bundle lock" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/lock_spec.rb#L228 end gemfile <<-G - source "file:#{gem_repo4}" + source "file://localhost#{gem_repo4}" gem "mixlib-shellout" gem "gssapi" @@ -238,7 +238,7 @@ RSpec.describe "bundle lock" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/lock_spec.rb#L238 expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G)) GEM - remote: file:#{gem_repo4}/ + remote: file://localhost#{gem_repo4}/ specs: ffi (1.9.14-x86-mingw32) gssapi (1.2.0) @@ -263,7 +263,7 @@ RSpec.describe "bundle lock" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/lock_spec.rb#L263 expect(the_bundle.lockfile).to read_as(strip_whitespace(<<-G)) GEM - remote: file:#{gem_repo4}/ + remote: file://localhost#{gem_repo4}/ specs: ffi (1.9.14) ffi (1.9.14-x86-mingw32) Index: spec/bundler/plugins/source/example_spec.rb =================================================================== --- spec/bundler/plugins/source/example_spec.rb (revision 61070) +++ spec/bundler/plugins/source/example_spec.rb (revision 61071) @@ -52,7 +52,7 @@ RSpec.describe "real source plugins" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/source/example_spec.rb#L52 build_lib "a-path-gem" 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 gem "a-path-gem" end @@ -78,7 +78,7 @@ RSpec.describe "real source plugins" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/source/example_spec.rb#L78 a-path-gem (1.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: PLATFORMS @@ -346,7 +346,7 @@ RSpec.describe "real source plugins" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/source/example_spec.rb#L346 build_git "ma-gitp-gem" 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 gem "ma-gitp-gem" end @@ -372,7 +372,7 @@ RSpec.describe "real source plugins" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/source/example_spec.rb#L372 ma-gitp-gem (1.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: PLATFORMS Index: spec/bundler/update/git_spec.rb =================================================================== --- spec/bundler/update/git_spec.rb (revision 61070) +++ spec/bundler/update/git_spec.rb (revision 61071) @@ -291,7 +291,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/update/git_spec.rb#L291 @git = build_git "foo", :path => lib_path("bar") install_gemfile <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" git "#{lib_path("bar")}" do gem 'foo' end @@ -319,7 +319,7 @@ RSpec.describe "bundle update" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/update/git_spec.rb#L319 foo (2.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: rack (1.0.0) Index: spec/bundler/runtime/setup_spec.rb =================================================================== --- spec/bundler/runtime/setup_spec.rb (revision 61070) +++ spec/bundler/runtime/setup_spec.rb (revision 61071) @@ -1145,7 +1145,7 @@ end https://github.com/ruby/ruby/blob/trunk/spec/bundler/runtime/setup_spec.rb#L1145 def lock_with(ruby_version = nil) lock = <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1172,7 +1172,7 @@ end https://github.com/ruby/ruby/blob/trunk/spec/bundler/runtime/setup_spec.rb#L1172 before do install_gemfile <<-G ruby ">= 0" - source "file:#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile lock_with(ruby_version) Index: spec/bundler/install/gems/mirror_spec.rb =================================================================== --- spec/bundler/install/gems/mirror_spec.rb (revision 61070) +++ spec/bundler/install/gems/mirror_spec.rb (revision 61071) @@ -4,7 +4,7 @@ RSpec.describe "bundle install with a mi https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/mirror_spec.rb#L4 describe "when the mirror does not match the gem source" do before :each do gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G @@ -13,7 +13,7 @@ RSpec.describe "bundle install with a mi https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/mirror_spec.rb#L13 it "installs from the normal location" do 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" end end @@ -22,17 +22,17 @@ RSpec.describe "bundle install with a mi https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/mirror_spec.rb#L22 before :each do gemfile <<-G # 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" G - bundle "config --local mirror.file://#{gem_repo2} file://#{gem_repo1}" + bundle "config --local mirror.file://localhost#{gem_repo2} file://localhost#{gem_repo1}" end it "installs the gem from the mirror" do bundle :install - expect(out).to include("Fetching source index from file:#{gem_repo1}") - expect(out).not_to include("Fetching source index from file:#{gem_repo2}") + expect(out).to include("Fetching source index from file://localhost#{gem_repo1}") + expect(out).not_to include("Fetching source index from file://localhost#{gem_repo2}") expect(the_bundle).to include_gems "rack 1.0" end end Index: spec/bundler/install/gems/flex_spec.rb =================================================================== --- spec/bundler/install/gems/flex_spec.rb (revision 61070) +++ spec/bundler/install/gems/flex_spec.rb (revision 61071) @@ -247,19 +247,19 @@ RSpec.describe "bundle flex_install" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gems/flex_spec.rb#L247 it "updates the lockfile", :bundler => "< 2" do build_repo2 install_gemfile! <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G install_gemfile! <<-G - source "file://#{gem_repo1}" - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo1}" + source "file://localhost#{gem_repo2}" gem "rack" G lockfile_should_be <<-L GEM - remote: file:#{gem_repo1}/ - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo1}/ + remote: file://localhost#{gem_repo2}/ specs: rack (1.0.0) Index: spec/bundler/install/gemfile/gemspec_spec.rb =================================================================== --- spec/bundler/install/gemfile/gemspec_spec.rb (revision 61070) +++ spec/bundler/install/gemfile/gemspec_spec.rb (revision 61071) @@ -426,7 +426,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L426 %w[ruby jruby].each do |platform| simulate_platform(platform) do install_gemfile <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" gemspec G end @@ -450,7 +450,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L450 platform_specific GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0) platform_specific (1.0-java) @@ -480,7 +480,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L480 foo (1.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0) platform_specific (1.0-java) @@ -512,7 +512,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L512 foo (1.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: indirect_platform_specific (1.0) platform_specific @@ -545,7 +545,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L545 expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" expect(lockfile).to eq strip_whitespace(<<-L) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0) platform_specific (1.0-java) @@ -576,7 +576,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L576 expect(the_bundle).to include_gems "foo 1.0", "platform_specific 1.0 RUBY" expect(lockfile).to eq strip_whitespace(<<-L) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0) platform_specific (1.0-java) @@ -608,7 +608,7 @@ RSpec.describe "bundle install from an e https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/gemspec_spec.rb#L608 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) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: indirect_platform_specific (1.0) platform_specific Index: spec/bundler/install/gemfile/sources_spec.rb =================================================================== --- spec/bundler/install/gemfile/sources_spec.rb (revision 61070) +++ spec/bundler/install/gemfile/sources_spec.rb (revision 61071) @@ -20,8 +20,8 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L20 before do gemfile <<-G - source "file://#{gem_repo3}" - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo3}" + source "file://localhost#{gem_repo1}" gem "rack-obama" gem "rack" G @@ -33,7 +33,7 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L33 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("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") end @@ -50,8 +50,8 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L50 before do gemfile <<-G - source "file://#{gem_repo3}" - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo3}" + source "file://localhost#{gem_repo1}" gem "rack-obama" gem "rack", "1.0.0" # force it to install the working version in repo1 G @@ -63,7 +63,7 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L63 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("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") end end @@ -240,9 +240,9 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L240 context "and in yet another source" do before do gemfile <<-G - source "file://#{gem_repo1}" - source "file://#{gem_repo2}" - source "file://#{gem_repo3}" do + source "file://localhost#{gem_repo1}" + source "file://localhost#{gem_repo2}" + source "file://localhost#{gem_repo3}" do gem "depends_on_rack" end G @@ -253,7 +253,7 @@ RSpec.describe "bundle install with gems https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemfile/sources_spec.rb#L253 bundle :install 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("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") end end Index: spec/bundler/lock/lockfile_bundler_1_spec.rb =================================================================== --- spec/bundler/lock/lockfile_bundler_1_spec.rb (revision 61070) +++ spec/bundler/lock/lockfile_bundler_1_spec.rb (revision 61071) @@ -7,14 +7,14 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L7 it "generates a simple lockfile for a single source, gem" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -37,7 +37,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L37 specs: GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -53,14 +53,14 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L53 L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -80,7 +80,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L80 lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -95,14 +95,14 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L95 L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -120,7 +120,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L120 it "updates the lockfile's bundler version if not present" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -132,14 +132,14 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L132 L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack", "> 0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -157,7 +157,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L157 it "outputs a warning if the current is older than lockfile's bundler version" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -173,7 +173,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L173 simulate_bundler_version "9999999.0.0" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G @@ -185,7 +185,7 @@ RSpec.describe "the lockfile format", :b https://github.com/ruby/ruby/blob/trunk/spec/bundler/lock/lockfile_bundler_1_spec.rb#L185 lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/