Skip to content

Commit c0c7d13

Browse files
committed
Remove unneeded files from the gem package
There are a bunch of files in the gem package that aren't useful for downstream projects. Removing these reduces the gem package size from 314K to 293K.
1 parent 1fe507d commit c0c7d13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

webmachine.gemspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ Gem::Specification.new do |gem|
3131
gem.add_development_dependency('webrick', ['~> 1.7.0'])
3232
gem.add_development_dependency('standard', ['~> 1.21'])
3333
ignores = File.read('.gitignore').split(/\r?\n/).reject { |f| f =~ /^(#.+|\s*)$/ }.map { |f| Dir[f] }.flatten
34-
gem.files = (Dir['**/*', '.gitignore'] - ignores).reject { |f| !File.file?(f) }
34+
gem.files = (Dir['**/*', '.gitignore'] - ignores).reject do |f|
35+
!File.file?(f) || f.start_with?(*%w[. Gemfile RELEASING Rakefile memory_test spec webmachine.gemspec])
36+
end
3537
end

0 commit comments

Comments
 (0)