diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-11-22 20:32:19 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-11-22 21:50:22 +0900 |
commit | 14704023ec57546b1bed85d54f4f425986385ab4 (patch) | |
tree | dbf1b3479c60dcb6a4bf71eb464b85a2ab080e54 /lib/bundler | |
parent | b102175b4dcfebe7455e3b27653fab0288f68326 (diff) |
Merge RubyGems-3.3.26 and Bundler-2.3.26
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/cli.rb | 2 | ||||
-rw-r--r-- | lib/bundler/man/bundle-clean.1 | 2 | ||||
-rw-r--r-- | lib/bundler/man/bundle-clean.1.ronn | 2 | ||||
-rw-r--r-- | lib/bundler/rubygems_ext.rb | 22 | ||||
-rw-r--r-- | lib/bundler/version.rb | 2 |
5 files changed, 26 insertions, 4 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 3ba4d0f8c4..c5edfadd37 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -620,7 +620,7 @@ module Bundler method_option "dry-run", :type => :boolean, :default => false, :banner => "Only print out changes, do not clean gems" method_option "force", :type => :boolean, :default => false, :banner => - "Forces clean even if --path is not set" + "Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application." def clean require_relative "cli/clean" Clean.new(options.dup).run diff --git a/lib/bundler/man/bundle-clean.1 b/lib/bundler/man/bundle-clean.1 index f89ae3a1b0..27e249cb64 100644 --- a/lib/bundler/man/bundle-clean.1 +++ b/lib/bundler/man/bundle-clean.1 @@ -20,5 +20,5 @@ Print the changes, but do not clean the unused gems\. . .TP \fB\-\-force\fR -Force a clean even if \fB\-\-path\fR is not set\. +Forces cleaning up unused gems even if Bundler is configured to use globally installed gems\. As a consequence, removes all system gems except for the ones in the current application\. diff --git a/lib/bundler/man/bundle-clean.1.ronn b/lib/bundler/man/bundle-clean.1.ronn index de23991782..dae27c21ee 100644 --- a/lib/bundler/man/bundle-clean.1.ronn +++ b/lib/bundler/man/bundle-clean.1.ronn @@ -15,4 +15,4 @@ useful when you have made many changes to your gem dependencies. * `--dry-run`: Print the changes, but do not clean the unused gems. * `--force`: - Force a clean even if `--path` is not set. + Forces cleaning up unused gems even if Bundler is configured to use globally installed gems. As a consequence, removes all system gems except for the ones in the current application. diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index d53d688009..12d6789065 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb @@ -308,6 +308,28 @@ module Gem end end + # On universal Rubies, resolve the "universal" arch to the real CPU arch, without changing the extension directory. + class Specification + if /^universal\.(?<arch>.*?)-/ =~ (CROSS_COMPILING || RUBY_PLATFORM) + local_platform = Platform.local + if local_platform.cpu == "universal" + ORIGINAL_LOCAL_PLATFORM = local_platform.to_s.freeze + + local_platform.cpu = if arch == "arm64e" # arm64e is only permitted for Apple system binaries + "arm64" + else + arch + end + + def extensions_dir + Gem.default_ext_dir_for(base_dir) || + File.join(base_dir, "extensions", ORIGINAL_LOCAL_PLATFORM, + Gem.extension_api_version) + end + end + end + end + require "rubygems/util" Util.singleton_class.module_eval do diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb index 953e62c610..4957902683 100644 --- a/lib/bundler/version.rb +++ b/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "2.3.25".freeze + VERSION = "2.3.26".freeze def self.bundler_major_version @bundler_major_version ||= VERSION.split(".").first.to_i |