Read more

Gem development: recommended gem metadata

Daniel Straßner
March 16, 2022Software engineer at makandra GmbH

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 ).

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more 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
Posted by Daniel Straßner to makandra dev (2022-03-16 11:35)