[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 коммит произвёл Hiroshi SHIBATA
Родитель 6ffc045a81
Коммит 8436b2717c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F9CF13417264FAC2
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -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.