[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
@ -44,7 +44,7 @@ class Gem::SpecificationPolicy
|
|||||||
def validate(strict = false)
|
def validate(strict = false)
|
||||||
validate_required!
|
validate_required!
|
||||||
|
|
||||||
validate_optional(strict)
|
validate_optional(strict) if packaging || strict
|
||||||
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
@ -3141,6 +3141,17 @@ http://spdx.org/licenses or 'Nonstandard' for a nonstandard license.
|
|||||||
WARNING
|
WARNING
|
||||||
end
|
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
|
def test_removed_methods
|
||||||
assert_equal Gem::Specification::REMOVED_METHODS, [:rubyforge_project=]
|
assert_equal Gem::Specification::REMOVED_METHODS, [:rubyforge_project=]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user