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

ruby-changes:61323

From: Hiroshi <ko1@a...>
Date: Fri, 22 May 2020 20:32:56 +0900 (JST)
Subject: [ruby-changes:61323] c7ebeb7eda (master): Sync Bundler PR #3624

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

From c7ebeb7eda9f7f6bbb48effe1efc026eeb64d09c Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Fri, 15 May 2020 21:31:12 +0900
Subject: Sync Bundler PR #3624


diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index bb92a28..dfc5254 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -222,7 +222,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/dsl.rb#L222
 
     def github(repo, options = {})
       raise ArgumentError, "GitHub sources require a block" unless block_given?
-      raise DeprecatedError, "The #github method has been removed" if Bundler.feature_flag.skip_default_git_sources?
       github_uri  = @git_sources["github"].call(repo)
       git_options = normalize_hash(options).merge("uri" => github_uri)
       git_source  = @sources.add_git_source(git_options)
@@ -283,8 +282,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/dsl.rb#L282
   private
 
     def add_git_sources
-      return if Bundler.feature_flag.skip_default_git_sources?
-
       git_source(:github) do |repo_name|
         warn_deprecated_git_source(:github, <<-'RUBY'.strip, 'Change any "reponame" :github sources to "username/reponame".')
 "https://github.com/#{repo_name}.git"
diff --git a/lib/bundler/feature_flag.rb b/lib/bundler/feature_flag.rb
index e0f99b9..fd76d9e 100644
--- a/lib/bundler/feature_flag.rb
+++ b/lib/bundler/feature_flag.rb
@@ -41,7 +41,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/feature_flag.rb#L41
     settings_flag(:plugins) { @bundler_version >= Gem::Version.new("1.14") }
     settings_flag(:print_only_version_number) { bundler_3_mode? }
     settings_flag(:setup_makes_kernel_gem_public) { !bundler_3_mode? }
-    settings_flag(:skip_default_git_sources) { bundler_3_mode? }
     settings_flag(:specific_platform) { bundler_3_mode? }
     settings_flag(:suppress_install_using_messages) { bundler_3_mode? }
     settings_flag(:unlock_source_unlocks_spec) { !bundler_3_mode? }
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 2b4706a..5979580 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -76,7 +76,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L76
 
           I tried...
 
-        - **Have you read our issues document, https://github.com/rubygems/bundler/blob/master/doc/contributing/ISSUES.md?**
+        - **Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/doc/contributing/ISSUES.md?**
 
           ...
 
@@ -100,7 +100,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L100
         #{issues_url(e)}
 
         If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
-        https://github.com/rubygems/bundler/issues/new
+        https://github.com/rubygems/rubygems/issues/new
       EOS
     end
 
@@ -108,7 +108,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/friendly_errors.rb#L108
       message = exception.message.lines.first.tr(":", " ").chomp
       message = message.split("-").first if exception.is_a?(Errno)
       require "cgi"
-      "https://github.com/rubygems/bundler/search?q=" \
+      "https://github.com/rubygems/rubygems/search?q=" \
         "#{CGI.escape(message)}&type=Issues"
     end
   end
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index f1da5dd..d6962e5 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -42,7 +42,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/settings.rb#L42
       setup_makes_kernel_gem_public
       silence_deprecations
       silence_root_warning
-      skip_default_git_sources
       specific_platform
       suppress_install_using_messages
       unlock_source_unlocks_spec
diff --git a/man/bundle-config.1 b/man/bundle-config.1
index 001ec57..3ea408e 100644
--- a/man/bundle-config.1
+++ b/man/bundle-config.1
@@ -262,9 +262,6 @@ The following is a list of all configuration keys and their purpose\. You can le https://github.com/ruby/ruby/blob/trunk/man/bundle-config.1#L262
 \fBsilence_root_warning\fR (\fBBUNDLE_SILENCE_ROOT_WARNING\fR): Silence the warning Bundler prints when installing gems as root\.
 .
 .IP "\(bu" 4
-\fBskip_default_git_sources\fR (\fBBUNDLE_SKIP_DEFAULT_GIT_SOURCES\fR): Whether Bundler should skip adding default git source shortcuts to the Gemfile DSL\.
-.
-.IP "\(bu" 4
 \fBspecific_platform\fR (\fBBUNDLE_SPECIFIC_PLATFORM\fR): Allow bundler to resolve for the specific running platform and store it in the lockfile, instead of only using a generic platform\. A specific platform is the exact platform triple reported by \fBGem::Platform\.local\fR, such as \fBx86_64\-darwin\-16\fR or \fBuniversal\-java\-1\.8\fR\. On the other hand, generic platforms are those such as \fBruby\fR, \fBmswin\fR, or \fBjava\fR\. In this example, \fBx86_64\-darwin\-16\fR would map to \fBruby\fR and \fBuniversal\-java\-1\.8\fR to \fBjava\fR\.
 .
 .IP "\(bu" 4
