diff --git a/hub.gemspec b/hub.gemspec index 938a4afda2fa1e90ea39199b9cbc3b20415387f0..57e27830c413bf000d5b443ded72fca84522c93f 100644 --- a/hub.gemspec +++ b/hub.gemspec @@ -15,6 +15,12 @@ Gem::Specification.new do |s| s.files += Dir.glob("bin/**/*") s.files += Dir.glob("man/**/*") + # include only files in version control + git_dir = File.expand_path('../.git', __FILE__) + if File.directory?(git_dir) + s.files &= `git --git-dir='#{git_dir}' ls-files -z`.split("\0") + end + s.executables = %w( hub ) s.description = <