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 project metadata to the gemspec #1089

Merged
merged 1 commit into from
Mar 9, 2020
Merged

Add project metadata to the gemspec #1089

merged 1 commit into from
Mar 9, 2020

Conversation

orien
Copy link
Contributor

@orien orien commented Nov 27, 2019

Add bug_tracker_uri, changelog_uri, documentation_uri, homepage_uri, and source_code_uri to the gemspec metadata.

These project metadata will facilitate easy access to project information. The URI will be available on the Rubygems project page, via the rubygems API, and the gem and bundle command-line tools with the next release.

@orien
Copy link
Contributor Author

orien commented Mar 4, 2020

@sodabrew could I trouble you for a review?

As per https://guides.rubygems.org/specification-reference/#metadata,
add metadata to the gemspec file. This'll allow people to more easily
access the source code, raise issues and read the changelog. These
bug_tracker_uri, changelog_uri, documentation_uri, homepage_uri and
source_code_uri links will appear on the rubygems page at
https://rubygems.org/gems/mysql2 and be available via the rubygems API
after the next release.
Copy link
Collaborator

@sodabrew sodabrew left a comment

Choose a reason for hiding this comment

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

Thanks for this! One nit, if you can switch to atom: value syntax but otherwise this looks great.

'documentation_uri' => "https://www.rubydoc.info/gems/mysql2/#{s.version}",
'homepage_uri' => s.homepage,
'source_code_uri' => "#{s.homepage}/tree/#{s.version}",
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: colon syntax preferred vs. hash-rockets.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, you can't use colon syntax when the keys are strings. The Rubygems spec requires the keys to be strings:

All keys and values must be Strings

https://guides.rubygems.org/specification-reference/#metadata

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, well then. Let's merge!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks 🎉

@sodabrew sodabrew merged commit 1b15d78 into brianmario:master Mar 9, 2020
@sodabrew sodabrew added this to the 0.5.4 milestone Mar 9, 2020
@orien orien deleted the gem-metadata branch March 9, 2020 23:03
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.

2 participants