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

[rubygems/rubygems] Only check if descriptions *start with* FIXME/TODO

It doesn't make much sense to just forbid certain words in descriptions.

https://github.com/rubygems/rubygems/commit/7890c98415
This commit is contained in:
Ellen Marie Dash 2021-08-13 15:59:46 -04:00 committed by Hiroshi SHIBATA
parent eaeb5bf0bc
commit cd2e6318f6
2 changed files with 15 additions and 1 deletions

View file

@ -381,7 +381,7 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li
end
LAZY = '"FIxxxXME" or "TOxxxDO"'.gsub(/xxx/, '')
LAZY_PATTERN = /FI XME|TO DO/x.freeze
LAZY_PATTERN = /^FI XME|^TO DO/x.freeze
HOMEPAGE_URI_PATTERN = /\A[a-z][a-z\d+.-]*:/i.freeze
def validate_lazy_metadata

View file

@ -2781,6 +2781,20 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
end
assert_equal %("#{f}" or "#{t}" is not a description), e.message
# Adding #{f} anywhere after the start of the description should be fine.
@a1.description = "(some description) #{f}"
assert_nothing_raised do
@a1.validate
end
# Adding #{t} anywhere after the start of the description should be fine.
@a1.description = "(some description) #{t}"
assert_nothing_raised do
@a1.validate
end
end
end