diff --git a/unf.gemspec b/unf.gemspec index 9974454..d1d4da0 100644 --- a/unf.gemspec +++ b/unf.gemspec @@ -15,9 +15,11 @@ to Ruby/JRuby. gem.platform = defined?(JRUBY_VERSION) ? 'java' : Gem::Platform::RUBY gem.license = "BSD-2-Clause" - gem.files = `git ls-files`.split("\n") - gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } - gem.test_files = gem.files.grep(%r{^(test|spec|features)/.*\.rb}) + gem.files = Dir.chdir(__dir__) do + `git ls-files -z`.split("\x0").reject do |file| + file.start_with?(*%w[. Gemfile Rakefile test unf.gemspec]) + end + end gem.require_paths = ["lib"] gem.extra_rdoc_files = ['README.md', 'LICENSE']