Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source_code, homepage and changelog uris to gemspec metadata #1017

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

vinistock
Copy link
Contributor

Add source_code, homepage and changelog uris to the gemspec metadata. These fields are used to populate links on rubygems.org. Also, dependabot uses changelog_uri on update PRs, which is a nice convenience.

@@ -28,6 +28,10 @@ RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentat
s.homepage = "https://ruby.github.io/rdoc"
s.licenses = ["Ruby"]

s.metadata["homepage_uri"] = s.homepage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn’t rubygems.org fallback to #homepage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think a lot of tools favour homepage over metadata, but I thought it wouldn't harm to add it. Do you prefer not adding homepage_uri?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just I was curious a little.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata.homepage_uri value is going to be copied from homepage when metadata.homepage_uri was not given. So, it'd be better to keep metadata.homepage_uri empty if there's no special reason to specify both. We don't need to repeat what RubyGems internally does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amatsuda That method looks like just validating Specification#homepage, but nothing about metadata["homepage_uri"], no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! My bad, please forget about my comment above...!

@vinistock vinistock requested a review from nobu June 15, 2023 14:37
@nobu nobu merged commit b93687f into ruby:master Jul 5, 2023
@vinistock vinistock deleted the vs/add_metadata_urls branch July 5, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants