diff options
author | Stefan Lance <stefan@lances.net> | 2015-07-14 14:00:55 -0500 |
---|---|---|
committer | Stefan Lance <stefan@lances.net> | 2015-08-19 09:45:34 -0500 |
commit | 0561ac198c6af2526c30d71a0666aaf967fe8aaf (patch) | |
tree | 170df0afd065592828afa50f9fb1ff8309c5f9b4 | |
parent | 4594d996fb60eb2bb86d760b69041cb74410bc8a (diff) | |
download | bundler-0561ac198c6af2526c30d71a0666aaf967fe8aaf.tar.gz |
Remove `bundle install --path foo`
Conflicts:
lib/bundler/cli/install.rb
Add spec, and change all spec using path flag
Conflicts:
spec/commands/config_spec.rb
spec/commands/install_spec.rb
spec/commands/package_spec.rb
spec/install/gemfile/git_spec.rb
spec/install/path_spec.rb
spec/runtime/setup_spec.rb
Make WIP changes and fix RuboCop violations
Work on fixing spec failures
Fix spec failures by adding --local scope flag to `bundle config`
-rw-r--r-- | lib/bundler/cli.rb | 3 | ||||
-rw-r--r-- | lib/bundler/cli/install.rb | 14 | ||||
-rw-r--r-- | lib/bundler/cli/package.rb | 1 | ||||
-rw-r--r-- | spec/cache/git_spec.rb | 5 | ||||
-rw-r--r-- | spec/commands/check_spec.rb | 9 | ||||
-rw-r--r-- | spec/commands/clean_spec.rb | 70 | ||||
-rw-r--r-- | spec/commands/config_spec.rb | 6 | ||||
-rw-r--r-- | spec/commands/install_spec.rb | 24 | ||||
-rw-r--r-- | spec/commands/package_spec.rb | 7 | ||||
-rw-r--r-- | spec/install/gemfile/git_spec.rb | 6 | ||||
-rw-r--r-- | spec/install/gems/dependency_api_spec.rb | 10 | ||||
-rw-r--r-- | spec/install/gems/platform_spec.rb | 5 | ||||
-rw-r--r-- | spec/install/gems/sources_spec.rb | 3 | ||||
-rw-r--r-- | spec/install/gems/standalone_spec.rb | 6 | ||||
-rw-r--r-- | spec/install/path_spec.rb | 47 | ||||
-rw-r--r-- | spec/install/post_bundle_message_spec.rb | 14 | ||||
-rw-r--r-- | spec/lock/lockfile_spec.rb | 3 | ||||
-rw-r--r-- | spec/realworld/edgecases_spec.rb | 3 | ||||
-rw-r--r-- | spec/runtime/setup_spec.rb | 8 | ||||
-rw-r--r-- | spec/runtime/with_clean_env_spec.rb | 3 |
20 files changed, 163 insertions, 84 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 83a462278c..89b3ab124b 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -141,8 +141,9 @@ module Bundler "Force downloading every gem." method_option "no-prune", :type => :boolean, :banner => "Don't remove stale gems from the cache." + # TODO: Remove the "path" method_option? method_option "path", :type => :string, :banner => - "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME). Bundler will remember this value for future installs on this machine" + "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME)." method_option "quiet", :type => :boolean, :banner => "Only output warnings and errors." method_option "shebang", :type => :string, :banner => diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index 852ff24cf2..bcf3f07471 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -50,9 +50,15 @@ module Bundler # Just disable color in deployment mode Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment] - if (options[:path] || options[:deployment]) && options[:system] - Bundler.ui.error "You have specified both a path to install your gems to, \n" \ - "as well as --system. Please choose." + if options[:path] + Bundler.ui.error "You have specified an installation path with the "\ + "path flag. Please use `bundle config path #{options[:path]}` instead." + exit 1 + end + + if (Bundler.settings[:path] || options[:deployment]) && options[:system] + Bundler.ui.error "You have configured a path to install your gems to, \n" \ + "and specified the --system path. Please use only one." exit 1 end @@ -90,7 +96,7 @@ module Bundler Bundler.settings[:path] = Bundler.rubygems.gem_dir if options[:system] Bundler.settings[:path] = "#{Bundler.settings.path}/vendor/bundle" if options[:deployment] - Bundler.settings[:path] = options["path"] if options["path"] + Bundler.settings[:path] ||= "bundle" if options["standalone"] Bundler.settings[:shebang] = options["shebang"] if options["shebang"] Bundler.settings[:jobs] = options["jobs"] if options["jobs"] diff --git a/lib/bundler/cli/package.rb b/lib/bundler/cli/package.rb index cea8217333..cfb33e60af 100644 --- a/lib/bundler/cli/package.rb +++ b/lib/bundler/cli/package.rb @@ -8,6 +8,7 @@ module Bundler def run Bundler.ui.level = "error" if options[:quiet] + # TODO: Also need to remove options[:path] here Bundler.settings[:path] = File.expand_path(options[:path]) if options[:path] Bundler.settings[:cache_all_platforms] = options["all-platforms"] if options.key?("all-platforms") Bundler.settings[:cache_path] = options["cache-path"] if options.key?("cache-path") diff --git a/spec/cache/git_spec.rb b/spec/cache/git_spec.rb index 1aebac229f..011f7e9e9d 100644 --- a/spec/cache/git_spec.rb +++ b/spec/cache/git_spec.rb @@ -31,7 +31,7 @@ end should_be_installed "foo 1.0" end - it "copies repository to vendor cache and uses it even when installed with bundle --path" do + it "copies repository to vendor cache and uses it even when installed with bundle config path" do git = build_git "foo" ref = git.ref_for("master", 11) @@ -39,7 +39,8 @@ end gem "foo", :git => '#{lib_path("foo-1.0")}' G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" bundle "#{cmd} --all" expect(bundled_app("vendor/cache/foo-1.0-#{ref}")).to exist diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb index fba437acfe..f4d0e920a4 100644 --- a/spec/commands/check_spec.rb +++ b/spec/commands/check_spec.rb @@ -228,25 +228,26 @@ describe "bundle check" do expect(exitstatus).not_to eq(0) if exitstatus end - context "--path" do + context "bundle config path" do before do gemfile <<-G source "file://#{gem_repo1}" gem "rails" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" FileUtils.rm_rf(bundled_app(".bundle")) end it "returns success" do - bundle "check --path vendor/bundle" + bundle "check" expect(exitstatus).to eq(0) if exitstatus expect(out).to include("gems.rb's dependencies are satisfied") end it "should write to .bundle/config" do - bundle "check --path vendor/bundle" + bundle "check" bundle "check" expect(exitstatus).to eq(0) if exitstatus end diff --git a/spec/commands/clean_spec.rb b/spec/commands/clean_spec.rb index 96f71ea48a..94200935b9 100644 --- a/spec/commands/clean_spec.rb +++ b/spec/commands/clean_spec.rb @@ -25,7 +25,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" gemfile <<-G source "file://#{gem_repo1}" @@ -52,7 +53,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" gemfile <<-G source "file://#{gem_repo1}" @@ -80,7 +82,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" gemfile <<-G source "file://#{gem_repo1}" @@ -111,7 +114,8 @@ describe "bundle clean" do end G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" bundle "install --without test_group" bundle :clean @@ -137,7 +141,8 @@ describe "bundle clean" do end G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" bundle :clean @@ -159,7 +164,8 @@ describe "bundle clean" do end G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" gemfile <<-G source "file://#{gem_repo1}" @@ -195,7 +201,8 @@ describe "bundle clean" do end G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" update_git "foo", :path => lib_path("foo-bar") revision2 = revision_for(lib_path("foo-bar")) @@ -225,7 +232,9 @@ describe "bundle clean" do gem "activesupport", :git => "#{lib_path("rails")}", :ref => '#{revision}' G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" + bundle :clean expect(out).to include("") @@ -247,7 +256,8 @@ describe "bundle clean" do end end G - bundle "install --path vendor/bundle --without test" + bundle "config path vendor/bundle" + bundle "install --without test" bundle :clean @@ -268,13 +278,14 @@ describe "bundle clean" do end G - bundle "install --path vendor/bundle --without development" + bundle "config path vendor/bundle" + bundle "install --without development" bundle :clean expect(exitstatus).to eq(0) if exitstatus end - it "displays an error when used without --path" do + it "displays an error when used without bundle config path" do install_gemfile <<-G source "file://#{gem_repo1}" @@ -296,7 +307,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" gemfile <<-G source "file://#{gem_repo1}" @@ -347,7 +359,8 @@ describe "bundle clean" do gem "thin" gem "rack" G - bundle "install --path vendor/bundle --clean" + bundle "config path vendor/bundle" + bundle "install --clean" gemfile <<-G source "file://#{gem_repo1}" @@ -368,7 +381,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --clean" + bundle "config path vendor/bundle" + bundle "install --clean" update_repo2 do build_gem "foo", "1.0.1" @@ -380,14 +394,15 @@ describe "bundle clean" do should_not_have_gems "foo-1.0" end - it "does not clean automatically on --path" do + it "does not clean automatically on bundle config path" do gemfile <<-G source "file://#{gem_repo1}" gem "thin" gem "rack" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" gemfile <<-G source "file://#{gem_repo1}" @@ -399,7 +414,7 @@ describe "bundle clean" do should_have_gems "rack-1.0.0", "thin-1.0" end - it "does not clean on bundle update with --path" do + it "does not clean on bundle update with bundle config path" do build_repo2 gemfile <<-G @@ -407,7 +422,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" update_repo2 do build_gem "foo", "1.0.1" @@ -469,7 +485,8 @@ describe "bundle clean" do gem "foo", :git => "#{lib_path("foo-1.0")}" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" # mimic 7 length git revisions in Gemfile.lock gemfile_lock = File.read(bundled_app("gems.locked")).split("\n") @@ -480,7 +497,8 @@ describe "bundle clean" do file.print gemfile_lock.join("\n") end - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" bundle :clean @@ -528,7 +546,8 @@ describe "bundle clean" do gem "bar", "1.0", :path => "#{relative_path}" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" bundle :clean expect(exitstatus).to eq(0) if exitstatus @@ -542,7 +561,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" gemfile <<-G source "file://#{gem_repo1}" @@ -570,7 +590,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" bundle "config dry_run false" gemfile <<-G @@ -600,7 +621,8 @@ describe "bundle clean" do gem "foo" G - bundle "install --path vendor/bundle --no-clean" + bundle "config path vendor/bundle" + bundle "install --no-clean" gemfile <<-G source "file://#{gem_repo1}" diff --git a/spec/commands/config_spec.rb b/spec/commands/config_spec.rb index 70b2c64301..ff3889c4dd 100644 --- a/spec/commands/config_spec.rb +++ b/spec/commands/config_spec.rb @@ -11,7 +11,8 @@ describe ".bundle/config" do describe "BUNDLE_APP_CONFIG" do it "can be moved with an environment variable" do ENV["BUNDLE_APP_CONFIG"] = tmp("foo/bar").to_s - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" expect(bundled_app(".bundle")).not_to exist expect(tmp("foo/bar/config")).to exist @@ -23,7 +24,8 @@ describe ".bundle/config" do Dir.chdir bundled_app("omg") ENV["BUNDLE_APP_CONFIG"] = "../foo" - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" expect(bundled_app(".bundle")).not_to exist expect(bundled_app("../foo/config")).to exist diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb index cc68ec2229..7e36eeeed0 100644 --- a/spec/commands/install_spec.rb +++ b/spec/commands/install_spec.rb @@ -248,23 +248,29 @@ describe "bundle install with gem sources" do source "file://#{gem_repo1}" gem "rack" G + bundle "config path vendor" end it "works" do - bundle "install --path vendor" + bundle "install" should_be_installed "rack 1.0" end + # NOTE: This interface (`install; config --delete path; install --system`) + # is a bit clunky. + # (Just using `install; install --system` produces an error.) it "allows running bundle install --system without deleting foo" do - bundle "install --path vendor" + bundle "install" + bundle "config --delete path" bundle "install --system" FileUtils.rm_rf(bundled_app("vendor")) should_be_installed "rack 1.0" end it "allows running bundle install --system after deleting foo" do - bundle "install --path vendor" + bundle "install" FileUtils.rm_rf(bundled_app("vendor")) + bundle "config --delete path" bundle "install --system" should_be_installed "rack 1.0" end @@ -386,4 +392,16 @@ describe "bundle install with gem sources" do expect(err).to include("Please use `bundle cache` instead") end end + + describe "when using the --path flag" do + it "print an error and exit" do + gemfile <<-G + gem 'rack' + G + + bundle "install --path vendor/bundle" + + expect(err).to include("Please use `bundle config path") + end + end end diff --git a/spec/commands/package_spec.rb b/spec/commands/package_spec.rb index d9762b7a59..14f17cff9a 100644 --- a/spec/commands/package_spec.rb +++ b/spec/commands/package_spec.rb @@ -15,17 +15,18 @@ describe "bundle package" do end end - context "with --path" do + context "with config path" do it "sets root directory for gems" do gemfile <<-D source "file://#{gem_repo1}" gem 'rack' D - bundle "package --path=#{bundled_app("test")}" + bundle "config path #{bundled_app("test")}" + bundle "package" should_be_installed "rack 1.0.0" - expect(bundled_app("test/vendor/cache/")).to exist + expect(bundled_app("test")).to exist end end diff --git a/spec/install/gemfile/git_spec.rb b/spec/install/gemfile/git_spec.rb index a57ef33f23..6596b3b419 100644 --- a/spec/install/gemfile/git_spec.rb +++ b/spec/install/gemfile/git_spec.rb @@ -85,7 +85,8 @@ describe "bundle install with git sources" do end it "still works after moving the application directory" do - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" FileUtils.mv bundled_app, tmp("bundled_app.bck") Dir.chdir tmp("bundled_app.bck") @@ -93,7 +94,8 @@ describe "bundle install with git sources" do end it "can still install after moving the application directory" do - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" FileUtils.mv bundled_app, tmp("bundled_app.bck") update_git "foo", "1.1", :path => lib_path("foo-1.0") diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index da19b3ee9f..9c0dec5eb5 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -404,24 +404,26 @@ describe "gemcutter's dependency API" do should_be_installed "rails 2.3.2" end - it "installs the bins when using --path and uses autoclean" do + it "installs the bins when using bundle config path and uses autoclean" do gemfile <<-G source "#{source_uri}" gem "rack" G - bundle "install --path vendor/bundle", :artifice => "endpoint" + bundle "config path vendor/bundle" + bundle "install", :artifice => "endpoint" expect(vendored_gems("bin/rackup")).to exist end - it "installs the bins when using --path and uses bundle clean" do + it "installs the bins when using bundle config path and uses bundle clean" do gemfile <<-G source "#{source_uri}" gem "rack" G - bundle "install --path vendor/bundle --no-clean", :artifice => "endpoint" + bundle "config path vendor/bundle" + bundle "install --no-clean", :artifice => "endpoint" expect(vendored_gems("bin/rackup")).to exist end diff --git a/spec/install/gems/platform_spec.rb b/spec/install/gems/platform_spec.rb index ee7501f759..3acf9febbd 100644 --- a/spec/install/gems/platform_spec.rb +++ b/spec/install/gems/platform_spec.rb @@ -94,12 +94,13 @@ describe "bundle install across platforms" do gem "rack", "1.0.0" G - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" new_version = Gem::ConfigMap[:ruby_version] == "1.8" ? "1.9.1" : "1.8" FileUtils.mv(vendored_gems, bundled_app("vendor/bundle", Gem.ruby_engine, new_version)) - bundle "install --path vendor/bundle" + bundle "install" expect(vendored_gems("gems/rack-1.0.0")).to exist end end diff --git a/spec/install/gems/sources_spec.rb b/spec/install/gems/sources_spec.rb index 6941cd19a1..99d0a31898 100644 --- a/spec/install/gems/sources_spec.rb +++ b/spec/install/gems/sources_spec.rb @@ -389,7 +389,8 @@ describe "bundle install with gems on multiple sources" do rack L - bundle "install --path ../gems/system" + bundle "config path ../gems/system" + bundle "install" # 4. Then we add some new versions... update_repo4 do diff --git a/spec/install/gems/standalone_spec.rb b/spec/install/gems/standalone_spec.rb index b9470e1d29..62991ba4a2 100644 --- a/spec/install/gems/standalone_spec.rb +++ b/spec/install/gems/standalone_spec.rb @@ -157,8 +157,10 @@ describe "bundle install --standalone" do expect(err).to eq("ZOMG LOAD ERROR") end - it "allows --path to change the location of the standalone bundle" do - bundle "install --standalone --path path/to/bundle" + it "allows bundle config path to change the location of the standalone bundle" do + # NOTE: This spec fails if we don't specify a scope or if we use --global. + bundle "config --local path path/to/bundle" + bundle "install --standalone" ruby <<-RUBY, :no_lib => true, :expect_err => false $:.unshift File.expand_path("path/to/bundle") diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb index 19edfde274..612f28e8e9 100644 --- a/spec/install/path_spec.rb +++ b/spec/install/path_spec.rb @@ -1,7 +1,7 @@ require "spec_helper" describe "bundle install" do - describe "with --path" do + describe "with `config path`" do before :each do build_gem "rack", "1.0.0", :to_system => true do |s| s.write "lib/rack.rb", "puts 'FAIL'" @@ -13,8 +13,9 @@ describe "bundle install" do G end - it "does not use available system gems with bundle --path vendor/bundle" do - bundle "install --path vendor/bundle" + it "does not use available system gems with config path vendor/bundle" do + bundle "config path vendor/bundle" + bundle "install" should_be_installed "rack 1.0.0" end @@ -23,25 +24,29 @@ describe "bundle install" do dir.mkpath Dir.chdir(dir) do - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" expect(out).to include("installed into ./vendor/bundle") end dir.rmtree end - it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do - bundle "install --path vendor/bundle" + it "prints a warning to let the user know what has happened with config path vendor/bundle" do + bundle "config path vendor/bundle" + bundle "install" expect(out).to include("gems are installed into ./vendor") end - it "disallows --path vendor/bundle --system" do - bundle "install --path vendor/bundle --system" - expect(err).to include("Please choose.") + it "disallows config path vendor/bundle and install system" do + bundle "config path vendor/bundle" + bundle "install --system" + expect(err).to include("Please use only one.") end - it "remembers to disable system gems after the first time with bundle --path vendor/bundle" do - bundle "install --path vendor/bundle" + it "remembers to disable system gems after config path vendor/bundle" do + bundle "config path vendor/bundle" + bundle "install" FileUtils.rm_rf bundled_app("vendor") bundle "install" @@ -73,7 +78,10 @@ describe "bundle install" do [:env, :global].each do |type| it "installs gems to a path if one is specified" do set_bundle_path(type, bundled_app("vendor2").to_s) - bundle "install --path vendor/bundle" + # NOTE: This spec fails if we don't specify a scope or if we use --global. + # The precedence order is local -> env -> global: see Settings#[] (lib/bundler/settings.rb:L19). + bundle "config --local path vendor/bundle" + bundle "install" expect(vendored_gems("gems/rack-1.0.0")).to be_directory expect(bundled_app("vendor2")).not_to be_directory @@ -89,10 +97,6 @@ describe "bundle install" do end it "installs gems to BUNDLE_PATH relative to root when relative" do - # FIXME: If the bundle_path is `"vendor"` instead of - # `bundled_app("vendor").to_s`, this spec fails. As is, this spec - # may not test what happens when `path` is relative. - bundle "config path vendor" # set_bundle_path(type, bundled_app("vendor").to_s) @@ -116,7 +120,8 @@ describe "bundle install" do end it "sets BUNDLE_PATH as the first argument to bundle install" do - bundle "install --path ./vendor/bundle" + bundle "config path ./vendor/bundle" + bundle "install" expect(vendored_gems("gems/rack-1.0.0")).to be_directory should_be_installed "rack 1.0.0" @@ -125,7 +130,8 @@ describe "bundle install" do it "disables system gems when passing a path to install" do # This is so that vendored gems can be distributed to others build_gem "rack", "1.1.0", :to_system => true - bundle "install --path ./vendor/bundle" + bundle "config path ./vendor/bundle" + bundle "install" expect(vendored_gems("gems/rack-1.0.0")).to be_directory should_be_installed "rack 1.0.0" @@ -145,7 +151,10 @@ describe "bundle install" do gem "rack" G - bundle "install --path bundle" + # NOTE: This spec fails if we don't specify a scope or if we use --global. + bundle "config --local path bundle" + bundle "install" + expect(err).to match(/invalid symlink/) end end diff --git a/spec/install/post_bundle_message_spec.rb b/spec/install/post_bundle_message_spec.rb index e7e286880f..54fcbd2838 100644 --- a/spec/install/post_bundle_message_spec.rb +++ b/spec/install/post_bundle_message_spec.rb @@ -52,30 +52,34 @@ describe "post bundle message" do expect(out).to include("4 gems.rb dependencies, 2 gems now installed.") end - describe "with --path and" do + describe "with config path and" do it "without any options" do - bundle "install --path vendor" + bundle "config path vendor" + bundle "install" expect(out).to include(bundle_deployment_message) expect(out).to_not include("Gems in the group") expect(out).to include(bundle_complete_message) end it "with --without one group" do - bundle "install --without emo --path vendor" + bundle "config path vendor" + bundle "install --without emo" expect(out).to include(bundle_deployment_message) expect(out).to include("Gems in the group emo were not installed") expect(out).to include(bundle_complete_message) end it "with --without two groups" do - bundle "install --without emo test --path vendor" + bundle "config path vendor" + bundle "install --without emo test" expect(out).to include(bundle_deployment_message) expect(out).to include("Gems in the groups emo and test were not installed") expect(out).to include(bundle_complete_message) end it "with --without more groups" do - bundle "install --without emo obama test --path vendor" + bundle "config path vendor" + bundle "install --without emo obama test" expect(out).to include(bundle_deployment_message) expect(out).to include("Gems in the groups emo, obama and test were not installed") expect(out).to include(bundle_complete_message) diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb index 19a7b022a7..564dbaadc7 100644 --- a/spec/lock/lockfile_spec.rb +++ b/spec/lock/lockfile_spec.rb @@ -1139,7 +1139,8 @@ describe "the lockfile format" do gem "omg", :git => "#{lib_path("omg")}", :branch => 'master' G - bundle "install --path vendor" + bundle "config path vendor" + bundle "install" should_be_installed "omg 1.0" # Create a gems.locked that has duplicate GIT sections diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb index d5b631ea4b..d3672debc2 100644 --- a/spec/realworld/edgecases_spec.rb +++ b/spec/realworld/edgecases_spec.rb @@ -80,7 +80,8 @@ describe "real world edgecases", :realworld => true, :sometimes => true do gem 'rack', '1.0.1' G - bundle "install --path vendor/bundle", :expect_err => true + bundle "config path vendor/bundle" + bundle "install", :expect_err => true expect(err).not_to include("Could not find rake") expect(err).to lack_errors end diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index b618c4fac6..de17fee45b 100644 --- a/spec/runtime/setup_spec.rb +++ b/spec/runtime/setup_spec.rb @@ -377,13 +377,15 @@ describe "Bundler.setup" do end it "works even when the cache directory has been deleted" do - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" FileUtils.rm_rf vendored_gems("cache") should_be_installed "rack 1.0.0" end - it "does not randomly change the path when specifying --path and the bundle directory becomes read only" do - bundle "install --path vendor/bundle" + it "does not randomly change the path when specifying config path and the bundle directory becomes read only" do + bundle "config path vendor/bundle" + bundle "install" with_read_only("**/*") do should_be_installed "rack 1.0.0" diff --git a/spec/runtime/with_clean_env_spec.rb b/spec/runtime/with_clean_env_spec.rb index 7b1f11a8b2..bd6f0433bd 100644 --- a/spec/runtime/with_clean_env_spec.rb +++ b/spec/runtime/with_clean_env_spec.rb @@ -25,7 +25,8 @@ describe "Bundler.with_env helpers" do it "should keep the original GEM_PATH even in sub processes" do gemfile "" - bundle "install --path vendor/bundle" + bundle "config path vendor/bundle" + bundle "install" code = "Bundler.with_clean_env do;" \ " print ENV['GEM_PATH'] != '';" \ |