diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-03 20:46:03 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-18 19:14:15 +0900 |
commit | 696a50751bc3257e5a75b4f0eb89ccef7ec89363 (patch) | |
tree | 19e940b128c0a3dcdebac95ff98c217f646ae925 | |
parent | 1436b5026cd1b2ac4b428955aeadaac8e8b12b1b (diff) | |
download | ruby-696a50751bc3257e5a75b4f0eb89ccef7ec89363.tar.gz |
[rubygems/rubygems] s/install_gemfile!/install_gemfile
https://github.com/rubygems/rubygems/commit/4d1a0c465a
45 files changed, 159 insertions, 159 deletions
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb index d89ab87096..710d7637e4 100644 --- a/spec/bundler/bundler/cli_spec.rb +++ b/spec/bundler/bundler/cli_spec.rb @@ -128,12 +128,12 @@ RSpec.describe "bundle executable" do end it "doesn't print defaults" do - install_gemfile! "", :verbose => true + install_gemfile "", :verbose => true expect(out).to start_with("Running `bundle install --retry 0 --verbose` with bundler #{Bundler::VERSION}") end it "doesn't print defaults" do - install_gemfile! "", :verbose => true + install_gemfile "", :verbose => true expect(out).to start_with("Running `bundle install --retry 0 --verbose` with bundler #{Bundler::VERSION}") end end diff --git a/spec/bundler/cache/git_spec.rb b/spec/bundler/cache/git_spec.rb index b015ed8909..1cf8359312 100644 --- a/spec/bundler/cache/git_spec.rb +++ b/spec/bundler/cache/git_spec.rb @@ -54,7 +54,7 @@ RSpec.describe "bundle cache with git" do it "runs twice without exploding" do build_git "foo" - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => '#{lib_path("foo-1.0")}' G diff --git a/spec/bundler/commands/add_spec.rb b/spec/bundler/commands/add_spec.rb index fd7c637c2c..4c533652ca 100644 --- a/spec/bundler/commands/add_spec.rb +++ b/spec/bundler/commands/add_spec.rb @@ -200,7 +200,7 @@ RSpec.describe "bundle add" do describe "when a gem is added which is already specified in Gemfile with version" do it "shows an error when added with different version requirement" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rack", "1.0" G @@ -212,7 +212,7 @@ RSpec.describe "bundle add" do end it "shows error when added without version requirements" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rack", "1.0" G @@ -227,7 +227,7 @@ RSpec.describe "bundle add" do describe "when a gem is added which is already specified in Gemfile without version" do it "shows an error when added with different version requirement" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rack" G diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb index 8fb486744e..14542c6a78 100644 --- a/spec/bundler/commands/binstubs_spec.rb +++ b/spec/bundler/commands/binstubs_spec.rb @@ -44,7 +44,7 @@ RSpec.describe "bundle binstubs <gem>" do end it "allows installing all binstubs" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G @@ -109,7 +109,7 @@ RSpec.describe "bundle binstubs <gem>" do R end end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rack" gem "prints_loaded_gems" diff --git a/spec/bundler/commands/cache_spec.rb b/spec/bundler/commands/cache_spec.rb index 5eb18a120f..cbad2cee47 100644 --- a/spec/bundler/commands/cache_spec.rb +++ b/spec/bundler/commands/cache_spec.rb @@ -222,7 +222,7 @@ RSpec.describe "bundle cache" do end bundle "config --local without wo" - install_gemfile! <<-G + install_gemfile <<-G source "file:#{gem_repo1}" gem "rack" group :wo do @@ -295,7 +295,7 @@ RSpec.describe "bundle install with gem sources" do it "does not hit the remote at all" do build_repo2 - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rack" G diff --git a/spec/bundler/commands/check_spec.rb b/spec/bundler/commands/check_spec.rb index 150118ad44..334e8d6992 100644 --- a/spec/bundler/commands/check_spec.rb +++ b/spec/bundler/commands/check_spec.rb @@ -102,7 +102,7 @@ RSpec.describe "bundle check" do it "uses the without setting" do bundle "config set without foo" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" group :foo do gem "rack" @@ -207,7 +207,7 @@ RSpec.describe "bundle check" do end it "fails when there's no lock file and frozen is set" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "foo" G diff --git a/spec/bundler/commands/clean_spec.rb b/spec/bundler/commands/clean_spec.rb index 5036d8d491..3a4b638278 100644 --- a/spec/bundler/commands/clean_spec.rb +++ b/spec/bundler/commands/clean_spec.rb @@ -366,14 +366,14 @@ RSpec.describe "bundle clean" do it "does not call clean automatically when using system gems" do bundle "config set path.system true" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "thin" gem "rack" G - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" @@ -430,7 +430,7 @@ RSpec.describe "bundle clean" do it "automatically cleans when path has not been set", :bundler => "3" do build_repo2 - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "foo" diff --git a/spec/bundler/commands/doctor_spec.rb b/spec/bundler/commands/doctor_spec.rb index 0731bb08db..42e7503356 100644 --- a/spec/bundler/commands/doctor_spec.rb +++ b/spec/bundler/commands/doctor_spec.rb @@ -7,7 +7,7 @@ require "bundler/cli/doctor" RSpec.describe "bundle doctor" do before(:each) do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index f30822c955..e797acfad2 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -355,7 +355,7 @@ RSpec.describe "bundle exec" do it "raises a helpful error when exec'ing to something outside of the bundle" do bundle "config set clean false" # want to keep the rackup binstub - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "with_license" G @@ -895,7 +895,7 @@ __FILE__: #{path.to_s.inspect} skip "https://github.com/rubygems/bundler/issues/6898" if Gem.win_platform? skip "openssl isn't a default gem" if expected.empty? - install_gemfile! "" # must happen before installing the broken system gem + install_gemfile "" # must happen before installing the broken system gem build_repo4 do build_gem "openssl", openssl_version do |s| @@ -935,7 +935,7 @@ __FILE__: #{path.to_s.inspect} before do build_git "simple_git_binary", &:add_c_extension bundle "config set --local path .bundle" - install_gemfile! <<-G + install_gemfile <<-G gem "simple_git_binary", :git => '#{lib_path("simple_git_binary-1.0")}' G end diff --git a/spec/bundler/commands/info_spec.rb b/spec/bundler/commands/info_spec.rb index 2a52b5e0c0..9286e6824a 100644 --- a/spec/bundler/commands/info_spec.rb +++ b/spec/bundler/commands/info_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "bundle info" do context "with a standard Gemfile" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" gem "has_metadata" @@ -96,7 +96,7 @@ RSpec.describe "bundle info" do end it "prints out git info" do - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}" G expect(the_bundle).to include_gems "foo 1.0" @@ -111,7 +111,7 @@ RSpec.describe "bundle info" do end @revision = revision_for(lib_path("foo-1.0"))[0...6] - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}", :branch => "omg" G expect(the_bundle).to include_gems "foo 1.0.omg" @@ -122,7 +122,7 @@ RSpec.describe "bundle info" do it "doesn't print the branch when tied to a ref" do sha = revision_for(lib_path("foo-1.0")) - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}" G @@ -132,7 +132,7 @@ RSpec.describe "bundle info" do it "handles when a version is a '-' prerelease" do @git = build_git("foo", "1.0.0-beta.1", :path => lib_path("foo")) - install_gemfile! <<-G + install_gemfile <<-G gem "foo", "1.0.0-beta.1", :git => "#{lib_path("foo")}" G expect(the_bundle).to include_gems "foo 1.0.0.pre.beta.1" @@ -144,7 +144,7 @@ RSpec.describe "bundle info" do context "with a valid regexp for gem name" do it "presents alternatives", :readline do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" gem "rack-obama" @@ -157,7 +157,7 @@ RSpec.describe "bundle info" do context "with an invalid regexp for gem name" do it "does not find the gem" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index d277b8a1d7..2a9df27dd2 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -557,7 +557,7 @@ RSpec.describe "bundle install with gem sources" do context "after installing with --standalone" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/commands/pristine_spec.rb b/spec/bundler/commands/pristine_spec.rb index 4375ce93e3..20958ef338 100644 --- a/spec/bundler/commands/pristine_spec.rb +++ b/spec/bundler/commands/pristine_spec.rb @@ -18,7 +18,7 @@ RSpec.describe "bundle pristine", :ruby_repo do build_lib "bar", :path => lib_path("bar") end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "weakling" gem "very_simple_binary" diff --git a/spec/bundler/commands/show_spec.rb b/spec/bundler/commands/show_spec.rb index 177fb15c63..30e9de9686 100644 --- a/spec/bundler/commands/show_spec.rb +++ b/spec/bundler/commands/show_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do context "with a standard Gemfile" do before :each do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G @@ -94,7 +94,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do end it "prints out git info" do - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}" G expect(the_bundle).to include_gems "foo 1.0" @@ -109,7 +109,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do end @revision = revision_for(lib_path("foo-1.0"))[0...6] - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}", :branch => "omg" G expect(the_bundle).to include_gems "foo 1.0.omg" @@ -120,7 +120,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do it "doesn't print the branch when tied to a ref" do sha = revision_for(lib_path("foo-1.0")) - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}", :ref => "#{sha}" G @@ -130,7 +130,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do it "handles when a version is a '-' prerelease" do @git = build_git("foo", "1.0.0-beta.1", :path => lib_path("foo")) - install_gemfile! <<-G + install_gemfile <<-G gem "foo", "1.0.0-beta.1", :git => "#{lib_path("foo")}" G expect(the_bundle).to include_gems "foo 1.0.0.pre.beta.1" @@ -166,7 +166,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do context "with a valid regexp for gem name" do it "presents alternatives", :readline do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" gem "rack-obama" @@ -179,7 +179,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do context "with an invalid regexp for gem name" do it "does not find the gem" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" G @@ -198,7 +198,7 @@ RSpec.describe "bundle show", :bundler => "< 3" do end it "doesn't update gems to newer versions" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rails" G diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index 9a3bfd28c6..bed2f6c86c 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -75,19 +75,19 @@ RSpec.describe "bundle update" do before { bundle "config set update_requires_all_flag true" } it "errors when passed nothing" do - install_gemfile! "" + install_gemfile "" bundle :update, :raise_on_error => false expect(err).to eq("To update everything, pass the `--all` flag.") end it "errors when passed --all and another option" do - install_gemfile! "" + install_gemfile "" bundle "update --all foo", :raise_on_error => false expect(err).to eq("Cannot specify --all along with specific options.") end it "updates everything when passed --all" do - install_gemfile! "" + install_gemfile "" bundle "update --all" expect(out).to include("Bundle updated!") end @@ -153,7 +153,7 @@ RSpec.describe "bundle update" do end end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "slim-rails" gem "slim_lint" @@ -179,7 +179,7 @@ RSpec.describe "bundle update" do build_gem "b", "2.0" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "a" gem "b" @@ -306,7 +306,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 + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" G @@ -317,7 +317,7 @@ RSpec.describe "bundle update" do end it "should not update gems not included in the source that happen to have the same name", :bundler => "3" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "activesupport" G @@ -456,7 +456,7 @@ RSpec.describe "bundle update in more complicated situations" do end it "will warn when some explicitly updated gems are not updated" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "thin" @@ -476,7 +476,7 @@ RSpec.describe "bundle update in more complicated situations" do it "will not warn when an explicitly updated git gem changes sha but not version" do build_git "foo" - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => '#{lib_path("foo-1.0")}' G @@ -492,7 +492,7 @@ RSpec.describe "bundle update in more complicated situations" do it "will not warn when changing gem sources but not versions" do build_git "rack" - install_gemfile! <<-G + install_gemfile <<-G gem "rack", :git => '#{lib_path("rack-1.0")}' G @@ -674,7 +674,7 @@ RSpec.describe "bundle update" do build_gem "foo" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "bar" gem "foo" @@ -819,7 +819,7 @@ RSpec.describe "bundle update --bundler" do build_gem "rack", "1.0" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "rack" G diff --git a/spec/bundler/install/allow_offline_install_spec.rb b/spec/bundler/install/allow_offline_install_spec.rb index ec74cc7abf..d0aa4e4d9e 100644 --- a/spec/bundler/install/allow_offline_install_spec.rb +++ b/spec/bundler/install/allow_offline_install_spec.rb @@ -7,7 +7,7 @@ RSpec.describe "bundle install with :allow_offline_install" do context "with no cached data locally" do it "still installs" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "http://testgemserver.local" gem "rack-obama" G @@ -29,7 +29,7 @@ RSpec.describe "bundle install with :allow_offline_install" do system_gems ["rack-1.0.0"], :path => default_bundle_path bundle "config set clean false" - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "http://testgemserver.local" gem "rack-obama" gem "rack", "< 1.0" @@ -74,7 +74,7 @@ RSpec.describe "bundle install with :allow_offline_install" do git = build_git "a", "1.0.0", :path => lib_path("a") update_git("a", :path => git.path, :branch => "new_branch") - install_gemfile! <<-G + install_gemfile <<-G gem "a", :git => #{git.path.to_s.dump} G @@ -83,7 +83,7 @@ RSpec.describe "bundle install with :allow_offline_install" do expect(the_bundle).to be_locked break_git_remote_ops! do - install_gemfile! <<-G + install_gemfile <<-G gem "a", :git => #{git.path.to_s.dump}, :branch => "new_branch" G end diff --git a/spec/bundler/install/bundler_spec.rb b/spec/bundler/install/bundler_spec.rb index 7b5ae109f9..e5352ab6a2 100644 --- a/spec/bundler/install/bundler_spec.rb +++ b/spec/bundler/install/bundler_spec.rb @@ -132,7 +132,7 @@ RSpec.describe "bundle install" do end it "does not cause a conflict if new dependencies in the Gemfile require older dependencies than the lockfile" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem 'rails', "2.3.2" G @@ -151,7 +151,7 @@ RSpec.describe "bundle install" do system_gems "bundler-99999999.99.1" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rails", "3.0" G @@ -165,7 +165,7 @@ RSpec.describe "bundle install" do system_gems "bundler-99999999.99.1" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "rails", "3.0" G @@ -184,7 +184,7 @@ RSpec.describe "bundle install" do end end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "requires_nonexistant_bundler" G diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb index 8c23548acd..a89dc0f858 100644 --- a/spec/bundler/install/deploy_spec.rb +++ b/spec/bundler/install/deploy_spec.rb @@ -97,7 +97,7 @@ RSpec.describe "install in deployment or frozen mode" do end it "works with sources given by a block" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" do gem "rack" end @@ -226,7 +226,7 @@ RSpec.describe "install in deployment or frozen mode" do it "works if a path gem is missing but is in a without group" do build_lib "path_gem" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rake" gem "path_gem", :path => "#{lib_path("path_gem-1.0")}", :group => :development @@ -244,7 +244,7 @@ RSpec.describe "install in deployment or frozen mode" do it "explodes if a path gem is missing" do build_lib "path_gem" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rake" gem "path_gem", :path => "#{lib_path("path_gem-1.0")}", :group => :development @@ -418,7 +418,7 @@ You have deleted from the Gemfile: context "with path in Gemfile and packed" do it "works fine after bundle package and bundle install --local" do build_lib "foo", :path => lib_path("foo") - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :path => "#{lib_path("foo")}" G diff --git a/spec/bundler/install/gemfile/eval_gemfile_spec.rb b/spec/bundler/install/gemfile/eval_gemfile_spec.rb index 405837c686..c42ae7ef79 100644 --- a/spec/bundler/install/gemfile/eval_gemfile_spec.rb +++ b/spec/bundler/install/gemfile/eval_gemfile_spec.rb @@ -75,7 +75,7 @@ RSpec.describe "bundle install with gemfile that uses eval_gemfile" do source "#{file_uri_for(gem_repo1)}" eval_gemfile "other/Gemfile" G - install_gemfile! "eval_gemfile File.expand_path('Gemfile-alt')" + install_gemfile "eval_gemfile File.expand_path('Gemfile-alt')" expect(the_bundle).to include_gem "rack 1.0.0" end diff --git a/spec/bundler/install/gemfile/gemspec_spec.rb b/spec/bundler/install/gemfile/gemspec_spec.rb index bb56d5d0d4..70b5367e15 100644 --- a/spec/bundler/install/gemfile/gemspec_spec.rb +++ b/spec/bundler/install/gemfile/gemspec_spec.rb @@ -138,7 +138,7 @@ RSpec.describe "bundle install from an existing gemspec" do s.add_dependency "rack" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gemspec :path => '#{tmp.join("foo")}' G @@ -157,7 +157,7 @@ RSpec.describe "bundle install from an existing gemspec" do s.add_development_dependency "thin" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gemspec :path => '#{tmp.join("foo")}' G @@ -175,7 +175,7 @@ RSpec.describe "bundle install from an existing gemspec" do system_gems "platform_specific-1.0-java", :path => default_bundle_path - install_gemfile! <<-G + install_gemfile <<-G gemspec :path => '#{tmp.join("foo")}' G @@ -209,7 +209,7 @@ RSpec.describe "bundle install from an existing gemspec" do f.write "#{gemspec.strip}.tap { gem 'rack-obama'; require 'rack/obama' }" end - install_gemfile! <<-G + install_gemfile <<-G gemspec G @@ -247,7 +247,7 @@ RSpec.describe "bundle install from an existing gemspec" do build_gem "foo", "0.0.1" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "deps" gemspec :path => '#{tmp.join("foo")}', :name => 'foo' @@ -280,7 +280,7 @@ RSpec.describe "bundle install from an existing gemspec" do s.add_dependency "activesupport", ">= 1" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gemspec G @@ -549,7 +549,7 @@ RSpec.describe "bundle install from an existing gemspec" do it "installs the ruby platform gemspec" do simulate_platform "ruby" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gemspec :path => '#{tmp.join("foo")}', :name => 'foo' G @@ -561,7 +561,7 @@ RSpec.describe "bundle install from an existing gemspec" do simulate_platform "ruby" bundle "config --local without development" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gemspec :path => '#{tmp.join("foo")}', :name => 'foo' G diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index e1ab8b7d93..9b68b424e4 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -225,7 +225,7 @@ RSpec.describe "bundle install with git sources" do s.write("lib/foo.rb", "raise 'FAIL'") end - install_gemfile! <<-G + install_gemfile <<-G git "#{lib_path("foo-1.0")}", :ref => "refs/bundler/1" do gem "foo" end @@ -241,7 +241,7 @@ RSpec.describe "bundle install with git sources" do end it "works when the revision is a non-head ref and it was previously downloaded" do - install_gemfile! <<-G + install_gemfile <<-G git "#{lib_path("foo-1.0")}" do gem "foo" end @@ -259,7 +259,7 @@ RSpec.describe "bundle install with git sources" do s.write("lib/foo.rb", "raise 'FAIL'") end - install_gemfile! <<-G + install_gemfile <<-G git "#{lib_path("foo-1.0")}", :ref => "refs/bundler/1" do gem "foo" end @@ -279,7 +279,7 @@ RSpec.describe "bundle install with git sources" do bundle "config set global_gem_cache true" - install_gemfile! <<-G + install_gemfile <<-G git "#{lib_path("foo-1.0")}" do gem "foo" end @@ -446,7 +446,7 @@ RSpec.describe "bundle install with git sources" do s.write "lib/rack.rb", "puts :LOCAL" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack", :git => "#{lib_path("rack-0.8")}", :branch => "master" G diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index 3e6ee219ac..29cbb291a4 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -727,7 +727,7 @@ RSpec.describe "bundle install with explicit source paths" do s.write("lib/rubygems_plugin.rb", "FileUtils.touch('#{bar_file}')") end - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :path => "#{lib_path("foo-1.0")}" gem "bar", :path => "#{lib_path("bar-1.0")}" G diff --git a/spec/bundler/install/gemfile/platform_spec.rb b/spec/bundler/install/gemfile/platform_spec.rb index a38ad4fd91..13b3e47163 100644 --- a/spec/bundler/install/gemfile/platform_spec.rb +++ b/spec/bundler/install/gemfile/platform_spec.rb @@ -95,7 +95,7 @@ RSpec.describe "bundle install across platforms" do simulate_platform java - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "empyrean", "0.1.0" @@ -242,7 +242,7 @@ RSpec.describe "bundle install across platforms" do build_gem "CFPropertyList" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "facter" diff --git a/spec/bundler/install/gemfile/ruby_spec.rb b/spec/bundler/install/gemfile/ruby_spec.rb index 0fe93097ae..cdb3960089 100644 --- a/spec/bundler/install/gemfile/ruby_spec.rb +++ b/spec/bundler/install/gemfile/ruby_spec.rb @@ -89,7 +89,7 @@ RSpec.describe "ruby requirement" do end it "allows requirements with trailing whitespace" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" ruby "#{RUBY_VERSION}\\n \t\\n" gem "rack" diff --git a/spec/bundler/install/gemfile/sources_spec.rb b/spec/bundler/install/gemfile/sources_spec.rb index db8724fb1a..3690dc50d6 100644 --- a/spec/bundler/install/gemfile/sources_spec.rb +++ b/spec/bundler/install/gemfile/sources_spec.rb @@ -544,7 +544,7 @@ RSpec.describe "bundle install with gems on multiple sources" do context "when a gem is installed to system gems" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -590,7 +590,7 @@ RSpec.describe "bundle install with gems on multiple sources" do describe "source changed to one containing a higher version of a dependency" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" diff --git a/spec/bundler/install/gemfile/specific_platform_spec.rb b/spec/bundler/install/gemfile/specific_platform_spec.rb index 2fa7d10f9a..959ffbf615 100644 --- a/spec/bundler/install/gemfile/specific_platform_spec.rb +++ b/spec/bundler/install/gemfile/specific_platform_spec.rb @@ -57,7 +57,7 @@ RSpec.describe "bundle install with specific_platform enabled" do before { simulate_platform "x86_64-darwin-15" } it "locks to both the specific darwin platform and ruby" do - install_gemfile!(google_protobuf) + install_gemfile(google_protobuf) allow(Bundler::SharedHelpers).to receive(:find_gemfile).and_return(bundled_app_gemfile) expect(the_bundle.locked_gems.platforms).to eq([pl("ruby"), pl("x86_64-darwin-15")]) expect(the_bundle).to include_gem("google-protobuf 3.0.0.alpha.5.0.5.1 universal-darwin") @@ -75,7 +75,7 @@ RSpec.describe "bundle install with specific_platform enabled" do end it "uses the platform-specific gem with extra dependencies" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "facter" G @@ -94,7 +94,7 @@ RSpec.describe "bundle install with specific_platform enabled" do end it "adds the foreign platform" do - install_gemfile!(google_protobuf) + install_gemfile(google_protobuf) bundle "lock --add-platform=#{x64_mingw}" expect(the_bundle.locked_gems.platforms).to eq([rb, x64_mingw, pl("x86_64-darwin-15")]) @@ -106,7 +106,7 @@ RSpec.describe "bundle install with specific_platform enabled" do end it "falls back on plain ruby when that version doesnt have a platform-specific gem" do - install_gemfile!(google_protobuf) + install_gemfile(google_protobuf) bundle "lock --add-platform=#{java}" expect(the_bundle.locked_gems.platforms).to eq([java, rb, pl("x86_64-darwin-15")]) diff --git a/spec/bundler/install/gemfile_spec.rb b/spec/bundler/install/gemfile_spec.rb index f2e520c395..ffbb2e3a61 100644 --- a/spec/bundler/install/gemfile_spec.rb +++ b/spec/bundler/install/gemfile_spec.rb @@ -64,7 +64,7 @@ RSpec.describe "bundle install" do context "with engine specified in symbol", :jruby do it "does not raise any error parsing Gemfile" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" ruby "#{RUBY_VERSION}", :engine => :jruby, :engine_version => "#{RUBY_ENGINE_VERSION}" G @@ -73,7 +73,7 @@ RSpec.describe "bundle install" do end it "installation succeeds" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" ruby "#{RUBY_VERSION}", :engine => :jruby, :engine_version => "#{RUBY_ENGINE_VERSION}" gem "rack" diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 1391319837..17cfcd2710 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -51,7 +51,7 @@ RSpec.describe "compact index api" do build_gem "Rack", "0.1" end - install_gemfile! <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } + install_gemfile <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } source "#{source_uri}" gem "rack", "1.0" gem "Rack", "0.1" @@ -265,7 +265,7 @@ The checksum of /versions does not match the checksum provided by the server! So #{source_uri}/info/rack EOS - install_gemfile! <<-G, :artifice => "compact_index", :verbose => true + install_gemfile <<-G, :artifice => "compact_index", :verbose => true source "#{source_uri}" gem "rack" G @@ -299,7 +299,7 @@ The checksum of /versions does not match the checksum provided by the server! So FileUtils.rm_rf Dir[gem_repo2("gems/foo-*.gem")] end - install_gemfile! <<-G, :artifice => "compact_index_extra", :verbose => true + install_gemfile <<-G, :artifice => "compact_index_extra", :verbose => true source "#{source_uri}" source "#{source_uri}/extra" do gem "back_deps" @@ -414,7 +414,7 @@ The checksum of /versions does not match the checksum provided by the server! So api_request_limit = low_api_request_limit_for(gem_repo2) - install_gemfile! <<-G, :artifice => "compact_index_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) + install_gemfile <<-G, :artifice => "compact_index_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) source "#{source_uri}" source "#{source_uri}/extra" do gem "back_deps" @@ -436,7 +436,7 @@ The checksum of /versions does not match the checksum provided by the server! So api_request_limit = low_api_request_limit_for(gem_repo4) - install_gemfile! <<-G, :artifice => "compact_index_extra_api_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) + install_gemfile <<-G, :artifice => "compact_index_extra_api_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) source "#{source_uri}" source "#{source_uri}/extra" do gem "back_deps" @@ -898,7 +898,7 @@ The checksum of /versions does not match the checksum provided by the server! So it "does not raise when disable_checksum_validation is set" do bundle "config set disable_checksum_validation true" - install_gemfile! <<-G, :artifice => "compact_index_wrong_gem_checksum" + install_gemfile <<-G, :artifice => "compact_index_wrong_gem_checksum" source "#{source_uri}" gem "rack" G @@ -906,7 +906,7 @@ The checksum of /versions does not match the checksum provided by the server! So end it "works when cache dir is world-writable" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" File.umask(0000) source "#{source_uri}" gem "rack" @@ -930,7 +930,7 @@ Either installing with `--full-index` or running `bundle update rails` should fi end it "does not duplicate specs in the lockfile when updating and a dependency is not installed" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "#{source_uri}" do gem "rails" gem "activemerchant" diff --git a/spec/bundler/install/gems/dependency_api_spec.rb b/spec/bundler/install/gems/dependency_api_spec.rb index cd02bff3f1..5aa4c9af38 100644 --- a/spec/bundler/install/gems/dependency_api_spec.rb +++ b/spec/bundler/install/gems/dependency_api_spec.rb @@ -388,7 +388,7 @@ RSpec.describe "gemcutter's dependency API" do api_request_limit = low_api_request_limit_for(gem_repo2) - install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) + install_gemfile <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) source "#{source_uri}" source "#{source_uri}/extra" gem "back_deps" @@ -409,7 +409,7 @@ RSpec.describe "gemcutter's dependency API" do api_request_limit = low_api_request_limit_for(gem_repo2) - install_gemfile! <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) + install_gemfile <<-G, :artifice => "endpoint_extra_missing", :env => { "BUNDLER_SPEC_API_REQUEST_LIMIT" => api_request_limit.to_s }.merge(env_for_missing_prerelease_default_gem_activation) source "#{source_uri}" source "#{source_uri}/extra" do gem "back_deps" diff --git a/spec/bundler/install/gems/flex_spec.rb b/spec/bundler/install/gems/flex_spec.rb index 42b760822d..858c40c07c 100644 --- a/spec/bundler/install/gems/flex_spec.rb +++ b/spec/bundler/install/gems/flex_spec.rb @@ -248,11 +248,11 @@ RSpec.describe "bundle flex_install" do describe "when adding a new source" do it "updates the lockfile", :bundler => "< 3" do build_repo2 - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" source "#{file_uri_for(gem_repo2)}" gem "rack" @@ -278,12 +278,12 @@ RSpec.describe "bundle flex_install" do it "updates the lockfile", :bundler => "3" do build_repo2 - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" source "#{file_uri_for(gem_repo2)}" do end diff --git a/spec/bundler/install/gems/native_extensions_spec.rb b/spec/bundler/install/gems/native_extensions_spec.rb index 8801a3c289..742f2a48a9 100644 --- a/spec/bundler/install/gems/native_extensions_spec.rb +++ b/spec/bundler/install/gems/native_extensions_spec.rb @@ -77,7 +77,7 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do bundle "config set build.c_extension --with-c_extension=hello" - install_gemfile! <<-G + install_gemfile <<-G gem "c_extension", :git => #{lib_path("c_extension-1.0").to_s.dump} G @@ -125,12 +125,12 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do bundle "config set build.c_extension_two --with-c_extension_two=two" # 1st time, require only one gem -- only one of the extensions gets built. - install_gemfile! <<-G + install_gemfile <<-G gem "c_extension_one", :git => #{lib_path("gems").to_s.dump} G # 2nd time, require both gems -- we need both extensions to be built now. - install_gemfile! <<-G + install_gemfile <<-G gem "c_extension_one", :git => #{lib_path("gems").to_s.dump} gem "c_extension_two", :git => #{lib_path("gems").to_s.dump} G @@ -170,7 +170,7 @@ RSpec.describe "installing a gem with native extensions", :ruby_repo do bundle "config set build.c_extension --with-c_extension=hello --with-c_extension_bundle-dir=hola" - install_gemfile! <<-G + install_gemfile <<-G gem "c_extension", :git => #{lib_path("c_extension-1.0").to_s.dump} G diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb index 14f9874b70..62658137e0 100644 --- a/spec/bundler/install/git_spec.rb +++ b/spec/bundler/install/git_spec.rb @@ -5,7 +5,7 @@ RSpec.describe "bundle install" do it "displays the revision hash of the gem repository", :bundler => "< 3" do build_git "foo", "1.0", :path => lib_path("foo") - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{file_uri_for(lib_path("foo"))}" G @@ -22,7 +22,7 @@ RSpec.describe "bundle install" do rev2 = revision_for(lib_path("foo"))[0..6] update_git "foo", "3.0", :path => lib_path("foo"), :gemspec => true - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{file_uri_for(lib_path("foo"))}", :ref => "master~2" G @@ -71,7 +71,7 @@ RSpec.describe "bundle install" do build_git "gems", :path => lib_path("gems"), :gemspec => false end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "foo", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "foo/*.gemspec" gem "zebra", :git => "#{file_uri_for(lib_path("gems"))}", :glob => "zebra/*.gemspec" diff --git a/spec/bundler/install/global_cache_spec.rb b/spec/bundler/install/global_cache_spec.rb index 1d897983c3..947ef4fb09 100644 --- a/spec/bundler/install/global_cache_spec.rb +++ b/spec/bundler/install/global_cache_spec.rb @@ -16,7 +16,7 @@ RSpec.describe "global gem caching" do end it "caches gems into the global cache on download" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "#{source}" gem "rack" G @@ -29,7 +29,7 @@ RSpec.describe "global gem caching" do source_global_cache.mkpath FileUtils.cp(gem_repo1("gems/rack-1.0.0.gem"), source_global_cache("rack-1.0.0.gem")) - install_gemfile! <<-G, :artifice => "compact_index_no_gem" + install_gemfile <<-G, :artifice => "compact_index_no_gem" source "#{source}" gem "rack" G @@ -39,7 +39,7 @@ RSpec.describe "global gem caching" do describe "when the same gem from different sources is installed" do it "should use the appropriate one from the global cache" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "#{source}" gem "rack" G @@ -49,7 +49,7 @@ RSpec.describe "global gem caching" do expect(source_global_cache("rack-1.0.0.gem")).to exist # rack 1.0.0 is not installed and it is in the global cache - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "#{source2}" gem "rack", "0.9.1" G @@ -134,7 +134,7 @@ RSpec.describe "global gem caching" do describe "when installing gems from a different directory" do it "uses the global cache as a source" do - install_gemfile! <<-G, :artifice => "compact_index" + install_gemfile <<-G, :artifice => "compact_index" source "#{source}" gem "rack" gem "activesupport" @@ -150,7 +150,7 @@ RSpec.describe "global gem caching" do expect(the_bundle).not_to include_gems "rack 1.0.0" expect(the_bundle).not_to include_gems "activesupport 2.3.5" - install_gemfile! <<-G, :artifice => "compact_index_no_gem" + install_gemfile <<-G, :artifice => "compact_index_no_gem" source "#{source}" gem "rack" G @@ -193,7 +193,7 @@ RSpec.describe "global gem caching" do build_lib "very_simple_path_binary", &:add_c_extension revision = revision_for(lib_path("very_simple_git_binary-1.0"))[0, 12] - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "very_simple_binary" diff --git a/spec/bundler/install/process_lock_spec.rb b/spec/bundler/install/process_lock_spec.rb index cab4ba0819..dac0d34bc4 100644 --- a/spec/bundler/install/process_lock_spec.rb +++ b/spec/bundler/install/process_lock_spec.rb @@ -12,7 +12,7 @@ RSpec.describe "process lock spec" do end end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index 47b6dad9e3..6eaa6f05cf 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -620,7 +620,7 @@ RSpec.describe "the lockfile format" do it "serializes pinned path sources to the lockfile even when packaging" do build_lib "foo" - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :path => "#{lib_path("foo-1.0")}" G @@ -1048,7 +1048,7 @@ RSpec.describe "the lockfile format" do simulate_platform "universal-java-16" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "platform_specific" G @@ -1079,7 +1079,7 @@ RSpec.describe "the lockfile format" do simulate_platform "universal-java-16" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo2)}" gem "platform_specific" G diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index 3915cc2bac..fa3ea7e6fb 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -5,7 +5,7 @@ RSpec.describe "major deprecations" do describe "Bundler" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -290,7 +290,7 @@ RSpec.describe "major deprecations" do it "should print a proper warning, and use gems.rb" do create_file "gems.rb" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -374,7 +374,7 @@ RSpec.describe "major deprecations" do context "when Bundler.setup is run in a ruby script" do before do create_file "gems.rb" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack", :group => :test G @@ -482,7 +482,7 @@ The :gist git source is deprecated, and will be removed in the future. Add this context "bundle show" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/other/platform_spec.rb b/spec/bundler/other/platform_spec.rb index cbcf9d2997..48beefe585 100644 --- a/spec/bundler/other/platform_spec.rb +++ b/spec/bundler/other/platform_spec.rb @@ -594,7 +594,7 @@ G end it "prints path if ruby version is correct" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" @@ -606,7 +606,7 @@ G end it "prints path if ruby version is correct for any engine", :jruby do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rails" @@ -689,7 +689,7 @@ G end it "copies the .gem file to vendor/cache when ruby version matches for any engine", :jruby do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' @@ -748,7 +748,7 @@ G context "bundle pack" do before do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' G @@ -766,7 +766,7 @@ G end it "copies the .gem file to vendor/cache when ruby version matches any engine", :jruby do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem 'rack' diff --git a/spec/bundler/plugins/install_spec.rb b/spec/bundler/plugins/install_spec.rb index c0a27832dc..bb27482fa5 100644 --- a/spec/bundler/plugins/install_spec.rb +++ b/spec/bundler/plugins/install_spec.rb @@ -210,13 +210,13 @@ RSpec.describe "bundler plugin install" do context "in deployment mode" do it "installs plugins" do - install_gemfile! <<-G + install_gemfile <<-G source '#{file_uri_for(gem_repo2)}' gem 'rack', "1.0.0" G bundle "config --local deployment true" - install_gemfile! <<-G + install_gemfile <<-G source '#{file_uri_for(gem_repo2)}' plugin 'foo' gem 'rack', "1.0.0" diff --git a/spec/bundler/realworld/dependency_api_spec.rb b/spec/bundler/realworld/dependency_api_spec.rb index 2f5c7a332e..08c6acf190 100644 --- a/spec/bundler/realworld/dependency_api_spec.rb +++ b/spec/bundler/realworld/dependency_api_spec.rb @@ -34,7 +34,7 @@ RSpec.describe "gemcutter's dependency API", :realworld => true do end it "times out and falls back on the modern index" do - install_gemfile! <<-G, :artifice => nil + install_gemfile <<-G, :artifice => nil source "#{@server_uri}" gem "rack" G diff --git a/spec/bundler/runtime/executable_spec.rb b/spec/bundler/runtime/executable_spec.rb index c36d999ed3..98077efaf0 100644 --- a/spec/bundler/runtime/executable_spec.rb +++ b/spec/bundler/runtime/executable_spec.rb @@ -2,7 +2,7 @@ RSpec.describe "Running bin/* commands" do before :each do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -140,7 +140,7 @@ RSpec.describe "Running bin/* commands" do end it "rewrites bins on binstubs (to maintain backwards compatibility)" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/runtime/gem_tasks_spec.rb b/spec/bundler/runtime/gem_tasks_spec.rb index 73fd845f62..ced3635149 100644 --- a/spec/bundler/runtime/gem_tasks_spec.rb +++ b/spec/bundler/runtime/gem_tasks_spec.rb @@ -19,7 +19,7 @@ RSpec.describe "require 'bundler/gem_tasks'" do RAKEFILE end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rake" @@ -74,7 +74,7 @@ RSpec.describe "require 'bundler/gem_tasks'" do end it "works", :ruby_repo do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rake" diff --git a/spec/bundler/runtime/load_spec.rb b/spec/bundler/runtime/load_spec.rb index e091d8ed6b..5783654c0e 100644 --- a/spec/bundler/runtime/load_spec.rb +++ b/spec/bundler/runtime/load_spec.rb @@ -3,7 +3,7 @@ RSpec.describe "Bundler.load" do describe "with a gemfile" do before(:each) do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -75,7 +75,7 @@ RSpec.describe "Bundler.load" do describe "when called twice" do it "doesn't try to load the runtime twice" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" gem "activesupport", :group => :test @@ -99,7 +99,7 @@ RSpec.describe "Bundler.load" do describe "not hurting brittle rubygems" do it "does not inject #source into the generated YAML of the gem specs" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "activerecord" G diff --git a/spec/bundler/runtime/platform_spec.rb b/spec/bundler/runtime/platform_spec.rb index a629b29f7d..215ba8628f 100644 --- a/spec/bundler/runtime/platform_spec.rb +++ b/spec/bundler/runtime/platform_spec.rb @@ -49,7 +49,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do G simulate_platform "x86-darwin-10" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "nokogiri" G @@ -75,7 +75,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do simulate_platform "x86-darwin-100" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "nokogiri" gem "platform_specific" @@ -87,7 +87,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do it "allows specifying only-ruby-platform" do simulate_platform "java" - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "nokogiri" gem "platform_specific" @@ -102,7 +102,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do it "allows specifying only-ruby-platform on windows with dependency platforms" do simulate_windows do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "nokogiri", :platforms => [:mingw, :mswin, :x64_mingw, :jruby] gem "platform_specific" @@ -159,7 +159,7 @@ RSpec.describe "Bundler.setup with multi platform stuff" do requires_platform_specific L - install_gemfile! <<-G, :verbose => true + install_gemfile <<-G, :verbose => true source "#{file_uri_for(gem_repo2)}" gem "requires_platform_specific" G diff --git a/spec/bundler/runtime/require_spec.rb b/spec/bundler/runtime/require_spec.rb index 3646b00a3d..a1c0005511 100644 --- a/spec/bundler/runtime/require_spec.rb +++ b/spec/bundler/runtime/require_spec.rb @@ -370,7 +370,7 @@ RSpec.describe "Bundler.require" do end it "does not load rubygems gemspecs that are used" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -395,7 +395,7 @@ RSpec.describe "Bundler.require" do it "does not load git gemspecs that are used" do build_git "foo" - install_gemfile! <<-G + install_gemfile <<-G gem "foo", :git => "#{lib_path("foo-1.0")}" G diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 09d54435be..80c448c969 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -164,7 +164,7 @@ RSpec.describe "Bundler.setup" do end it "falls back to order the load path alphabetically for backwards compatibility" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "weakling" gem "duradura" @@ -665,7 +665,7 @@ RSpec.describe "Bundler.setup" do end it "does not load all gemspecs" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -717,7 +717,7 @@ end before { ENV["MANPATH"] = "/foo#{File::PATH_SEPARATOR}" } it "adds the gem's man dir to the MANPATH" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "with_man" G @@ -731,7 +731,7 @@ end before { ENV.delete("MANPATH") } it "adds the gem's man dir to the MANPATH" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "with_man" G @@ -1194,7 +1194,7 @@ end end it "does not load openssl" do - install_gemfile! "" + install_gemfile "" ruby! <<-RUBY require "#{lib_dir}/bundler/setup" puts defined?(OpenSSL) || "undefined" @@ -1250,13 +1250,13 @@ end RUBY it "activates no gems with -rbundler/setup" do - install_gemfile! "" + install_gemfile "" ruby! code, :env => { "RUBYOPT" => activation_warning_hack_rubyopt + " -r#{lib_dir}/bundler/setup" } expect(out).to eq("{}") end it "activates no gems with bundle exec" do - install_gemfile! "" + install_gemfile "" create_file("script.rb", code) bundle "exec ruby ./script.rb", :env => { "RUBYOPT" => activation_warning_hack_rubyopt } expect(out).to eq("{}") @@ -1265,7 +1265,7 @@ end it "activates no gems with bundle exec that is loaded" do skip "not executable" if Gem.win_platform? - install_gemfile! "" + install_gemfile "" create_file("script.rb", "#!/usr/bin/env ruby\n\n#{code}") FileUtils.chmod(0o777, bundled_app("script.rb")) bundle "exec ./script.rb", :artifice => nil, :env => { "RUBYOPT" => activation_warning_hack_rubyopt } @@ -1324,7 +1324,7 @@ end build_gem g, "999999" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "#{g}", "999999" G @@ -1340,7 +1340,7 @@ end build_gem g, "0.0.0.a" end - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" gem "#{g}", "0.0.0.a" G @@ -1369,7 +1369,7 @@ end end it "keeps Kernel#gem private", :bundler => "3" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G @@ -1385,7 +1385,7 @@ end end it "keeps Kernel#require private" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" G diff --git a/spec/bundler/update/git_spec.rb b/spec/bundler/update/git_spec.rb index 3603036418..32c2bb93c6 100644 --- a/spec/bundler/update/git_spec.rb +++ b/spec/bundler/update/git_spec.rb @@ -27,7 +27,7 @@ RSpec.describe "bundle update" do s.add_dependency "activesupport", "= 3.0" end - install_gemfile! <<-G + install_gemfile <<-G gem "rails", :git => "#{lib_path("rails")}" G @@ -158,7 +158,7 @@ RSpec.describe "bundle update" do end it "unlocks the source when submodules are removed from git source", :git => ">= 2.9.0" do - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" git "#{lib_path("has_submodule-1.0")}", :submodules => true do gem "has_submodule" @@ -168,7 +168,7 @@ RSpec.describe "bundle update" do run! "require 'submodule'" expect(out).to eq("GIT") - install_gemfile! <<-G + install_gemfile <<-G source "#{file_uri_for(gem_repo4)}" git "#{lib_path("has_submodule-1.0")}" do gem "has_submodule" |