Skip to content

Commit

Permalink
Add gemspec metadata
Browse files Browse the repository at this point in the history
Makes it easy to programatically find the source code and changelog for rubocop,
using the rubygems API. Also adds a changelog link etc. to
https://rubygems.org/gems/rubocop

See rubygems/rubygems.org#1234 and
https://github.com/rubygems/rubygems.org/blob/master/app/models/links.rb for
more details.

I did not add `wiki_uri`, `mailing_list_uri` and `download_uri` because 1) the
only wiki I could find (https://github.com/bbatsov/rubocop/wiki) looks
abandoned; 2) there is no mailing list that I know of, and 3) rubygems.org will
add a download link, e.g. https://rubygems.org/downloads/rubocop-0.49.1.gem if
we don't add one.

Also changing `s.homepage` to use https protocol.
  • Loading branch information
bquorning authored and bbatsov committed Sep 12, 2017
1 parent eb42226 commit bf52e75
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'rubocop/version'
require 'English'

# rubocop:disable Metrics/BlockLength
Gem::Specification.new do |s|
s.name = 'rubocop'
s.version = RuboCop::Version::STRING
Expand All @@ -21,10 +22,20 @@ Gem::Specification.new do |s|
.split($RS)
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.extra_rdoc_files = ['LICENSE.txt', 'README.md']
s.homepage = 'http://github.com/bbatsov/rubocop'
s.homepage = 'https://github.com/bbatsov/rubocop'
s.licenses = ['MIT']
s.summary = 'Automatic Ruby code style checking tool.'

if s.respond_to?(:metadata=)
s.metadata = {
'homepage_uri' => 'https://rubocop.readthedocs.io/',
'changelog_uri' => 'https://github.com/bbatsov/rubocop/blob/master/CHANGELOG.md',
'source_code_uri' => 'https://github.com/bbatsov/rubocop/',
'documentation_uri' => 'https://rubocop.readthedocs.io/',
'bug_tracker_uri' => 'https://github.com/bbatsov/rubocop/issues'
}
end

s.add_runtime_dependency('rainbow', '>= 2.2.2', '< 3.0')
s.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0')
s.add_runtime_dependency('powerpack', '~> 0.1')
Expand All @@ -34,3 +45,4 @@ Gem::Specification.new do |s|

s.add_development_dependency('bundler', '~> 1.3')
end
# rubocop:enable Metrics/BlockLength

0 comments on commit bf52e75

Please sign in to comment.