From ae5ac673b56aa78493b61b2d958cbe71d7fb7842 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 18:22:36 +0200 Subject: [PATCH 1/2] 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. --- grape-entity.gemspec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/grape-entity.gemspec b/grape-entity.gemspec index 295241f..b6b882b 100644 --- a/grape-entity.gemspec +++ b/grape-entity.gemspec @@ -6,7 +6,6 @@ require 'grape_entity/version' Gem::Specification.new do |s| s.name = 'grape-entity' s.version = GrapeEntity::VERSION - s.platform = Gem::Platform::RUBY s.authors = ['LeFnord', 'Michael Bleigh'] s.email = ['pscholz.le@gmail.com', 'michael@intridea.com'] s.homepage = 'https://github.com/ruby-grape/grape-entity' @@ -14,10 +13,19 @@ Gem::Specification.new do |s| s.description = 'Extracted from Grape, A Ruby framework for rapid API development with great conventions.' s.license = 'MIT' + s.metadata = { + 'homepage_uri' => 'https://github.com/ruby-grape/grape-entity', + 'bug_tracker_uri' => 'https://github.com/ruby-grape/grape-entity/issues', + 'changelog_uri' => "https://github.com/ruby-grape/grape-entity/blob/v#{s.version}/CHANGELOG.md", + 'documentation_uri' => "https://www.rubydoc.info/gems/grape-entity/#{s.version}", + 'source_code_uri' => "https://github.com/ruby-grape/grape-entity/tree/v#{s.version}", + 'rubygems_mfa_required' => 'true' + } + s.required_ruby_version = '>= 3.0' s.add_dependency 'activesupport', '>= 3.0.0' - s.files = `git ls-files lib`.split("\n") + ['CHANGELOG.md', 'LICENSE', 'README.md'] + s.files = Dir['lib/**/*.rb', 'CHANGELOG.md', 'LICENSE', 'README.md'] s.require_paths = ['lib'] end From dd724e89706cf8fddc141c1eab6e9d6991320a28 Mon Sep 17 00:00:00 2001 From: Andrey Subbota Date: Wed, 15 Apr 2026 18:25:23 +0200 Subject: [PATCH 2/2] Add #401 to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7173497..4e3f57a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * [#400](https://github.com/ruby-grape/grape-entity/pull/400): Switch to danger-pr-comment for PR checks - [@numbata](https://github.com/numbata). * [#397](https://github.com/ruby-grape/grape-entity/pull/397): Reduce gem size by excluding test files - [@yuri-zubov](https://github.com/yuri-zubov). +* [#401](https://github.com/ruby-grape/grape-entity/pull/401): Modernize gemspec: add metadata, use Dir glob, require MFA - [@numbata](https://github.com/numbata). * Your contribution here. #### Fixes