Skip to content

Commit bb60221

Browse files
committed
various improvements to gemspec
1. add more metadata 2. simpler require for version file 3. \n-proff way of gathering files for inclusion in gem
1 parent 704faab commit bb60221

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

pygments.rb.gemspec

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
# frozen_string_literal: true
22

3-
require File.expand_path('lib/pygments/version', __dir__)
3+
require_relative 'lib/pygments/version'
44

55
Gem::Specification.new do |s|
66
s.name = 'pygments.rb'
77
s.version = Pygments::VERSION
88

99
s.summary = 'pygments wrapper for ruby'
1010
s.description = 'pygments.rb is a Ruby wrapper for Pygments syntax highlighter'
11-
11+
s.license = 'MIT'
1212
s.homepage = 'https://github.com./pygments/pygments.rb'
13-
s.required_ruby_version = '>= 2.3.0'
1413

1514
s.authors = ['Aman Gupta', 'Ted Nyman', 'Marat Radchenko']
1615
s.email = ['[email protected]']
17-
s.license = 'MIT'
16+
17+
s.metadata = {
18+
'homepage_uri' => s.homepage,
19+
'bug_tracker_uri' => s.homepage + '/issues',
20+
'changelog_uri' => s.homepage + '/blob/master/CHANGELOG.adoc',
21+
'documentation_uri' => 'https://www.rubydoc.info/gems/' + s.name,
22+
'source_code_uri' => s.homepage
23+
}
24+
25+
s.required_ruby_version = '>= 2.3.0'
1826

1927
s.add_development_dependency 'rake', '~> 13.0.0'
2028
s.add_development_dependency 'rubocop', '~> 0.81.0'
2129
s.add_development_dependency 'test-unit', '~> 3.4.0'
2230

23-
# s.extensions = ['ext/extconf.rb']
24-
s.require_paths = ['lib']
25-
26-
s.files = `git ls-files`.split("\n").reject { |f| File.symlink?(f) } + ['lexers']
31+
s.files = `git ls-files -z`.split("\0").reject { |f| File.symlink?(f) }
2732
end

0 commit comments

Comments
 (0)