-
Notifications
You must be signed in to change notification settings - Fork 550
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
Conversation
@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.
There was a problem hiding this 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}", | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
Add
bug_tracker_uri
,changelog_uri
,documentation_uri
,homepage_uri
, andsource_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
andbundle
command-line tools with the next release.