Permalink
Browse files

Use git to manage files contained in the gemspec

  • Loading branch information...
1 parent 1f0e2eb commit 7fd7d95e071a1fa1f0fea8f0e6af4539d427d4f0 @joshuaclayton joshuaclayton committed Sep 2, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 factory_girl.gemspec
@@ -9,9 +9,12 @@ Gem::Specification.new do |s|
using factories - less error-prone, more explicit, and
all-around easier to work with than fixtures.}
- s.files = Dir['[A-Z]*', 'lib/**/*.rb', 'spec/**/*.rb', 'features/**/*', 'rails/**/*']
+ all_files = %x{git ls-files}.split("\n").reject {|file| file =~ /gemspec/ }
+
+ s.files = all_files.reject {|file| file =~ /^(spec|features|cucumber|gemfiles|Appraisals)/ }
+ s.test_files = all_files.select {|file| file =~ /^(spec|features|cucumber|gemfiles|Appraisals)/ }
+
s.require_path = 'lib'
- s.test_files = Dir['spec/**/*_spec.rb', 'features/**/*']
s.authors = ["Joe Ferris"]
s.email = %q{jferris@thoughtbot.com}

0 comments on commit 7fd7d95

Please sign in to comment.