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:
parent
6ffc045a81
commit
8436b2717c
2 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue