U:RDoc::TopLevel[	i I"Rakefile:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[go:RDoc::Markup::Paragraph;[I",# Rakefile for rake        -*- ruby -*-;To:RDoc::Markup::BlankLine o;	;[I"I# Copyright 2004, 2005, 2006 by Jim Weirich (jim@weirichhouse.org). ;TI"# All rights reserved.;T@o;	;[I"K# Permission is granted for use, copying, modification, distribution, ;TI"I# and distribution of modified versions of this work as long as the ;TI"*# above copyright notice is included.;T@o;	;[	I"require 'rake/clean' ;TI"require 'rake/testtask' ;TI"require 'rake/rdoctask' ;TI"
begin;To:RDoc::Markup::Verbatim;[I"require 'rubygems'
;TI"#require 'rake/gempackagetask'
;T:@format0o;	;[I"rescue Exception;To;;[I"	nil
;T;0o;	;[I"end;T@o;	;[I"4# Determine the current version of the software;T@o;	;[I"CLOBBER.include('pkg');T@o;	;[I"CURRENT_VERSION = '2.1.2' ;TI"<PKG_VERSION = ENV['REL'] ? ENV['REL'] : CURRENT_VERSION;T@o;	;[I"%SRC_RB = FileList['lib     .rb'];T@o;	;[I"F# The default task is run if rake is given no explicit arguments.;T@o;	;[I"desc "Default Task" ;TI"task :default => :test_all;T@o;	;[I"K# Test Tasks ---------------------------------------------------------;T@o;	;[I"desc "Run all tests" ;TI"%task :test_all => [:test_units] ;TI"task :ta => [:test_all];T@o;	;[I"task :tu => [:test_units];T@o;	;[I",Rake::TestTask.new("test_units") do |t|;To;;[I".t.test_files = FileList['test/test*.rb']
;TI"t.verbose = false
;T;0o;	;[I"end;T@o;	;[I":# Create a task to build the RDOC documentation tree.;T@o;	;[I"-rd = Rake::RDocTask.new("rdoc") { |rdoc|;To;;[
I"rdoc.rdoc_dir = 'html'
;TI"*rdoc.title    = "Builder for Markup"
;TI"Srdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
;TI"Grdoc.rdoc_files.include('lib/   *.rb', '[A-Z]*', 'doc/   *.rdoc')
;TI"$rdoc.template = 'doc/jamis.rb'
;T;0o;	;[I"};T@o;	;[I"L# ==================================================================== ;TI"L# Create a task that will package the Rake software into distributable ;TI"# gem files.;T@o;	;[I"PKG_FILES = FileList[;To;;[I"'lib/**/*.rb', 
;TI"'test/**/*.rb',
;TI"'scripts/**/*.rb'
;T;0o;	;[I"] ;TI"1PKG_FILES.exclude('test/testcssbuilder.rb') ;TI",PKG_FILES.exclude('lib/builder/css.rb');T@o;	;[I"!BLANKSLATE_FILES = FileList[;To;;[I"'lib/blankslate.rb',
;TI"'test/testblankslate.rb'
;T;0o;	;[I"];T@o;	;[I"if ! defined?(Gem);To;;[I"-puts "Package Target requires RubyGEMs"
;T;0o;	;[I"	else;To;;[I"*spec = Gem::Specification.new do |s|
;TI"
;TI"  #### Basic information.
;TI"
;TI"  s.name = 'builder'
;TI"  s.version = PKG_VERSION
;TI"*  s.summary = "Builders for MarkUp."
;TI"  s.description = %{\
;T;0o;	;[I"UBuilder provides a number of builder objects that make creating structured data ;TI"Jsimple to do.  Currently the following builder objects are supported:;T@o;;[I"XML Markup
;TI"XML Events
;T;0o;	;[I"};T@o;;[I"   s.files = PKG_FILES.to_a
;TI"  s.require_path = 'lib'
;TI"!  s.autorequire = 'builder'
;TI"
;TI"D  s.test_files = PKG_FILES.select { |fn| fn =~ /^test\/test/ }
;TI"
;TI"  s.has_rdoc = true
;TI"M  s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
;TI"  s.rdoc_options <<
;TI"9    '--title' <<  'Builder -- Easy XML Building' <<
;TI"!    '--main' << 'README' <<
;TI"    '--line-numbers'
;TI"
;TI"   s.author = "Jim Weirich"
;TI"(  s.email = "jim@weirichhouse.org"
;TI"-  s.homepage = "http://onestepback.org"
;TI"	end
;TI"
;TI"5blankslate_spec = Gem::Specification.new do |s|
;TI"
;TI"  #### Basic information.
;TI"
;TI"  s.name = 'blankslate'
;TI"  s.version = PKG_VERSION
;TI"-  s.summary = "Blank Slate base class."
;TI"  s.description = %{\
;T;0o;	;[I"VBlankSlate provides a base class where almost all of the methods from Object and ;TI"UKernel have been removed.  This is useful when providing proxy object and other ;TI"3classes that make heavy use of method_missing.;T@o;	;[I"};T@o;;[$I"'  s.files = BLANKSLATE_FILES.to_a
;TI"  s.require_path = 'lib'
;TI"!  s.autorequire = 'builder'
;TI"
;TI"D  s.test_files = PKG_FILES.select { |fn| fn =~ /^test\/test/ }
;TI"
;TI"  s.has_rdoc = true
;TI"M  s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
;TI"  s.rdoc_options <<
;TI"K    '--title' <<  'BlankSlate -- Base Class for building proxies.' <<
;TI"!    '--main' << 'README' <<
;TI"    '--line-numbers'
;TI"
;TI"   s.author = "Jim Weirich"
;TI"(  s.email = "jim@weirichhouse.org"
;TI"-  s.homepage = "http://onestepback.org"
;TI"	end
;TI"
;TI"namespace 'builder' do
;TI"-  Rake::GemPackageTask.new(spec) do |t|
;TI"    t.need_tar = true
;TI"  end
;TI"	end
;TI"
;TI"namespace 'blankslate' do
;TI"8  Rake::GemPackageTask.new(blankslate_spec) do |t|
;TI"    t.need_tar = true
;TI"  end
;TI"	end
;TI"
;TI"@task :package => ['builder:package', 'blankslate:package']
;T;0o;	;[I"end;T@o;	;[I"+desc "Look for Debugging print lines" ;TI"task :dbg do;To;;[I"6FileList['**/*.rb'].egrep /\bDBG|\bbreakpoint\b/
;T;0o;	;[I"end;T@o;	;[I"L# -------------------------------------------------------------------- ;TI"# Creating a release;T@o;	;[I"def announce(msg='');To;;[I"STDERR.puts msg
;T;0o;	;[I"end;T@o;	;[I"desc "Make a new release" ;TI"task :release => [;To;;[I":prerelease,
;TI":clobber,
;TI":test_all,
;TI":update_version,
;TI":package,
;TI":tag] do
;TI"
;TI"announce 
;TI"Oannounce "**************************************************************"
;TI"3announce "* Release #{PKG_VERSION} Complete."
;TI",announce "* Packages ready to upload."
;TI"Oannounce "**************************************************************"
;TI"announce 
;T;0o;	;[I"end;T@o;	;[I"># Validate that everything is ready to go for a release. ;TI"task :prerelease do;To;;["I"announce 
;TI"Oannounce "**************************************************************"
;TI"8announce "* Making RubyGem Release #{PKG_VERSION}"
;TI"7announce "* (current version #{CURRENT_VERSION})"
;TI"Oannounce "**************************************************************"
;TI"announce  
;TI"
;TI"%# Is a release number supplied?
;TI"unless ENV['REL']
;TI"?  fail "Usage: rake release REL=x.y.z [REUSE=tag_suffix]"
;TI"	end
;TI"
;TI":# Is the release different than the current release.
;TI"# (or is REUSE set?)
;TI"9if PKG_VERSION == CURRENT_VERSION && ! ENV['REUSE']
;TI"`  fail "Current version is #{PKG_VERSION}, must specify REUSE=tag_suffix to reuse version"
;TI"	end
;TI"
;TI"(# Are all source files checked in?
;TI"if ENV['RELTEST']
;TI"F  announce "Release Task Testing, skipping checked-in file test"
;TI"
else
;TI"5  announce "Checking for unchecked-in files..."
;TI"  data = `cvs -q update`
;TI"  unless data =~ /^$/
;TI"L    fail "CVS update is not clean ... do you have unchecked-in files?"
;TI"  end
;TI"7  announce "No outstanding checkins found ... OK"
;TI"	end
;T;0o;	;[I"end;T@o;	;[I"-task :update_version => [:prerelease] do;To;;[I"'if PKG_VERSION == CURRENT_VERSION
;TI"@  announce "No version change ... skipping version update"
;TI"
else
;TI"=  announce "Updating Builder version to #{PKG_VERSION}"
;TI"$  open("Rakefile") do |rakein|
;TI"0    open("Rakefile.new", "w") do |rakeout|
;TI"!      rakein.each do |line|
;TI"2        if line =~ /^CURRENT_VERSION\s*=\s*/
;TI"A          rakeout.puts "CURRENT_VERSION = '#{PKG_VERSION}'"
;TI"        else
;TI"!          rakeout.puts line
;TI"        end
;TI"      end
;TI"    end
;TI"  end
;TI"%  mv "Rakefile.new", "Rakefile"
;TI"  if ENV['RELTEST']
;TI"L    announce "Release Task Testing, skipping commiting of new version"
;TI"  else
;TI"J    sh %{cvs commit -m "Updated to version #{PKG_VERSION}" Rakefile}
;TI"  end
;TI"	end
;T;0o;	;[I"end;T@o;	;[I"Mdesc "Tag all the CVS files with the latest release number (REL=x.y.z)" ;TI""task :tag => [:prerelease] do;To;;[I"3reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
;TI"<reltag << ENV['REUSE'].gsub(/\./, '_') if ENV['REUSE']
;TI"-announce "Tagging CVS with [#{reltag}]"
;TI"if ENV['RELTEST']
;TI"=  announce "Release Task Testing, skipping CVS tagging"
;TI"
else
;TI"  sh %{cvs tag #{reltag}}
;TI"	end
;T;0o;	;[I"end;T@o;	;[I",desc "Install the jamis RDoc template" ;TI"$task :install_jamis_template do;To;;[	I"require 'rbconfig'
;TI"Ydest_dir = File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html")
;TI"Lfail "Unabled to write to #{dest_dir}" unless File.writable?(dest_dir)
;TI"8install "doc/jamis.rb", dest_dir, :verbose => true
;T;0o;	;[I"end;T@o;	;[I"require 'scripts/publish';T:
@file@:0@omit_headings_from_table_of_contents_below0