Permalink
Browse files

switched to using Jeweler. added development dependencies to gemspec.…

… Jeweler's rake check_dependencies task is nice when checking FG in different Ruby VMs.
1 parent 3405a28 commit e00389b5103eea8a0ddb18135ae107bdc35ae7de @croaky croaky committed Mar 28, 2010
Showing with 30 additions and 31 deletions.
  1. +29 −31 Rakefile
  2. +1 −0 VERSION
View
60 Rakefile
@@ -1,7 +1,6 @@
require 'rubygems'
require 'rake'
require 'rake/rdoctask'
-require 'rake/gempackagetask'
require 'rcov/rcovtask'
require 'date'
@@ -36,44 +35,43 @@ task :sync_docs => 'rdoc' do
`rsync -ave ssh rdoc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/factory_girl`
end
-spec = Gem::Specification.new do |s|
- s.name = %q{factory_girl}
- s.version = "1.2.3"
- s.summary = %q{factory_girl provides a framework and DSL for defining and
- using model instance factories.}
- s.description = %q{factory_girl provides a framework and DSL for defining and
- using factories - less error-prone, more explicit, and
- all-around easier to work with than fixtures.}
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = %q{factory_girl}
+ s.summary = %q{factory_girl provides a framework and DSL for defining and
+ using model instance factories.}
+ s.description = %q{factory_girl provides a framework and DSL for defining and
+ using factories - less error-prone, more explicit, and
+ all-around easier to work with than fixtures.}
- s.files = FileList['[A-Z]*', 'lib/**/*.rb', 'spec/**/*.rb']
- s.require_path = 'lib'
- s.test_files = Dir[*['spec/**/*_spec.rb']]
+ s.files = FileList['[A-Z]*', 'lib/**/*.rb', 'spec/**/*.rb']
+ s.require_path = 'lib'
+ s.test_files = Dir[*['spec/**/*_spec.rb']]
- s.has_rdoc = true
- s.extra_rdoc_files = ["README.rdoc"]
- s.rdoc_options = ['--line-numbers', "--main", "README.rdoc"]
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.rdoc"]
+ s.rdoc_options = ['--line-numbers', "--main", "README.rdoc"]
- s.authors = ["Joe Ferris"]
- s.email = %q{jferris@thoughtbot.com}
- s.homepage = "http://thoughtbot.com/projects/factory_girl"
+ s.authors = ["Joe Ferris"]
+ s.email = %q{jferris@thoughtbot.com}
+ s.homepage = "http://thoughtbot.com/projects/factory_girl"
- s.platform = Gem::Platform::RUBY
-end
+ s.add_development_dependency('rcov')
+ s.add_development_dependency('rspec')
+ s.add_development_dependency('cucumber')
+ s.add_development_dependency('activerecord')
+ s.add_development_dependency('rr')
+ s.add_development_dependency('sqlite3')
-Rake::GemPackageTask.new spec do |pkg|
- pkg.need_tar = true
- pkg.need_zip = true
+ s.platform = Gem::Platform::RUBY
+ end
+rescue LoadError
+ puts "Jeweler not available. Install it with: gem install jeweler"
end
desc "Clean files generated by rake tasks"
-task :clobber => [:clobber_rdoc, :clobber_package]
-
-desc "Generate a gemspec file"
-task :gemspec do
- File.open("#{spec.name}.gemspec", 'w') do |f|
- f.write spec.to_ruby
- end
-end
+task :clobber => [:clobber_rdoc, :clobber_rcov]
Cucumber::Rake::Task.new(:features) do |t|
t.fork = true
View
1 VERSION
@@ -0,0 +1 @@
+1.2.3

0 comments on commit e00389b

Please sign in to comment.