diff --git a/man/bundle-config.1.txt b/man/bundle-config.1.txt
index 219c27b..657cba7 100644
--- a/man/bundle-config.1.txt
+++ b/man/bundle-config.1.txt
@@ -312,10 +312,6 @@ LIST OF AVAILABLE KEYS https://github.com/ruby/ruby/blob/trunk/man/bundle-config.1.txt#L312
        o   silence_root_warning   (BUNDLE_SILENCE_ROOT_WARNING):  Silence  the
            warning Bundler prints when installing gems as root.
 
-       o   skip_default_git_sources (BUNDLE_SKIP_DEFAULT_GIT_SOURCES): Whether
-           Bundler  should  skip  adding  default  git source shortcuts to the
-           Gemfile DSL.
-
        o   specific_platform  (BUNDLE_SPECIFIC_PLATFORM):  Allow  bundler   to
            resolve  for  the  specific  running  platform  and store it in the
            lockfile, instead of only using  a  generic  platform.  A  specific
diff --git a/man/bundle-config.ronn b/man/bundle-config.ronn
index 7b7d417..a2cb42b 100644
--- a/man/bundle-config.ronn
+++ b/man/bundle-config.ronn
@@ -249,9 +249,6 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html). https://github.com/ruby/ruby/blob/trunk/man/bundle-config.ronn#L249
    be changed in the next major version.
 * `silence_root_warning` (`BUNDLE_SILENCE_ROOT_WARNING`):
    Silence the warning Bundler prints when installing gems as root.
-* `skip_default_git_sources` (`BUNDLE_SKIP_DEFAULT_GIT_SOURCES`):
-   Whether Bundler should skip adding default git source shortcuts to the
-   Gemfile DSL.
 * `specific_platform` (`BUNDLE_SPECIFIC_PLATFORM`):
    Allow bundler to resolve for the specific running platform and store it in
    the lockfile, instead of only using a generic platform.
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index a56e148..20b7609 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -141,17 +141,17 @@ RSpec.describe "bundle executable" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/cli_spec.rb#L141
   describe "printing the outdated warning" do
     shared_examples_for "no warning" do
       it "prints no warning" do
-        bundle "fail"
+        bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }
         expect(last_command.stdboth).to eq("Could not find command \"fail\".")
       end
     end
 
-    let(:bundler_version) { "1.1" }
+    let(:bundler_version) { "2.0" }
     let(:latest_version) { nil }
     before do
       bundle! "config set --global disable_version_check false"
 
-      system_gems "bundler-#{bundler_version}"
+      pristine_system_gems "bundler-#{bundler_version}"
       if latest_version
         info_path = home(".bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/info/bundler")
         info_path.parent.mkpath
@@ -176,7 +176,7 @@ RSpec.describe "bundle executable" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/cli_spec.rb#L176
     context "when the latest version is greater than the current version" do
       let(:latest_version) { "222.0" }
       it "prints the version warning" do
-        bundle "fail", :system_bundler => true, :env => { "BUNDLER_SPEC_IGNORE_DEFAULT_BUNDLER_GEM" => "true" }
+        bundle "fail", :env => { "BUNDLER_VERSION" => bundler_version }
         expect(err).to start_with(<<-EOS.strip)
 The latest bundler is #{latest_version}, but you are currently running #{bundler_version}.
 To install the latest version, run `gem install bundler`
@@ -184,16 +184,16 @@ To install the latest version, run `gem install bundler` https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/cli_spec.rb#L184
       end
 
       context "and disable_version_check is set" do
-        before { bundle! "config set disable_version_check true" }
+        before { bundle! "config set disable_version_check true", :env => { "BUNDLER_VERSION" => bundler_version } }
         include_examples "no warning"
       end
 
       context "running a parseable command" do
         it "prints no warning" do
-          bundle! "config get --parseable foo"
+          bundle! "config get --parseable foo", :env => { "BUNDLER_VERSION" => bundler_version }
           expect(last_command.stdboth).to eq ""
 
-          bundle "platform --ruby"
+          bundle "platform --ruby", :env => { "BUNDLER_VERSION" => bundler_version }
           expect(last_command.stdboth).to eq "Could not locate Gemfile"
         end
       end
@@ -201,7 +201,7 @@ To install the latest version, run `gem install bundler` https://github.com/ruby/ruby/blob/trunk/spec/bundler/bundler/cli_spec.rb#L201
       context "and is a pre-release" do
         let(:latest_version) { "222.0.0.pre.4" }
         it "prints the version warning" do
-          bundle "fail", :system_bundler => true, :env => { "BUNDLER_SPEC_I (... truncated)

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

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