diff options
author | David RodrÃguez <[email protected]> | 2021-05-28 12:47:49 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2021-07-07 13:30:20 +0900 |
commit | 6e2240a2f954c84ed12357382c9c065ae4b91e11 (patch) | |
tree | ef4b33a9a67843cbc45aad510d7bca9f2a763496 /lib/rubygems/specification.rb | |
parent | 9952e9358ea73a1bda8d5f8c8672ee1c04892ce4 (diff) |
Sync latest bundler & rubygems development version
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4533
Diffstat (limited to 'lib/rubygems/specification.rb')
-rw-r--r-- | lib/rubygems/specification.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 7206c3eaf0..23a37e966b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -2421,7 +2421,6 @@ class Gem::Specification < Gem::BasicSpecification # still have their default values are omitted. def to_ruby - require_relative 'openssl' mark_version result = [] result << "# -*- encoding: utf-8 -*-" @@ -2455,16 +2454,21 @@ class Gem::Specification < Gem::BasicSpecification :has_rdoc, :default_executable, :metadata, + :signing_key, ] @@attributes.each do |attr_name| next if handled.include? attr_name current_value = self.send(attr_name) if current_value != default_value(attr_name) || self.class.required_attribute?(attr_name) - result << " s.#{attr_name} = #{ruby_code current_value}" unless defined?(OpenSSL::PKey::RSA) && current_value.is_a?(OpenSSL::PKey::RSA) + result << " s.#{attr_name} = #{ruby_code current_value}" end end + if String === signing_key + result << " s.signing_key = #{signing_key.dump}.freeze" + end + if @installed_by_version result << nil result << " s.installed_by_version = \"#{Gem::VERSION}\" if s.respond_to? :installed_by_version" |