diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-09 17:59:42 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-09 11:18:09 +0000 |
| commit | 44d19928b6b6af945b79415fcff4ffc731e99173 (patch) | |
| tree | f1e9820b55f74d5621d95a155556d2deb1890b16 | |
| parent | f08030e9dccf38d9ea5c9505203fe26484dc28d8 (diff) | |
[ruby/net-protocol] Exclude unneeded files
https://github.com/ruby/net-protocol/commit/8286341e8c
| -rw-r--r-- | lib/net/net-protocol.gemspec | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/net/net-protocol.gemspec b/lib/net/net-protocol.gemspec index f9fd83f12b..2d911a966c 100644 --- a/lib/net/net-protocol.gemspec +++ b/lib/net/net-protocol.gemspec @@ -25,9 +25,8 @@ Gem::Specification.new do |spec| # 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('..', __FILE__)) do - `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } - end + excludes = %W[/.git* /bin /test /*file /#{File.basename(__FILE__)}] + spec.files = IO.popen(%W[git -C #{__dir__} ls-files -z --] + excludes.map {|e| ":^#{e}"}, &:read).split("\x0") spec.require_paths = ["lib"] spec.add_dependency "timeout" |
