Changeset 1174
- Timestamp:
- 01/05/08 17:17:35 (9 months ago)
- Files:
-
- plugins/merb_helpers/Rakefile (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/merb_helpers/Rakefile
r1172 r1174 1 1 require 'rubygems' 2 2 require 'rake/gempackagetask' 3 require 'rake/rdoctask' 3 4 require 'spec/rake/spectask' 4 5 … … 10 11 HOMEPAGE = "http://merb.rubyforge.org/" 11 12 SUMMARY = "Helper support for merb (similar to the Rails form helpers)" 13 14 windows = (PLATFORM =~ /win32|cygwin/) 15 16 SUDO = windows ? "" : "sudo" 12 17 13 18 spec = Gem::Specification.new do |s| … … 35 40 desc "Run :package and install resulting .gem" 36 41 task :install => [:package] do 37 sh %{ sudogem install pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri}42 sh %{#{SUDO} gem install pkg/#{NAME}-#{GEM_VERSION} --no-rdoc --no-ri} 38 43 end 44 45 Rake::RDocTask.new do |rdoc| 46 files = ['README', 'LICENSE', 47 'lib/**/*.rb'] 48 rdoc.rdoc_files.add(files) 49 rdoc.main = 'README' 50 rdoc.title = 'Merb Helper Docs' 51 rdoc.rdoc_dir = 'doc/rdoc' 52 rdoc.options << '--line-numbers' << '--inline-source' 53 end 54 39 55 40 56 Spec::Rake::SpecTask.new do |t| … … 43 59 t.spec_files = Dir['spec/**/*_spec.rb'].sort 44 60 end 61 62 desc "Run all specs and generate an rcov report" 63 Spec::Rake::SpecTask.new('rcov') do |t| 64 t.spec_files = FileList['spec/**/*_spec.rb'] 65 t.spec_opts = ["--format", "specdoc", "--colour"] 66 t.rcov = true 67 t.rcov_dir = 'coverage' 68 t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec'] 69 end 70 71
