Cleanup rake tasks

This commit is contained in:
alexdunae 2010-03-04 00:07:52 -08:00
parent 024b4b2c0f
commit 333afb75b9

View file

@ -34,7 +34,6 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.title = 'Ruby Holidays Gem' rdoc.title = 'Ruby Holidays Gem'
rdoc.options << '--all' << '--inline-source' << '--line-numbers' rdoc.options << '--all' << '--inline-source' << '--line-numbers'
rdoc.options << '--charset' << 'utf-8' rdoc.options << '--charset' << 'utf-8'
#rdoc.template = 'extras/rdoc_template.rb'
rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('data/SYNTAX') rdoc.rdoc_files.include('data/SYNTAX')
rdoc.rdoc_files.include('lib/holidays/MANIFEST') rdoc.rdoc_files.include('lib/holidays/MANIFEST')
@ -44,70 +43,10 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/*.rb') rdoc.rdoc_files.include('lib/*.rb')
end end
spec = Gem::Specification.new do |s|
s.name = 'holidays'
s.version = '0.9.4'
s.author = 'Alex Dunae'
s.homepage = 'http://code.dunae.ca/holidays'
s.platform = Gem::Platform::RUBY
s.description = <<-EOF
A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!
EOF
s.summary = 'A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!'
s.files = FileList["{lib}/**/*", "{data}/**/*", "*.rb"].to_a
s.test_files = FileList['test/defs/test*.rb'].exclude('test_helper.rb')
s.has_rdoc = true
s.extra_rdoc_files = ['README.rdoc', 'data/SYNTAX', 'lib/holidays/MANIFEST', 'REFERENCES', 'CHANGELOG', 'LICENSE']
end
desc 'Build the gem.'
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = true
pkg.need_tar = true
end
desc 'Definition file tasks' desc 'Definition file tasks'
namespace :defs do namespace :defs do
DATA_PATH = 'data' DATA_PATH = 'data'
desc 'Create the gem spec'
task :create_gemspec do
File.open("holidays.gemspec","w") do |file|
file.puts <<-EOH
# Auto-generated gemspec
Gem::Specification.new do |s|
s.name = "holidays"
s.version = "0.9.4"
s.date = "2008-12-29"
s.summary = "A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!"
s.email = "code@dunae.ca"
s.homepage = "http://code.dunae.ca/holidays"
s.description = "A collection of Ruby methods to deal with statutory and other holidays. You deserve a holiday!"
s.has_rdoc = true
s.author = "Alex Dunae"
s.extra_rdoc_files = ['README.rdoc', 'data/SYNTAX', 'lib/holidays/MANIFEST', 'REFERENCES', 'CHANGELOG', 'LICENSE']
s.rdoc_options << '--all' << '--inline-source' << '--line-numbers' << '--charset' << 'utf-8'
EOH
file.puts " s.test_files = ['" + Dir.glob("{test}/**/*").join("','") + "']"
file.puts " s.files = ['" + Dir.glob("{data,lib,test}/**/*").join("','") + "']"
file.puts 'end'
end
end
desc 'Build holiday definition files' desc 'Build holiday definition files'
task :build_all do task :build_all do
# load the index # load the index