From 0b32b55e36981603778b78d40f41e374f25a9b84 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Fri, 2 Sep 2022 15:51:35 +0900 Subject: [PATCH] Use `Dir#[]` instead of `git` command for gemspec For example, it prevents errors such as: ```console bundle install [!] There was an error parsing `Gemfile`: [!] There was an error while loading `rubocop-performance.gemspec`: No such file or directory - git. Bundler cannot continue. # from /root/project/rubocop-performance.gemspec:18 # ------------------------------------------- # s.email = 'rubocop@googlegroups.com' > s.files = `git ls-files -z config lib LICENSE.txt README.md`.split("\x0") # s.extra_rdoc_files = ['LICENSE.txt', 'README.md'] # ------------------------------------------- . Bundler cannot continue. # from /root/project/Gemfile:7 # ------------------------------------------- # > gemspec # # ------------------------------------------- Exited with code exit status 14 ``` https://app.circleci.com/pipelines/github/rubocop/rubocop-performance/792 --- rubocop-performance.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubocop-performance.gemspec b/rubocop-performance.gemspec index c481e2457c..53d66c7e2a 100644 --- a/rubocop-performance.gemspec +++ b/rubocop-performance.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| DESCRIPTION s.email = 'rubocop@googlegroups.com' - s.files = `git ls-files -z config lib LICENSE.txt README.md`.split("\x0") + s.files = Dir['LICENSE.txt', 'README.md', 'config/**/*', 'lib/**/*'] s.extra_rdoc_files = ['LICENSE.txt', 'README.md'] s.homepage = 'https://github.com/rubocop/rubocop-performance' s.licenses = ['MIT']