Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Reduce size of built .gem file #211

Merged
merged 1 commit into from

2 participants

@Paxa

Now build goliath-*.gem file is about 16MB, it contains pkg/ directory, actual code is only 88KB. I fixed ignoring files from .gitignore

File.fnmatch('pkg/', 'pkg/goliath-1.0.0.beta.1.gem') # => false
File.fnmatch('pkg/*', 'pkg/goliath-1.0.0.beta.1.gem') # => true
@igrigorik igrigorik merged commit 27c45a5 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 2, 2012
  1. @Paxa
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  goliath.gemspec
View
2  goliath.gemspec
@@ -57,7 +57,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rb-fsevent'
end
- ignores = File.readlines(".gitignore").grep(/\S+/).map {|i| i.chomp }
+ ignores = File.readlines(".gitignore").grep(/\S+/).map {|i| i.chomp }.map {|i| File.directory?(i) ? i.sub(/\/?$/, '/*') : i }
dotfiles = [".gemtest", ".gitignore", ".rspec", ".yardopts"]
s.files = Dir["**/*"].reject {|f| File.directory?(f) || ignores.any? {|i| File.fnmatch(i, f) } } + dotfiles
Something went wrong with that request. Please try again.