diff -r 3d9956beee25 -r 62a5ac525ce8 chunker/Rakefile --- a/chunker/Rakefile Sat Jan 22 01:20:16 2011 -0800 +++ b/chunker/Rakefile Sat Jan 22 01:54:06 2011 -0800 @@ -65,6 +65,9 @@ task :default => :test # task :default => [ :test, :package ] + +### Tasks: testing via rspec +### namespace :test do desc 'Generate verbose and pretty output' RSpec::Core::RakeTask.new( :spec ) do |task| @@ -79,6 +82,7 @@ end end + ### Task: generate ctags ### This assumes exuberant ctags, since ctags 'native' doesn't support ruby anyway. ### @@ -98,36 +102,16 @@ gem.email = 'mahlon@martini.nu' gem.homepage = 'http://projects.martini.nu/ruby-modules/wiki/Chunker' gem.has_rdoc = true + gem.extra_rdoc_files = ['README'] + gem.rdoc_options << '--main' << 'README' + gem.files = RELEASE_FILES. collect {|f| f.relative_path_from(BASEDIR).to_s } gem.test_files = SPEC_FILES. collect {|f| f.relative_path_from(BASEDIR).to_s } - gem.description = <<-EOF - Ruby provides an automatic constant called DATA, which is an IO object - that references all text in the current file under an __END__ token. - - I find it convenient to use the __END__ area to store all sorts of - stuff, rather than have to worry about distributing separate files. - - The DATA constant is determined from whatever ruby believes $0 to be. - It doesn't work inside of other required libraries, so you'll see stuff - like this all the time: - - END = File.open( __FILE__ ).read.split( /^__END__/, 2 ).last - - It works, but it's more work than I want to do. - - Chunker solves this by parsing __END__ tokens for you, and making it - available in the form of a 'DATA_END' constant. It installs this - constant into the class that includes Chunker, so you can use it again - and again, assuming you use a different file for each class. - - It also automatically parses out other things that look like tokens, so - you can easily have multiple, distinct documents all embedded into the - __END__ block. - EOF + gem.description = "Embed arbitrary data and multiple, distinct documents within ruby files." end Rake::GemPackageTask.new( gem ) do |pkg|