diff options
author | Drew Stevenson <[email protected]> | 2023-11-30 22:35:33 -0600 |
---|---|---|
committer | git <[email protected]> | 2023-12-14 00:06:05 +0000 |
commit | beefce1444adafac484bb69b625de2b30e7e80d2 () | |
tree | 5c3318fecd5ba177253e24ffa62446fd23a1a4e3 /lib/rubygems/specification_policy.rb | |
parent | d7dad644658697a05949b66e736a34fb772771de (diff) |
[rubygems/rubygems] Warn for duplicate meta data links
Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model. Add missing download_uri key. https://.com/rubygems/rubygems/commit/d2922cd6e9
-rw-r--r-- | lib/rubygems/specification_policy.rb | 27 |
1 files changed, 23 insertions, 4 deletions
@@ -12,13 +12,14 @@ class Gem::SpecificationPolicy VALID_URI_PATTERN = %r{\Ahttps?:\/\/([^\s:@]+:[^\s:@]*@)?[A-Za-z\d\-]+(\.[A-Za-z\d\-]+)+\.?(:\d{1,5})?([\/?]\S*)?\z} # :nodoc: METADATA_LINK_KEYS = %w[ - bug_tracker_uri - changelog_uri - documentation_uri homepage_uri - mailing_list_uri source_code_uri wiki_uri funding_uri ].freeze # :nodoc: @@ -106,6 +107,8 @@ class Gem::SpecificationPolicy validate_removed_attributes if @warnings > 0 if strict error "specification has warnings" @@ -501,6 +504,22 @@ You have specified rake based extension, but rake is not added as dependency. It WARNING end def warning(statement) # :nodoc: @warnings += 1 |