Skip to content

Commit

Permalink
Merge pull request #4033 from nobu/exclude-unused-files
Browse files Browse the repository at this point in the history
Exclude CI files and issue templates from gems
  • Loading branch information
hsbt committed Oct 25, 2020
2 parents 5bb5583 + 8a2b0e4 commit 715aa04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundler/lib/bundler/templates/newgem/newgem.gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ 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(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
`git ls-files -z`.split("\x0").reject do |f|
f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
end
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
Expand Down

0 comments on commit 715aa04

Please sign in to comment.