Sha256: 48ffd4b92d012824f7f698524d64c33ab43ac880dba5219e9b2c3988e19c9ddb

Contents?: true

Size: 1.25 KB

Versions: 14

Compression:

Stored size: 1.25 KB

Contents

# Rakefile for rubypants  -*-ruby-*-
require 'rake/rdoctask'


desc "Run all the tests"
task :default => [:test]

desc "Do predistribution stuff"
task :predist => [:changelog, :doc]


desc "Run all the tests"
task :test do
  ruby 'rand.rb'
end

desc "Make an archive as .tar.gz"
task :dist => :test do
  system "export DARCS_REPO=#{File.expand_path "."}; " +
         "darcs dist -d rand#{get_darcs_tree_version}"
end

desc "Generate a ChangeLog"
task :changelog do
  system "darcs changes --repo=#{ENV["DARCS_REPO"] || "."} >ChangeLog"
end

desc "Generate RDoc documentation"
Rake::RDocTask.new(:doc) do |rdoc|
  rdoc.options << '--line-numbers --inline-source --all'
  rdoc.rdoc_files.include 'README'
  rdoc.rdoc_files.include 'rand.rb'
end


# Helper to retrieve the "revision number" of the darcs tree.
def get_darcs_tree_version
  return ""  unless File.directory? "_darcs"

  changes = `darcs changes`
  count = 0
  tag = "0.0"
  
  changes.each("\n\n") { |change|
    head, title, desc = change.split("\n", 3)
    
    if title =~ /^  \*/
      # Normal change.
      count += 1
    elsif title =~ /tagged (.*)/
      # Tag.  We look for these.
      tag = $1
      break
    else
      warn "Unparsable change: #{change}"
    end
  }

  "-" + tag + "." + count.to_s
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
reap-4.0.0 dev/Rakefile
reap-4.3.2 note/Rakefile
reap-4.0 dev/Rakefile
reap-4.3.4 doc/note/aRakefile
reap-4.4.0 doc/note/aRakefile
reap-4.4.1 doc/note/aRakefile
reap-4.5.0 doc/note/aRakefile
reap-4.5.1 doc/note/aRakefile
reap-4.5.2 doc/note/aRakefile
reap-5.0.0 doc/note/aRakefile
reap-5.10.10 dev/Rakefile
reap-6.0.1 forge/reference/aRakefile
reap-6.0.2 forge/reference/aRakefile
reap-4.3.3 note/Rakefile