Skip to content

Commit 50dde74

Browse files
authored
Add source code and documentation links to the gemspec (#48)
RubyGems shows the links stored for the 0.x gem, which point to c7/personnummer, for every version whose gemspec has no link metadata. Set source_code_uri so the gem page points here. When a version has any link in its metadata, RubyGems stops generating the rubydoc.info link, so documentation_uri is set too.
1 parent 6b0ebaa commit 50dde74

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎personnummer.gemspec‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ Gem::Specification.new do |s|
1515
s.require_paths = ["lib"]
1616
s.homepage = 'https://github.com/personnummer/ruby'
1717
s.license = 'MIT'
18+
# RubyGems falls back to links stored for the 0.x gem when these are missing.
19+
s.metadata = {
20+
'source_code_uri' => 'https://github.com/personnummer/ruby',
21+
'documentation_uri' => 'https://www.rubydoc.info/gems/personnummer'
22+
}
1823
# The oldest Ruby in the CI matrix.
1924
s.required_ruby_version = '>= 3.3'
2025
s.add_development_dependency 'rake'

0 commit comments

Comments
 (0)