From 332160da4a4ca55df3c2f045a0b4662daa3034ea Mon Sep 17 00:00:00 2001 From: Orien Madgwick <_@orien.io> Date: Thu, 28 Nov 2019 07:24:39 +1100 Subject: [PATCH] Add project metadata to the gemspec 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. --- mysql2.gemspec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mysql2.gemspec b/mysql2.gemspec index ef6401cb9..cc9a55e48 100644 --- a/mysql2.gemspec +++ b/mysql2.gemspec @@ -10,6 +10,13 @@ Mysql2::GEMSPEC = Gem::Specification.new do |s| s.homepage = 'https://github.com/brianmario/mysql2' s.rdoc_options = ["--charset=UTF-8"] s.summary = 'A simple, fast Mysql library for Ruby, binding to libmysql' + s.metadata = { + 'bug_tracker_uri' => "#{s.homepage}/issues", + 'changelog_uri' => "#{s.homepage}/releases/tag/#{s.version}", + 'documentation_uri' => "https://www.rubydoc.info/gems/mysql2/#{s.version}", + 'homepage_uri' => s.homepage, + 'source_code_uri' => "#{s.homepage}/tree/#{s.version}", + } s.required_ruby_version = '>= 2.0.0' s.files = `git ls-files README.md CHANGELOG.md LICENSE ext lib support`.split