1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Add a gem attr to the Gem::Package class.

https://github.com/rubygems/rubygems/commit/5b81f364ae
This commit is contained in:
Daniel Berger 2019-07-11 09:20:43 -04:00 committed by Hiroshi SHIBATA
parent 6ffc045a81
commit 8436b2717c
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 10 additions and 0 deletions

View file

@ -99,6 +99,11 @@ class Gem::Package
attr_reader :files
##
# Reference to the gem being packaged.
attr_reader :gem
##
# The security policy used for verifying the contents of this package.

View file

@ -1093,6 +1093,11 @@ class TestGemPackage < Gem::Package::TarTestCase
assert_equal @spec, package.spec
end
def test_gem_attr
package = Gem::Package.new(@gem)
assert_equal(package.gem, @gem)
end
def test_spec_from_io
# This functionality is used by rubygems.org to extract spec data from an
# uploaded gem before it is written to storage.