From b5fdd8f0d0ad8fd92690004dcd059e007e1d1f59 Mon Sep 17 00:00:00 2001 From: "K.Utsunomiya" Date: Mon, 6 Jul 2026 11:28:22 +0900 Subject: [PATCH] Update gemspec to specify included files explicitly and improve clarity in comments --- microcms.gemspec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/microcms.gemspec b/microcms.gemspec index 67b0ad2..9848216 100644 --- a/microcms.gemspec +++ b/microcms.gemspec @@ -18,10 +18,9 @@ Gem::Specification.new do |spec| spec.metadata['rubygems_mfa_required'] = 'true' - # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - spec.files = Dir.chdir(File.expand_path(__dir__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + # `ruby -e "puts Gem::Specification.load('microcms.gemspec').files.sort"` で確認可能 + spec.files = Dir.chdir(__dir__) do + `git ls-files -z lib LICENSE README.md microcms.gemspec`.split("\x0").reject(&:empty?) end spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }