ruby-changes:68069
From: Ellen <ko1@a...>
Date: Wed, 22 Sep 2021 10:19:50 +0900 (JST)
Subject: [ruby-changes:68069] cd2e6318f6 (master): [rubygems/rubygems] Only check if descriptions *start with* FIXME/TODO
https://git.ruby-lang.org/ruby.git/commit/?id=cd2e6318f6 From cd2e6318f6502018d398cb9706a286ef5b202bf4 Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash <me@d...> Date: Fri, 13 Aug 2021 15:59:46 -0400 Subject: [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 --- lib/rubygems/specification_policy.rb | 2 +- test/rubygems/test_gem_specification.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/specification_policy.rb b/lib/rubygems/specification_policy.rb index 1f1f73b..c30ec70 100644 --- a/lib/rubygems/specification_policy.rb +++ b/lib/rubygems/specification_policy.rb @@ -381,7 +381,7 @@ http://spdx.org/licenses or '#{Gem::Licenses::NONSTANDARD}' for a nonstandard li https://github.com/ruby/ruby/blob/trunk/lib/rubygems/specification_policy.rb#L381 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 diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 88afa3f..782ae03 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -2781,6 +2781,20 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use: https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L2781 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/