require 'rubygems' require 'rake' require 'sdoc' GEM_VERSION = File.read(File.dirname(__FILE__) + '/VERSION') begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "padrino-gen" gem.summary = "Generators for easily creating and building padrino applications" gem.description = "Generators for easily creating and building padrino applications from the console" gem.email = "padrinorb@gmail.com" gem.homepage = "http://github.com/padrino/padrino-framework/tree/master/padrino-gen" gem.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"] gem.executables = ["padrino-gen"] gem.rubyforge_project = 'padrino-gen' gem.add_runtime_dependency "padrino-core", "= #{GEM_VERSION}" gem.add_development_dependency "haml", ">= 2.2.1" gem.add_development_dependency "shoulda", ">= 2.10.3" gem.add_development_dependency "mocha", ">= 0.9.7" gem.add_development_dependency "rack-test", ">= 0.5.0" gem.add_development_dependency "webrat", ">= 0.5.1" gem.add_development_dependency "fakeweb", ">= 1.2.3" # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings end Jeweler::GemcutterTasks.new Jeweler::RubyforgeTasks.new { |r| r.doc_task = :none } rescue LoadError puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" end require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'test' test.pattern = 'test/**/test_*.rb' test.verbose = true end begin require 'rcov/rcovtask' Rcov::RcovTask.new do |rcov| rcov.libs << 'test' rcov.pattern = 'test/**/test_*.rb' rcov.verbose = true rcov.rcov_opts << ['--exclude /Gems/1.8/gems/,/tmp/,padrino-admin,padrino-cache,padrino-core,padrino-helpers,padrino-mailer'] end rescue LoadError task :rcov do abort "RCov is not available. In order to run rcov, you must: sudo gem install relevance-rcov" end end # task :test => :check_dependencies task :default => :test require 'rake/rdoctask' Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "padrino-gen #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end