summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-05-06 18:06:21 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-06-11 12:36:19 +0200
commit5946d62ad03c57271ccb037680382b1db9fc2e65 (patch)
tree31be4479c7d942243440b378c054ef6d4308e398 /spec/commands/update_spec.rb
parente6fd423bbdf6fc2aa1032a5e35df7b4079c45ddd (diff)
downloadbundler-5946d62ad03c57271ccb037680382b1db9fc2e65.tar.gz
Normalize file:// handling in specs
Diffstat (limited to 'spec/commands/update_spec.rb')
-rw-r--r--spec/commands/update_spec.rb72
1 files changed, 36 insertions, 36 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index 61a5a1d1f1..a0c7e33299 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -5,7 +5,7 @@ RSpec.describe "bundle update" do
build_repo2
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
gem "rack-obama"
gem "platform_specific"
@@ -25,7 +25,7 @@ RSpec.describe "bundle update" do
it "doesn't delete the Gemfile.lock file if something goes wrong" do
gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
gem "rack-obama"
exit!
@@ -48,7 +48,7 @@ RSpec.describe "bundle update" do
it "doesn't delete the Gemfile.lock file if something goes wrong" do
gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
gem "rack-obama"
exit!
@@ -61,7 +61,7 @@ RSpec.describe "bundle update" do
describe "with --gemfile" do
it "creates lock files based on the Gemfile name" do
gemfile bundled_app("OmgFile"), <<-G
- source "file://#{gem_repo1}"
+ source "#{file_uri_for(gem_repo1)}"
gem "rack", "1.0"
G
@@ -154,7 +154,7 @@ RSpec.describe "bundle update" do
end
install_gemfile! <<-G
- source "file:#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "slim-rails"
gem "slim_lint"
G
@@ -180,7 +180,7 @@ RSpec.describe "bundle update" do
end
install_gemfile! <<-G
- source "file:#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "a"
gem "b"
G
@@ -188,7 +188,7 @@ RSpec.describe "bundle update" do
expect(the_bundle).to include_gems("a 1.0", "b 2.0")
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "a"
gem "b", "1.0"
G
@@ -212,7 +212,7 @@ RSpec.describe "bundle update" do
describe "with --group option" do
it "should update only specified group gems" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport", :group => :development
gem "rack"
G
@@ -227,7 +227,7 @@ RSpec.describe "bundle update" do
context "when conservatively updating a group with non-group sub-deps" do
it "should update only specified group gems" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activemerchant", :group => :development
gem "activesupport"
G
@@ -245,7 +245,7 @@ RSpec.describe "bundle update" do
before :each do
build_git "foo", :path => lib_path("activesupport")
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport", :group => :development
gem "foo", :git => "#{lib_path("activesupport")}"
G
@@ -264,7 +264,7 @@ RSpec.describe "bundle update" do
context "when bundler itself is a transitive dependency" do
it "executes without error" do
install_gemfile <<-G
- source "file://#{gem_repo1}"
+ source "#{file_uri_for(gem_repo1)}"
gem "activesupport", :group => :development
gem "rack"
G
@@ -307,7 +307,7 @@ RSpec.describe "bundle update" do
describe "with --source option" do
it "should not update gems not included in the source that happen to have the same name", :bundler => "< 3" do
install_gemfile! <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
update_repo2 { build_gem "activesupport", "3.0" }
@@ -318,7 +318,7 @@ RSpec.describe "bundle update" do
it "should not update gems not included in the source that happen to have the same name", :bundler => "3" do
install_gemfile! <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
update_repo2 { build_gem "activesupport", "3.0" }
@@ -332,7 +332,7 @@ RSpec.describe "bundle update" do
it "should not update gems not included in the source that happen to have the same name" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
update_repo2 { build_gem "activesupport", "3.0" }
@@ -353,7 +353,7 @@ RSpec.describe "bundle update" do
end
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "harry"
gem "fred"
G
@@ -398,7 +398,7 @@ RSpec.describe "bundle update" do
end
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "harry"
gem "fred"
G
@@ -439,7 +439,7 @@ RSpec.describe "bundle update in more complicated situations" do
it "will eagerly unlock dependencies of a specified gem" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "thin"
gem "rack-obama"
@@ -457,7 +457,7 @@ RSpec.describe "bundle update in more complicated situations" do
it "will warn when some explicitly updated gems are not updated" do
install_gemfile! <<-G
- source "file:#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "thin"
gem "rack-obama"
@@ -497,7 +497,7 @@ RSpec.describe "bundle update in more complicated situations" do
G
gemfile <<-G
- source "file://#{gem_repo1}"
+ source "#{file_uri_for(gem_repo1)}"
gem "rack"
G
@@ -508,9 +508,9 @@ RSpec.describe "bundle update in more complicated situations" do
it "will update only from pinned source" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
- source "file://#{gem_repo1}" do
+ source "#{file_uri_for(gem_repo1)}" do
gem "thin"
end
G
@@ -533,13 +533,13 @@ RSpec.describe "bundle update in more complicated situations" do
end
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "a"
G
lockfile <<-L
GEM
- remote: file://#{gem_repo4}
+ remote: #{file_uri_for(gem_repo4)}
specs:
a (0.9-java)
@@ -572,13 +572,13 @@ RSpec.describe "bundle update in more complicated situations" do
end
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "a", platform: :jruby
G
lockfile <<-L
GEM
- remote: file://#{gem_repo4}
+ remote: #{file_uri_for(gem_repo4)}
specs:
a (0.9-java)
@@ -605,7 +605,7 @@ RSpec.describe "bundle update without a Gemfile.lock" do
build_repo2
gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "rack", "1.0"
G
@@ -625,7 +625,7 @@ RSpec.describe "bundle update when a gem depends on a newer version of bundler"
end
gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "rails", "3.0.1"
G
end
@@ -650,7 +650,7 @@ RSpec.describe "bundle update" do
build_repo2
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
@@ -675,7 +675,7 @@ RSpec.describe "bundle update" do
end
install_gemfile! <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "bar"
gem "foo"
G
@@ -702,7 +702,7 @@ RSpec.describe "bundle update" do
it "shows error message when Gemfile.lock is not preset and gem is specified" do
install_gemfile <<-G
- source "file://#{gem_repo2}"
+ source "#{file_uri_for(gem_repo2)}"
gem "activesupport"
G
@@ -828,7 +828,7 @@ RSpec.describe "bundle update --bundler" do
end
install_gemfile! <<-G
- source "file:#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem "rack"
G
lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, '\11.0.0\2')
@@ -862,7 +862,7 @@ RSpec.describe "bundle update conservative" do
# establish a lockfile set to 1.4.3
install_gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem 'foo', '1.4.3'
gem 'bar', '2.0.3'
gem 'qux', '1.0.0'
@@ -871,7 +871,7 @@ RSpec.describe "bundle update conservative" do
# remove 1.4.3 requirement and bar altogether
# to setup update specs below
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem 'foo'
gem 'qux'
G
@@ -941,7 +941,7 @@ RSpec.describe "bundle update conservative" do
end
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem 'isolated_owner'
gem 'shared_owner_a'
@@ -950,7 +950,7 @@ RSpec.describe "bundle update conservative" do
lockfile <<-L
GEM
- remote: file://#{gem_repo4}
+ remote: #{file_uri_for(gem_repo4)}
specs:
isolated_dep (2.0.1)
isolated_owner (1.0.1)
@@ -994,7 +994,7 @@ RSpec.describe "bundle update conservative" do
it "should match bundle install conservative update behavior when not eagerly unlocking" do
gemfile <<-G
- source "file://#{gem_repo4}"
+ source "#{file_uri_for(gem_repo4)}"
gem 'isolated_owner', '1.0.2'
gem 'shared_owner_a', '3.0.2'