Skip to content

Commit 7bb4c7e

Browse files
nobuko1
authored andcommitted
Exclude useless files from gem
1 parent 750c145 commit 7bb4c7e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

debug.gemspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ Gem::Specification.new do |spec|
1717

1818
# Specify which files should be added to the gem when it is released.
1919
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
20-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
21-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
21+
`git ls-files -z`.split("\x0").reject do |f|
22+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
23+
end
2224
end
2325
spec.bindir = "exe"
2426
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }

0 commit comments

Comments
 (0)