Skip to content

Commit ae5ac67

Browse files
committed
Modernize gemspec: add metadata, use Dir glob, drop defaults
Replace git ls-files shell-out with Dir glob to avoid dependency on git at build time. Add RubyGems metadata (homepage, bug tracker, changelog, docs, source) and require MFA for gem pushes. Remove redundant s.platform since Gem::Platform::RUBY is the default.
1 parent 65d41f1 commit ae5ac67

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

grape-entity.gemspec

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,26 @@ require 'grape_entity/version'
66
Gem::Specification.new do |s|
77
s.name = 'grape-entity'
88
s.version = GrapeEntity::VERSION
9-
s.platform = Gem::Platform::RUBY
109
s.authors = ['LeFnord', 'Michael Bleigh']
1110
s.email = ['pscholz.le@gmail.com', 'michael@intridea.com']
1211
s.homepage = 'https://github.com/ruby-grape/grape-entity'
1312
s.summary = 'A simple facade for managing the relationship between your model and API.'
1413
s.description = 'Extracted from Grape, A Ruby framework for rapid API development with great conventions.'
1514
s.license = 'MIT'
1615

16+
s.metadata = {
17+
'homepage_uri' => 'https://github.com/ruby-grape/grape-entity',
18+
'bug_tracker_uri' => 'https://github.com/ruby-grape/grape-entity/issues',
19+
'changelog_uri' => "https://github.com/ruby-grape/grape-entity/blob/v#{s.version}/CHANGELOG.md",
20+
'documentation_uri' => "https://www.rubydoc.info/gems/grape-entity/#{s.version}",
21+
'source_code_uri' => "https://github.com/ruby-grape/grape-entity/tree/v#{s.version}",
22+
'rubygems_mfa_required' => 'true'
23+
}
24+
1725
s.required_ruby_version = '>= 3.0'
1826

1927
s.add_dependency 'activesupport', '>= 3.0.0'
2028

21-
s.files = `git ls-files lib`.split("\n") + ['CHANGELOG.md', 'LICENSE', 'README.md']
29+
s.files = Dir['lib/**/*.rb', 'CHANGELOG.md', 'LICENSE', 'README.md']
2230
s.require_paths = ['lib']
2331
end

0 commit comments

Comments
 (0)