Sha256: 31e7b135bee1fe3a46e042f703e82b570880b9c2d7c9d7ec13a206b5d1c0f877

Contents?: true

Size: 1.45 KB

Versions: 2

Compression:

Stored size: 1.45 KB

Contents

desc "run specs"
task :spec do
  Dir[ 'spec/*' ].each do |file|
    out "spec #{file}"
  end
end

require 'rubygems'
require 'spec/rake/spectask'
desc "verify test coverage with RCov"
task :rcov => 'rcov:verify'
namespace :rcov do
  Spec::Rake::SpecTask.new('rcov') do |t|
    t.spec_files = ['spec/*.rb']
    t.rcov = true
    t.rcov_opts = ['--exclude', 'spec']
  end

  require 'spec/rake/verify_rcov'
  # rcov is wrong- I am actually at 100%
  RCov::VerifyTask.new(:verify => :rcov) do |t|
    t.threshold = 100 # Make sure you have rcov 0.7 or higher!
    t.index_html = $rcov_index_html
  end
end

desc "release a new gem to rubyforge"
task :release => [:test,:record,:rdoc,:website,:package] do
  Dir.chdir('pkg') do
    release = Dir['*.gem'].sort_by {|file| File.mtime(file)}.last
    release =~ /^[^-]+-([.0-9]+).gem$/
    out "rubyforge login && rubyforge add_release #{$project} #{$project} #$1 #{release}"
  end
end

desc "update website"
file :website => ['README','Rakefile'] do
  Dir.chdir '/home/greg/sites/projects/' do
    out 'rake --silent projects:update'
    out 'rake --silent deploy:rsync'
  end
end

desc "generate documentation"
task :rdoc do
  fail unless system 'rdoc --force-update --quiet README lib/*'
end

desc 'git add and push'
task :record do
  unless `git diff`.chomp.empty?
    ARGV.clear
    puts "enter commit message"
    out "git commit -a -m '#{Kernel.gets}'"
    puts "committed! now pushing.. "
    out 'git push origin master'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
methodchain-0.4.1 tasks/gregproject.rake
methodchain-0.4.2 tasks/gregproject.rake