diff options
author | The Bundler Bot <bot@bundler.io> | 2017-12-28 01:47:16 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2017-12-28 01:47:16 +0000 |
commit | dba5ba731e420b961723507899a94ac3987f431b (patch) | |
tree | 30252bcc4604a5cf04417a227307ced666b97c00 | |
parent | 3f244c698d1db82d19e8cd660ae0c0f80960f8fe (diff) | |
parent | 415f95174e215508dde1d852a1b6d568728f2e95 (diff) | |
download | bundler-dba5ba731e420b961723507899a94ac3987f431b.tar.gz |
Auto merge of #6232 - bundler:fix-ruby25-failing, r=hsbt
Fix failing examples with Ruby 2.5
Followed up https://github.com/bundler/bundler/pull/6226
-rw-r--r-- | spec/bundler/definition_spec.rb | 8 | ||||
-rw-r--r-- | spec/commands/binstubs_spec.rb | 3 | ||||
-rw-r--r-- | spec/install/gemfile/sources_spec.rb | 8 | ||||
-rw-r--r-- | spec/install/gems/flex_spec.rb | 10 | ||||
-rw-r--r-- | spec/install/post_bundle_message_spec.rb | 10 | ||||
-rw-r--r-- | spec/lock/lockfile_spec.rb | 134 |
6 files changed, 87 insertions, 86 deletions
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb index 3ca0dc0f79..2ed87ec81d 100644 --- a/spec/bundler/definition_spec.rb +++ b/spec/bundler/definition_spec.rb @@ -74,7 +74,7 @@ RSpec.describe Bundler::Definition do build_lib "foo", "1.0", :path => lib_path("foo") install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "foo", :path => "#{lib_path("foo")}" G @@ -87,7 +87,7 @@ RSpec.describe Bundler::Definition do expect(out).to match(/re-resolving dependencies/) lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -152,7 +152,7 @@ RSpec.describe Bundler::Definition do end install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "foo", :path => "#{lib_path("foo")}" G @@ -161,7 +161,7 @@ RSpec.describe Bundler::Definition do expect(out).to match(/using resolution from the lockfile/) lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 24ee03ec3c..8157173b42 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -86,7 +86,8 @@ RSpec.describe "bundle binstubs <gem>" do build_repo2 do build_gem "prints_loaded_gems", "1.0" do |s| s.executables = "print_loaded_gems" - s.write "bin/print_loaded_gems", <<-R + s.bindir = "exe" + s.write "exe/print_loaded_gems", <<-R specs = Gem.loaded_specs.values.reject {|s| Bundler.rubygems.spec_default_gem?(s) } puts specs.map(&:full_name).sort.inspect R diff --git a/spec/install/gemfile/sources_spec.rb b/spec/install/gemfile/sources_spec.rb index bac0a113f9..2cadc61161 100644 --- a/spec/install/gemfile/sources_spec.rb +++ b/spec/install/gemfile/sources_spec.rb @@ -627,8 +627,8 @@ RSpec.describe "bundle install with gems on multiple sources" do end install_gemfile <<-G - source "file:#{gem_repo4}" - source "file:#{gem_repo1}" do + source "file://localhost#{gem_repo4}" + source "file://localhost#{gem_repo1}" do gem "thin" end gem "depends_on_rack" @@ -636,8 +636,8 @@ RSpec.describe "bundle install with gems on multiple sources" do expect(last_command).to be_failure expect(last_command.stderr).to eq strip_whitespace(<<-EOS).strip The gem 'rack' was found in multiple relevant sources. - * rubygems repository file:#{gem_repo1}/ or installed locally - * rubygems repository file:#{gem_repo4}/ or installed locally + * rubygems repository file://localhost#{gem_repo1}/ or installed locally + * rubygems repository file://localhost#{gem_repo4}/ or installed locally You must add this gem to the source block for the source you wish it to be installed from. EOS expect(the_bundle).not_to be_locked diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb index f8b40f8e4e..37d2e4958a 100644 --- a/spec/install/gems/flex_spec.rb +++ b/spec/install/gems/flex_spec.rb @@ -277,25 +277,25 @@ RSpec.describe "bundle flex_install" do 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}" do + source "file://localhost#{gem_repo1}" + source "file://localhost#{gem_repo2}" do end gem "rack" G lockfile_should_be <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: PLATFORMS diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb index a953847bac..53a93845c2 100644 --- a/spec/install/post_bundle_message_spec.rb +++ b/spec/install/post_bundle_message_spec.rb @@ -103,7 +103,7 @@ RSpec.describe "post bundle message" do describe "with misspelled or non-existent gem name" do it "should report a helpful error message", :bundler => "< 2" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G @@ -112,25 +112,25 @@ RSpec.describe "post bundle message" do it "should report a helpful error message", :bundler => "2" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G expect(out).to include <<-EOS.strip -Could not find gem 'not-a-gem' in rubygems repository file:#{gem_repo1}/ or installed locally. +Could not find gem 'not-a-gem' in rubygems repository file://localhost#{gem_repo1}/ or installed locally. The source does not contain any versions of 'not-a-gem' EOS end it "should report a helpful error message with reference to cache if available" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" G bundle :cache expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack" gem "not-a-gem", :group => :development G diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index b4bf81ded2..5be77de7ef 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -7,14 +7,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do 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", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -203,7 +203,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 lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -218,7 +218,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G @@ -268,7 +268,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "warns when updating bundler major version" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -284,7 +284,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do simulate_bundler_version "9999999.0.0" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G @@ -295,7 +295,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -312,14 +312,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates a simple lockfile for a single source, gem with dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -338,14 +338,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates a simple lockfile for a single source, gem with a version requirement" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -403,13 +403,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "generates lockfiles with multiple requirements" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "net-sftp" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: net-sftp (1.1.1) net-ssh (>= 1.0.0, < 1.99.0) @@ -488,7 +488,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do build_lib "omg", :path => lib_path("omg") gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" platforms :#{not_local_tag} do gem "omg", :path => "#{lib_path("omg")}" @@ -504,7 +504,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do specs: GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}// specs: rack (1.0.0) @@ -675,7 +675,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do bar = build_git "bar" install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "foo", :path => "#{lib_path("foo-1.0")}" @@ -684,7 +684,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -714,7 +714,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "lists gems alphabetically" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "thin" gem "actionpack" @@ -723,7 +723,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: actionpack (2.3.2) activesupport (= 2.3.2) @@ -749,14 +749,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "orders dependencies' dependencies in alphabetical order" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rails" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: actionmailer (2.3.2) activesupport (= 2.3.2) @@ -788,13 +788,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "orders dependencies by version" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem 'double_deps' G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: double_deps (1.0) net-ssh @@ -814,14 +814,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add the :require option to the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0", :require => "rack/obama" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -840,14 +840,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add the :group option to the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack-obama", ">= 1.0", :group => :test G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) rack-obama (1.0) @@ -981,7 +981,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "keeps existing platforms in the lockfile" do lockfile <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -996,14 +996,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do G 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) @@ -1028,13 +1028,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do simulate_platform "universal-java-16" install_gemfile! <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" gem "platform_specific" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo2}/ + remote: file://localhost#{gem_repo2}/ specs: platform_specific (1.0-java) platform_specific (1.0-universal-java-16) @@ -1053,19 +1053,19 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate gems" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "activesupport" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: activesupport (2.3.5) rack (1.0.0) @@ -1084,14 +1084,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "rack" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1108,14 +1108,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies with versions" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0" gem "rack", "1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1132,14 +1132,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "does not add duplicate dependencies in different groups" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0", :group => :one gem "rack", "1.0", :group => :two G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (1.0.0) @@ -1156,7 +1156,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises if two different versions are used" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "1.0" gem "rack", "1.1" G @@ -1167,7 +1167,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises if two different sources are used" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" gem "rack", :git => "git://hubz.com" G @@ -1178,13 +1178,13 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "works correctly with multiple version dependencies" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack", "> 0.9", "< 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (0.9.1) @@ -1201,14 +1201,14 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "captures the Ruby version in the lockfile" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" ruby '#{RUBY_VERSION}' gem "rack", "> 0.9", "< 1.0" G lockfile_should_be <<-G GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack (0.9.1) @@ -1237,7 +1237,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do revision = revision_for(lib_path("omg")) gemfile <<-G - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "omg", :git => "#{lib_path("omg")}", :branch => 'master' G @@ -1247,7 +1247,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do # Create a Gemfile.lock that has duplicate GIT sections lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: GIT @@ -1281,7 +1281,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do # Confirm that duplicate specs do not appear expect(File.read(bundled_app("Gemfile.lock"))).to eq(strip_whitespace(<<-L)) GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: GIT @@ -1305,7 +1305,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "raises a helpful error message when the lockfile is missing deps" do lockfile <<-L GEM - remote: file:#{gem_repo1}/ + remote: file://localhost#{gem_repo1}/ specs: rack_middleware (1.0) @@ -1317,7 +1317,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile <<-G - source "file:#{gem_repo1}" + source "file://localhost#{gem_repo1}" gem "rack_middleware" G @@ -1334,7 +1334,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "file://localhost#{gem_repo2}" gem "rack" G set_lockfile_mtime_to_known_value @@ -1396,7 +1396,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do it "refuses to install if Gemfile.lock contains conflict markers" do lockfile <<-L GEM - remote: file://#{gem_repo1}/ + remote: file://localhost#{gem_repo1}// specs: <<<<<<< rack (1.0.0) @@ -1415,7 +1415,7 @@ RSpec.describe "the lockfile format", :bundler => "2" do L install_gemfile(<<-G) - source "file://#{gem_repo1}" + source "file://localhost#{gem_repo1}/" gem "rack" G |