[前][次][番号順一覧][スレッド一覧]

ruby-changes:57789

From: David <ko1@a...>
Date: Wed, 18 Sep 2019 21:31:45 +0900 (JST)
Subject: [ruby-changes:57789] a29ead52e1 (master): [bundler/bundler] Deprecate `--path` flag to `bundle check`

https://git.ruby-lang.org/ruby.git/commit/?id=a29ead52e1

From a29ead52e169cf702a61ba91cdf301a3bd87d713 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Fri, 16 Aug 2019 12:08:22 +0200
Subject: [bundler/bundler] Deprecate `--path` flag to `bundle check`

https://github.com/bundler/bundler/commit/0a0e7cf5ec

diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 661985d..9dadbec 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -156,6 +156,8 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L156
       "Specify a different path than the system default ($BUNDLE_PATH or $GEM_HOME).#{" Bundler will remember this value for future installs on this machine" unless Bundler.feature_flag.forget_cli_options?}"
     map "c" => "check"
     def check
+      remembered_flag_deprecation("path")
+
       require_relative "cli/check"
       Check.new(options).run
     end
diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb
index 2a819c9..ee153a8 100644
--- a/spec/bundler/other/major_deprecation_spec.rb
+++ b/spec/bundler/other/major_deprecation_spec.rb
@@ -95,6 +95,28 @@ RSpec.describe "major deprecations" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/other/major_deprecation_spec.rb#L95
     end
   end
 
+  context "bundle check --path" do
+    before do
+      install_gemfile <<-G
+        source "#{file_uri_for(gem_repo1)}"
+        gem "rack"
+      G
+
+      bundle "check --path vendor/bundle"
+    end
+
+    it "should print a deprecation warning", :bundler => "2" do
+      expect(deprecations).to include(
+        "The `--path` flag is deprecated because it relies on being " \
+        "remembered accross bundler invokations, which bundler will no " \
+        "longer do in future versions. Instead please use `bundle config set " \
+        "path 'vendor/bundle'`, and stop using this flag"
+      )
+    end
+
+    pending "should fail with a helpful error", :bundler => "3"
+  end
+
   describe "bundle config" do
     describe "old list interface" do
       before do
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]