summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-14 12:55:30 +0900
committernagachika <nagachika@ruby-lang.org>2021-07-07 10:03:15 +0900
commitf63d3bbb6e27daaac8211c57929d62add4fef1ad (patch)
treee3fa1606e7c7ce3612cbe355dfd9d53da18b3356 /lib
parentd4b4281959d2a9846d766253b5e21e8158948aa7 (diff)
Merge RubyGems-3.2.19 and Bundler-2.2.19
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/settings.rb15
-rw-r--r--lib/bundler/source/rubygems.rb4
-rw-r--r--lib/bundler/version.rb2
-rw-r--r--lib/rubygems.rb2
-rw-r--r--lib/rubygems/command.rb2
-rw-r--r--lib/rubygems/commands/build_command.rb2
6 files changed, 19 insertions, 8 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 0702a80440..11227314a7 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -442,7 +442,20 @@ module Bundler
valid_file = file.exist? && !file.size.zero?
return {} unless valid_file
require_relative "yaml_serializer"
- YAMLSerializer.load file.read
+ YAMLSerializer.load(file.read).inject({}) do |config, (k, v)|
+ new_k = k
+
+ if k.include?("-")
+ Bundler.ui.warn "Your #{file} config includes `#{k}`, which contains the dash character (`-`).\n" \
+ "This is deprecated, because configuration through `ENV` should be possible, but `ENV` keys cannot include dashes.\n" \
+ "Please edit #{file} and replace any dashes in configuration keys with a triple underscore (`___`)."
+
+ new_k = k.gsub("-", "___")
+ end
+
+ config[new_k] = v
+ config
+ end
end
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index a11a89cf72..ee317957f0 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -398,10 +398,6 @@ module Bundler
next if gemfile =~ /^bundler\-[\d\.]+?\.gem/
s ||= Bundler.rubygems.spec_from_gem(gemfile)
s.source = self
- if Bundler.rubygems.spec_missing_extensions?(s, false)
- Bundler.ui.debug "Source #{self} is ignoring #{s} because it is missing extensions"
- next
- end
idx << s
end
diff --git a/lib/bundler/version.rb b/lib/bundler/version.rb
index 8e327e0951..de2a02d140 100644
--- a/lib/bundler/version.rb
+++ b/lib/bundler/version.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: false
module Bundler
- VERSION = "2.2.18".freeze
+ VERSION = "2.2.19".freeze
def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index dec57f8309..f1f7a30a73 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -8,7 +8,7 @@
require 'rbconfig'
module Gem
- VERSION = "3.2.18".freeze
+ VERSION = "3.2.19".freeze
end
# Must be first since it unloads the prelude from 1.9.2
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 9f935e6285..303f54a7d7 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -355,6 +355,8 @@ class Gem::Command
def add_option(*opts, &handler) # :yields: value, options
group_name = Symbol === opts.first ? opts.shift : :options
+ raise "Do not pass an empty string in opts" if opts.include?("")
+
@option_groups[group_name] << [opts, handler]
end
diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb
index fff5f7c76f..842ec1855a 100644
--- a/lib/rubygems/commands/build_command.rb
+++ b/lib/rubygems/commands/build_command.rb
@@ -23,7 +23,7 @@ class Gem::Commands::BuildCommand < Gem::Command
options[:output] = value
end
- add_option '-C PATH', '', 'Run as if gem build was started in <PATH> instead of the current working directory.' do |value, options|
+ add_option '-C PATH', 'Run as if gem build was started in <PATH> instead of the current working directory.' do |value, options|
options[:build_path] = value
end
end