diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-07-01 10:44:07 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-07-01 11:50:11 +0900 |
| commit | c3bdf7043cca0131e7ca66c1bc76ae6e24dc8965 (patch) | |
| tree | 6c386f336b0886e4c42b0da3b18de5f7c0856436 /lib/optparse | |
| parent | 5ee63157040e5d5e3960c15e5fc685c08ee543ad (diff) | |
Use git ls-files instead of Dir.glob because optparse has optionparser.rb that is outside of lib/optparse directory
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Diffstat (limited to 'lib/optparse')
| -rw-r--r-- | lib/optparse/optparse.gemspec | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/optparse/optparse.gemspec b/lib/optparse/optparse.gemspec index cd292674a9..6ea6b88395 100644 --- a/lib/optparse/optparse.gemspec +++ b/lib/optparse/optparse.gemspec @@ -25,8 +25,9 @@ Gem::Specification.new do |spec| spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = spec.homepage - spec.files = Dir.glob("{doc,lib,misc}/**/{*,.document}", base: File.expand_path("..", __FILE__)) + - %w[README.md ChangeLog COPYING .document .rdoc_options] + dir, gemspec = File.split(__FILE__) + excludes = %W[#{gemspec} rakelib test/ Gemfile Rakefile .git* .editor*].map {|n| ":^"+n} + spec.files = IO.popen(%w[git ls-files -z --] + excludes, chdir: dir, &:read).split("\x0") spec.bindir = "exe" spec.executables = [] spec.require_paths = ["lib"] |
