Skip to content

Commit

Permalink
Remove unnecessary condition in rubocop.gemspec
Browse files Browse the repository at this point in the history
`Gem::Specification#metadata` method has been added in RubyGems 2.0.0.

- https://github.com/rubygems/rubygems/blob/v2.7.6/History.txt#L1892
- rubygems/rubygems@be483b9

RuboCop supports Ruby 2.1 or higher, we will not have the opportunity to
use old RubyGems under 2.0.0.
  • Loading branch information
koic authored and bbatsov committed Mar 20, 2018
1 parent 0a20cb9 commit ee53ffd
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions rubocop.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ Gem::Specification.new do |s|
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.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'
}

s.add_runtime_dependency('parallel', '~> 1.10')
s.add_runtime_dependency('parser', '>= 2.5')
Expand Down

0 comments on commit ee53ffd

Please sign in to comment.