Don't use git to filter files to be included. Include Java files only when JRUBY_HOME is set. --- a/concurrent-ruby.gemspec +++ b/concurrent-ruby.gemspec @@ -2,8 +2,6 @@ require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby/concurrent/utility/engine') Gem::Specification.new do |s| - git_files = `git ls-files`.split("\n") - s.name = 'concurrent-ruby' s.version = Concurrent::VERSION s.platform = Gem::Platform::RUBY @@ -13,12 +11,12 @@ s.summary = 'Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.' s.license = 'MIT' s.date = Time.now.strftime('%Y-%m-%d') - s.files = [*Dir['lib/concurrent-ruby/**/*.rb'] & git_files, - *Dir['ext/concurrent-ruby/**/*'] & git_files, + s.files = [*Dir['lib/concurrent-ruby/**/*.rb'], + *(Dir['ext/concurrent-ruby/**/*'] if ENV['JRUBY_HOME']), 'Rakefile', 'Gemfile', - 'lib/concurrent-ruby/concurrent/concurrent_ruby.jar' + ('lib/concurrent-ruby/concurrent/concurrent_ruby.jar' if ENV['JRUBY_HOME']), ] s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*'] s.require_paths = ['lib/concurrent-ruby'] s.description = <<-TXT.gsub(/^ +/, '') --- a/concurrent-ruby-edge.gemspec +++ b/concurrent-ruby-edge.gemspec @@ -2,8 +2,6 @@ require File.join(File.dirname(__FILE__ ), 'lib/concurrent-ruby-edge/concurrent/edge/version') Gem::Specification.new do |s| - git_files = `git ls-files`.split("\n") - s.name = 'concurrent-ruby-edge' s.version = Concurrent::EDGE_VERSION s.platform = Gem::Platform::RUBY @@ -13,7 +11,7 @@ s.summary = 'Edge features and additions to the concurrent-ruby gem.' s.license = 'MIT' s.date = Time.now.strftime('%Y-%m-%d') - s.files = Dir['lib/concurrent-ruby-edge/**/*.rb'] & git_files + s.files = Dir['lib/concurrent-ruby-edge/**/*.rb'] s.extra_rdoc_files = Dir['README*', 'LICENSE*', 'CHANGELOG*'] s.require_paths = ['lib/concurrent-ruby-edge'] s.description = <<-TXT