Gem development: recommended gem metadata

Updated . Posted . Visible to the public. Repeats.

The gemspec for gems allows to add metadata to your gem, some of which have a special meaning and are helpful for users.
You can provide links to your Github bugtracker or changelog file that are then used on the rubygems page of your gem (in the sidebar, e.g. see gem page of consul Show archive.org snapshot ).

Here are some keys that should be filled:

Gem::Specification.new do |s|
  s.name = 'my-gem'
  s.homepage = 'https://github.com/makandra/my-gem'

  s.metadata = {
    'source_code_uri' => s.homepage,
    'bug_tracker_uri' => s.homepage + '/issues',
    'changelog_uri' => s.homepage + '/blob/master/CHANGELOG.md',
    'rubygems_mfa_required' => 'true',
  }
  ...
end
Daniel Straßner
Last edit
Michael Leimstädtner
License
Source code in this card is licensed under the MIT License.
Posted by Daniel Straßner to makandra dev (2022-03-16 10:35)