mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Only run optional validations in packaging contexts
https://github.com/rubygems/rubygems/commit/f4fe949dfa
This commit is contained in:
parent
e9c8066bd9
commit
8739bc449f
Notes:
git
2020-06-05 07:33:35 +09:00
2 changed files with 12 additions and 1 deletions
|
@ -44,7 +44,7 @@ class Gem::SpecificationPolicy
|
|||
def validate(strict = false)
|
||||
validate_required!
|
||||
|
||||
validate_optional(strict)
|
||||
validate_optional(strict) if packaging || strict
|
||||
|
||||
true
|
||||
end
|
||||
|
|
|
@ -3141,6 +3141,17 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||
WARNING
|
||||
end
|
||||
|
||||
def test_validate_license_in_a_non_packaging_context
|
||||
util_setup_validate
|
||||
|
||||
use_ui @ui do
|
||||
@a1.licenses.clear
|
||||
@a1.validate(false)
|
||||
end
|
||||
|
||||
assert_empty @ui.error
|
||||
end
|
||||
|
||||
def test_removed_methods
|
||||
assert_equal Gem::Specification::REMOVED_METHODS, [:rubyforge_project=]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue