Rakefile in gcalapi-0.0.4 vs Rakefile in gcalapi-0.1.0
- old
+ new
@@ -1,33 +1,36 @@
require 'rake/gempackagetask'
require "rake/contrib/rubyforgepublisher"
+require "rake/rdoctask"
+require "rake/testtask"
require 'rbconfig'
include Config
PKG_NAME = 'gcalapi'
PKG_VERSION = File.read('VERSION').chomp
-PKG_FILES = FileList["**/*"].exclude(".svn").exclude("pkg").exclude("test/temp_*.rb").exclude("test/parameters.rb")
+PKG_FILES = FileList["**/*"].exclude(".svn").exclude("pkg").exclude("test/temp_*.rb").exclude("test/parameters.rb").exclude("*.log")
-desc "Installing library"
-task :install do
- ruby 'install.rb'
+Rake::TestTask.new do |t|
+ t.libs << "test"
+ t.test_files = FileList['test/*_test.rb']
+ t.verbose = true
end
-desc "Testing library"
-task :test do
- sh '(cd test; sh all.sh)'
-end
-
desc "Removing generated files"
task :clean do
rm_rf 'html'
+ rm_rf 'pkg'
end
-# Create RDOC documentation.
-task :rdoc do
- sh "rdoc -S -o html README lib/googlecalendar/*.rb"
+desc "Generate RDoc documentation"
+Rake::RDocTask.new do |rdoc|
+ rdoc.options << '--line-numbers'
+ rdoc.options << '--inline-source'
+ rdoc.options << '--all'
+ rdoc.rdoc_files.include 'README'
+ rdoc.rdoc_files.include 'lib/googlecalendar/*.rb'
end
spec = Gem::Specification.new do |s|
#### Basic information.
@@ -68,14 +71,15 @@
s.homepage = "http://gcalapi.rubyforge.net"
s.rubyforge_project = "gcalapi"
end
Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_tar = true
- pkg.package_files += PKG_FILES
+ #pkg.need_tar = true
+ #pkg.need_zip = true
+ #pkg.package_files += PKG_FILES
end
-task :release => [ :clean, :package ]
+task :release => [ :clean, :rdoc, :package ]
desc "Publish to RubyForge"
task :rubyforge => [:rdoc, :package] do
Rake::RubyForgePublisher.new(PKG_NAME, "zorio").upload
end