Skip to content

Add source code and documentation links to the gemspec - #48

Merged
rasmusbe merged 1 commit into
mainfrom
build/gemspec-metadata
Nov 17, 2026
Merged

rasmusbe merged 1 commit into
mainfrom
build/gemspec-metadata

Conversation

@rasmusbe

Copy link
Copy Markdown
Member

Adds metadata to the gemspec with source_code_uri and documentation_uri.

The gem page on RubyGems links to c7/personnummer as the source code. That link was stored with version 0.0.7 in 2012, and RubyGems uses the stored links for every version whose gemspec has no link metadata. 3.1.0 and 3.1.1 have none.

When a version has any link in its metadata, RubyGems reads all of them from there and no longer generates the link to rubydoc.info. That is why documentation_uri is set as well.

The version is not bumped here, so the gem page changes with the next release. The pages for 3.1.0 and 3.1.1 keep the old link.

Checked with gem build and gem specification personnummer-3.1.1.gem metadata: both fields are in the built gem.

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.
@rasmusbe
rasmusbe merged commit 50dde74 into main Nov 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant