diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-05-06 18:06:21 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-06-11 12:36:19 +0200 |
commit | 5946d62ad03c57271ccb037680382b1db9fc2e65 (patch) | |
tree | 31be4479c7d942243440b378c054ef6d4308e398 /spec/install/gems | |
parent | e6fd423bbdf6fc2aa1032a5e35df7b4079c45ddd (diff) | |
download | bundler-5946d62ad03c57271ccb037680382b1db9fc2e65.tar.gz |
Normalize file:// handling in specs
Diffstat (limited to 'spec/install/gems')
-rw-r--r-- | spec/install/gems/compact_index_spec.rb | 8 | ||||
-rw-r--r-- | spec/install/gems/dependency_api_spec.rb | 8 | ||||
-rw-r--r-- | spec/install/gems/env_spec.rb | 8 | ||||
-rw-r--r-- | spec/install/gems/flex_spec.rb | 64 | ||||
-rw-r--r-- | spec/install/gems/mirror_spec.rb | 12 | ||||
-rw-r--r-- | spec/install/gems/native_extensions_spec.rb | 2 | ||||
-rw-r--r-- | spec/install/gems/post_install_spec.rb | 20 | ||||
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 16 | ||||
-rw-r--r-- | spec/install/gems/standalone_spec.rb | 10 | ||||
-rw-r--r-- | spec/install/gems/sudo_spec.rb | 20 | ||||
-rw-r--r-- | spec/install/gems/win32_spec.rb | 4 |
11 files changed, 86 insertions, 86 deletions
diff --git a/spec/install/gems/compact_index_spec.rb b/spec/install/gems/compact_index_spec.rb index e35b630306..2c145ce643 100644 --- a/spec/install/gems/compact_index_spec.rb +++ b/spec/install/gems/compact_index_spec.rb @@ -93,7 +93,7 @@ RSpec.describe "compact index api" do gemfile <<-G source "#{source_uri}" - git "file:///#{lib_path("foo-1.0")}" do + git "#{file_uri_for(lib_path("foo-1.0"))}" do gem 'foo' end G @@ -111,7 +111,7 @@ RSpec.describe "compact index api" do gemfile <<-G source "#{source_uri}" - gem 'foo', :git => "file:///#{lib_path("foo-1.0")}" + gem 'foo', :git => "#{file_uri_for(lib_path("foo-1.0"))}" G bundle! :install, :artifice => "compact_index" @@ -125,7 +125,7 @@ RSpec.describe "compact index api" do build_git "foo" gemfile <<-G source "#{source_uri}" - gem 'foo', :git => "file:///#{lib_path("foo-1.0")}" + gem 'foo', :git => "#{file_uri_for(lib_path("foo-1.0"))}" G bundle "install", :artifice => "compact_index" @@ -623,7 +623,7 @@ The checksum of /versions does not match the checksum provided by the server! So it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index 0dc1ee87f2..a8713eb445 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -73,7 +73,7 @@ RSpec.describe "gemcutter's dependency API" do gemfile <<-G source "#{source_uri}" - git "file:///#{lib_path("foo-1.0")}" do + git "#{file_uri_for(lib_path("foo-1.0"))}" do gem 'foo' end G @@ -91,7 +91,7 @@ RSpec.describe "gemcutter's dependency API" do gemfile <<-G source "#{source_uri}" - gem 'foo', :git => "file:///#{lib_path("foo-1.0")}" + gem 'foo', :git => "#{file_uri_for(lib_path("foo-1.0"))}" G bundle :install, :artifice => "endpoint" @@ -105,7 +105,7 @@ RSpec.describe "gemcutter's dependency API" do build_git "foo" gemfile <<-G source "#{source_uri}" - gem 'foo', :git => "file:///#{lib_path("foo-1.0")}" + gem 'foo', :git => "#{file_uri_for(lib_path("foo-1.0"))}" G bundle "install", :artifice => "endpoint" @@ -597,7 +597,7 @@ RSpec.describe "gemcutter's dependency API" do it "strips http basic auth creds when warning about ambiguous sources", :bundler => "< 3" do gemfile <<-G source "#{basic_auth_source_uri}" - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/install/gems/env_spec.rb b/spec/install/gems/env_spec.rb index 0dccbbfd24..a6dfadcfc8 100644 --- a/spec/install/gems/env_spec.rb +++ b/spec/install/gems/env_spec.rb @@ -4,7 +4,7 @@ RSpec.describe "bundle install with ENV conditionals" do describe "when just setting an ENV key as a string" do before :each do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" env "BUNDLER_TEST" do gem "rack" @@ -27,7 +27,7 @@ RSpec.describe "bundle install with ENV conditionals" do describe "when just setting an ENV key as a symbol" do before :each do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" env :BUNDLER_TEST do gem "rack" @@ -50,7 +50,7 @@ RSpec.describe "bundle install with ENV conditionals" do describe "when setting a string to match the env" do before :each do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" env "BUNDLER_TEST" => "foo" do gem "rack" @@ -79,7 +79,7 @@ RSpec.describe "bundle install with ENV conditionals" do describe "when setting a regex to match the env" do before :each do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" env "BUNDLER_TEST" => /foo/ do gem "rack" diff --git a/spec/install/gems/flex_spec.rb b/spec/install/gems/flex_spec.rb index d15841124a..65116addb5 100644 --- a/spec/install/gems/flex_spec.rb +++ b/spec/install/gems/flex_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "bundle flex_install" do it "installs the gems as expected" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'rack' G @@ -13,7 +13,7 @@ RSpec.describe "bundle flex_install" do it "installs even when the lockfile is invalid" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'rack' G @@ -21,7 +21,7 @@ RSpec.describe "bundle flex_install" do expect(the_bundle).to be_locked gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'rack', '1.0' G @@ -34,7 +34,7 @@ RSpec.describe "bundle flex_install" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack-obama" G @@ -42,7 +42,7 @@ RSpec.describe "bundle flex_install" do update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack-obama", "1.0" G @@ -54,14 +54,14 @@ RSpec.describe "bundle flex_install" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' G update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' gem 'activesupport', '2.3.5' G @@ -73,14 +73,14 @@ RSpec.describe "bundle flex_install" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack-obama" G update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack-obama" gem "thin" G @@ -93,7 +93,7 @@ RSpec.describe "bundle flex_install" do it "removes gems without changing the versions of remaining gems" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' gem 'activesupport', '2.3.5' G @@ -101,7 +101,7 @@ RSpec.describe "bundle flex_install" do update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' G @@ -109,7 +109,7 @@ RSpec.describe "bundle flex_install" do expect(the_bundle).not_to include_gems "activesupport 2.3.5" install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' gem 'activesupport', '2.3.2' G @@ -120,7 +120,7 @@ RSpec.describe "bundle flex_install" do it "removes top level dependencies when removed from the Gemfile while leaving other dependencies intact" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' gem 'activesupport', '2.3.5' G @@ -128,7 +128,7 @@ RSpec.describe "bundle flex_install" do update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack' G @@ -138,7 +138,7 @@ RSpec.describe "bundle flex_install" do it "removes child dependencies" do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'rack-obama' gem 'activesupport' G @@ -147,7 +147,7 @@ RSpec.describe "bundle flex_install" do update_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'activesupport' G @@ -160,7 +160,7 @@ RSpec.describe "bundle flex_install" do before(:each) do build_repo2 install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack_middleware" G @@ -177,7 +177,7 @@ RSpec.describe "bundle flex_install" do end gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack-obama", "2.0" gem "rack_middleware" G @@ -216,13 +216,13 @@ RSpec.describe "bundle flex_install" do describe "subtler cases" do before :each do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" gem "rack-obama" G gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", "0.9.1" gem "rack-obama" G @@ -247,19 +247,19 @@ RSpec.describe "bundle flex_install" do it "updates the lockfile", :bundler => "< 3" do build_repo2 install_gemfile! <<-G - source "file://localhost#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G install_gemfile! <<-G - source "file://localhost#{gem_repo1}" - source "file://localhost#{gem_repo2}" + source "#{file_uri_for(gem_repo1)}" + source "#{file_uri_for(gem_repo2)}" gem "rack" G lockfile_should_be <<-L GEM - remote: file://localhost#{gem_repo1}/ - remote: file://localhost#{gem_repo2}/ + remote: #{file_uri_for(gem_repo1)}/ + remote: #{file_uri_for(gem_repo2)}/ specs: rack (1.0.0) @@ -277,25 +277,25 @@ RSpec.describe "bundle flex_install" do it "updates the lockfile", :bundler => "3" do build_repo2 install_gemfile! <<-G - source "file://localhost#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G install_gemfile! <<-G - source "file://localhost#{gem_repo1}" - source "file://localhost#{gem_repo2}" do + source "#{file_uri_for(gem_repo1)}" + source "#{file_uri_for(gem_repo2)}" do end gem "rack" G lockfile_should_be <<-L GEM - remote: file://localhost#{gem_repo1}/ + remote: #{file_uri_for(gem_repo1)}/ specs: rack (1.0.0) GEM - remote: file://localhost#{gem_repo2}/ + remote: #{file_uri_for(gem_repo2)}/ specs: PLATFORMS @@ -333,14 +333,14 @@ RSpec.describe "bundle flex_install" do it "prints the correct error message" do # install Rails 3.0.0.rc install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rails", "3.0.0.rc4" gem "capybara", "0.3.9" G # upgrade Rails to 3.0.0 and then install again install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rails", "3.0.0" gem "capybara", "0.3.9" G diff --git a/spec/install/gems/mirror_spec.rb b/spec/install/gems/mirror_spec.rb index ffa6116127..9611973701 100644 --- a/spec/install/gems/mirror_spec.rb +++ b/spec/install/gems/mirror_spec.rb @@ -4,7 +4,7 @@ RSpec.describe "bundle install with a mirror configured" do describe "when the mirror does not match the gem source" do before :each do gemfile <<-G - source "file://localhost#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -13,7 +13,7 @@ RSpec.describe "bundle install with a mirror configured" do it "installs from the normal location" do bundle :install - expect(out).to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo1}")) + expect(out).to include("Fetching source index from #{file_uri_for(gem_repo1)}") expect(the_bundle).to include_gems "rack 1.0" end end @@ -22,17 +22,17 @@ RSpec.describe "bundle install with a mirror configured" do before :each do gemfile <<-G # This source is bogus and doesn't have the gem we're looking for - source "file://localhost#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "rack" G - bundle "config set --local mirror.file://localhost#{gem_repo2} file://localhost#{gem_repo1}" + bundle "config set --local mirror.#{file_uri_for(gem_repo2)} #{file_uri_for(gem_repo1)}" end it "installs the gem from the mirror" do bundle :install - expect(out).to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo1}")) - expect(out).not_to include(normalize_uri_file("Fetching source index from file://localhost#{gem_repo2}")) + expect(out).to include("Fetching source index from #{file_uri_for(gem_repo1)}") + expect(out).not_to include("Fetching source index from #{file_uri_for(gem_repo2)}") expect(the_bundle).to include_gems "rack 1.0" end end diff --git a/spec/install/gems/native_extensions_spec.rb b/spec/install/gems/native_extensions_spec.rb index 9176a07084..3e59a3cebd 100644 --- a/spec/install/gems/native_extensions_spec.rb +++ b/spec/install/gems/native_extensions_spec.rb @@ -33,7 +33,7 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do end gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "c_extension" G diff --git a/spec/install/gems/post_install_spec.rb b/spec/install/gems/post_install_spec.rb index a6894fbc14..3f6d7ce42c 100644 --- a/spec/install/gems/post_install_spec.rb +++ b/spec/install/gems/post_install_spec.rb @@ -5,7 +5,7 @@ RSpec.describe "bundle install" do context "when gems include post install messages" do it "should display the post-install messages after installing" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'rack' gem 'thin' gem 'rack-obama' @@ -24,7 +24,7 @@ RSpec.describe "bundle install" do context "when gems do not include post install messages" do it "should not display any post-install messages" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "activesupport" G @@ -36,7 +36,7 @@ RSpec.describe "bundle install" do context "when a dependecy includes a post install message" do it "should display the post install message" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'rack_middleware' G @@ -54,7 +54,7 @@ RSpec.describe "bundle install" do s.post_install_message = "Foo's post install message" end gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'foo', :git => '#{lib_path("foo-1.0")}' G @@ -68,7 +68,7 @@ RSpec.describe "bundle install" do s.post_install_message = "Foo's post install message" end gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'foo', :git => '#{lib_path("foo-1.0")}' G bundle :install @@ -77,7 +77,7 @@ RSpec.describe "bundle install" do s.post_install_message = "Foo's 1.1 post install message" end gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'foo', :git => '#{lib_path("foo-1.1")}' G bundle :install @@ -91,7 +91,7 @@ RSpec.describe "bundle install" do s.post_install_message = "Foo's post install message" end gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'foo', :git => '#{lib_path("foo-1.0")}' G @@ -110,7 +110,7 @@ RSpec.describe "bundle install" do s.post_install_message = nil end gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem 'foo', :git => '#{lib_path("foo-1.0")}' G @@ -123,7 +123,7 @@ RSpec.describe "bundle install" do context "when ignore post-install messages for gem is set" do it "doesn't display any post-install messages" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -137,7 +137,7 @@ RSpec.describe "bundle install" do context "when ignore post-install messages for all gems" do it "doesn't display any post-install messages" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 7bab676cea..f245b7fc29 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "bundle install with install-time dependencies" do it "installs gems with implicit rake dependencies", :ruby_repo do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "with_implicit_rake_dep" gem "another_implicit_rake_dep" gem "rake" @@ -31,7 +31,7 @@ RSpec.describe "bundle install with install-time dependencies" do end install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem "actionpack", "2.3.2" G @@ -41,7 +41,7 @@ RSpec.describe "bundle install with install-time dependencies" do describe "with crazy rubygem plugin stuff" do it "installs plugins" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "net_b" G @@ -50,7 +50,7 @@ RSpec.describe "bundle install with install-time dependencies" do it "installs plugins depended on by other plugins", :ruby_repo do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "net_a" G @@ -59,7 +59,7 @@ RSpec.describe "bundle install with install-time dependencies" do it "installs multiple levels of dependencies", :ruby_repo do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "net_c" gem "net_e" G @@ -70,7 +70,7 @@ RSpec.describe "bundle install with install-time dependencies" do context "with ENV['DEBUG_RESOLVER'] set" do it "produces debug output" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "net_c" gem "net_e" G @@ -84,7 +84,7 @@ RSpec.describe "bundle install with install-time dependencies" do context "with ENV['DEBUG_RESOLVER_TREE'] set" do it "produces debug output" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "net_c" gem "net_e" G @@ -203,7 +203,7 @@ RSpec.describe "bundle install with install-time dependencies" do end install_gemfile <<-G - source "file://#{gem_repo2}" + source "#{file_uri_for(gem_repo2)}" gem 'require_rubygems' G diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb index 68796977a4..f1d5c8b505 100644 --- a/spec/install/gems/standalone_spec.rb +++ b/spec/install/gems/standalone_spec.rb @@ -51,7 +51,7 @@ RSpec.shared_examples "bundle install --standalone" do describe "with simple gems" do before do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rails" G bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true) @@ -70,7 +70,7 @@ RSpec.shared_examples "bundle install --standalone" do describe "with gems with native extension", :ruby_repo do before do install_gemfile <<-G, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true) - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "very_simple_binary" G end @@ -118,7 +118,7 @@ RSpec.shared_examples "bundle install --standalone" do build_git "devise", "1.0" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rails" gem "devise", :git => "#{lib_path("devise-1.0")}" G @@ -141,7 +141,7 @@ RSpec.shared_examples "bundle install --standalone" do build_git "devise", "1.0" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rails" group :test do @@ -276,7 +276,7 @@ RSpec.shared_examples "bundle install --standalone" do describe "with --binstubs", :bundler => "< 3" do before do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rails" G bundle! :install, forgotten_command_line_options(:path => bundled_app("bundle")).merge(:standalone => true, :binstubs => true) diff --git a/spec/install/gems/sudo_spec.rb b/spec/install/gems/sudo_spec.rb index 0d2d6b7eb4..fcafe4a907 100644 --- a/spec/install/gems/sudo_spec.rb +++ b/spec/install/gems/sudo_spec.rb @@ -19,7 +19,7 @@ RSpec.describe "when using sudo", :sudo => true do it "installs" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -38,7 +38,7 @@ RSpec.describe "when using sudo", :sudo => true do it "installs" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", '1.0' gem "thin" G @@ -50,7 +50,7 @@ RSpec.describe "when using sudo", :sudo => true do it "installs rake and a gem dependent on rake in the same session" do gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rake" gem "another_implicit_rake_dep" G @@ -65,7 +65,7 @@ RSpec.describe "when using sudo", :sudo => true do ENV["BUNDLE_PATH"] = bundle_path.to_s install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", '1.0' G @@ -82,7 +82,7 @@ RSpec.describe "when using sudo", :sudo => true do ENV["BUNDLE_PATH"] = bundle_path.to_s install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", '1.0' G @@ -93,7 +93,7 @@ RSpec.describe "when using sudo", :sudo => true do it "installs extensions/" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "very_simple_binary" G @@ -114,7 +114,7 @@ RSpec.describe "when using sudo", :sudo => true do it "installs" do install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", '1.0' G @@ -129,7 +129,7 @@ RSpec.describe "when using sudo", :sudo => true do end install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G tmpdirs = Dir.glob("#{Dir.tmpdir}/bundler*") @@ -146,7 +146,7 @@ RSpec.describe "when using sudo", :sudo => true do sudo "chmod ugo-w #{gem_home}" gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack", '1.0' G @@ -162,7 +162,7 @@ RSpec.describe "when using sudo", :sudo => true do let(:warning) { "Don't run Bundler as root." } before do - gemfile %(source "file://#{gem_repo1}") + gemfile %(source "#{file_uri_for(gem_repo1)}") end it "warns against that" do diff --git a/spec/install/gems/win32_spec.rb b/spec/install/gems/win32_spec.rb index ad758b94fa..01edcca803 100644 --- a/spec/install/gems/win32_spec.rb +++ b/spec/install/gems/win32_spec.rb @@ -4,7 +4,7 @@ RSpec.describe "bundle install with win32-generated lockfile" do it "should read lockfile" do File.open(bundled_app("Gemfile.lock"), "wb") do |f| f << "GEM\r\n" - f << " remote: file:#{gem_repo1}/\r\n" + f << " remote: #{file_uri_for(gem_repo1)}/\r\n" f << " specs:\r\n" f << "\r\n" f << " rack (1.0.0)\r\n" @@ -17,7 +17,7 @@ RSpec.describe "bundle install with win32-generated lockfile" do end install_gemfile <<-G - source "file://#{gem_repo1}" + source "#{file_uri_for(gem_repo1)}" gem "rack" G |