From d04ad702e7a4b4a6307bd7e026bb6425009cd815 Mon Sep 17 00:00:00 2001 From: Gustavo Bazan Date: Tue, 19 Apr 2016 10:32:55 -0500 Subject: [PATCH] Reduce built gem file size Reduce file size by removing tests and images from generated package Previous gem size: 233KB With new configuration: 53KB --- rbnacl.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbnacl.gemspec b/rbnacl.gemspec index f82206f..443695f 100644 --- a/rbnacl.gemspec +++ b/rbnacl.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |gem| gem.homepage = "https://github.com/cryptosphere/rbnacl" gem.licenses = ["MIT"] - gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR) + gem.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|images)/}) } gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"]