diff options
-rw-r--r-- | .rubocop.yml | 5 | ||||
-rw-r--r-- | lib/bundler/cli/install.rb | 6 | ||||
-rw-r--r-- | spec/other/major_deprecation_spec.rb | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 8ad27fbe..cbce695f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -118,3 +118,8 @@ Metrics/AbcSize: Metrics/CyclomaticComplexity: Enabled: false + +# It will be obvious which code is complex, Rubocop should only lint simple +# rules for us. +Metrics/PerceivedComplexity: + Enabled: false diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index 07950c90..30673241 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -55,6 +55,12 @@ module Bundler Bundler::Fetcher.disable_endpoint = options["full-index"] + if options["binstubs"] + Bundler.ui.deprecate("The --binstubs option will be removed from "\ + "Bundler 2.0 and replaced with "\ + "`bundle binstubs`\n") + end + # rubygems plugins sometimes hook into the gem install process Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb index a3d8fd12..0b41a723 100644 --- a/spec/other/major_deprecation_spec.rb +++ b/spec/other/major_deprecation_spec.rb @@ -74,5 +74,16 @@ describe "major deprecations" do expect(warnings).not_to have_major_deprecation end end + + describe "bundle install --binstubs" do + it "should output a deprecation warning" do + gemfile <<-G + gem 'rack' + G + + bundle :install, :binstubs + expect(warnings).to have_major_deprecation a_string_including("The --binstubs option will be removed") + end + end end end |