# code: # * George Moschovitis # # (c) 2004 Navel, all rights reserved. # $Id: connection.rb 71 2004-10-18 10:50:22Z gmosx $ require "rake" require "rake/rdoctask" require "rake/gempackagetask" require "rake/testtask" require "rubygems" #project = 'nitro' project = 'og' # ---------------------------------------------------------------------- desc "Default Task" task :default => :package # ---------------------------------------------------------------------- # Run the tests Rake::TestTask.new do |t| t.libs << "test" t.test_files = FileList["test/**/tc*.rb"].exclude("**/tc*og*.rb") t.verbose = true end # Run all tests Rake::TestTask.new(:test_all) do |t| t.libs << "test" t.test_files = FileList["test/**/tc*.rb"] t.verbose = true end # ---------------------------------------------------------------------- Rake::RDocTask.new do |rd| rd.main = "README" rd.rdoc_dir = "rdoc" rd.rdoc_files.include("README", "lib/**/*.rb") end # ---------------------------------------------------------------------- if 'nitro' == project # Nitro GemSpec # require "lib/nitro/version" PKG_VERSION = $srv_version PKG_FILES = FileList[ "[A-Z]*", "{bin,benchmark,etc,ext,examples,doc,lib,test,vendor}/**/*" # "examples/*.rb" ].exclude(".svn/**/*").exclude("*.og").exclude("**/*.log") spec = Gem::Specification.new do |s| s.name = "nitro" s.version = PKG_VERSION s.summary = "Web Engine" s.description = "An efficient, yet simple engine for Web Applications" # s.add_dependency("postgres-pr", ">= 0.3.0") # s.add_dependency("postgres", ">= 0.7.1") # s.add_dependency("extensions", ">= 0.5") s.required_ruby_version = ">= 1.8.1" s.files = PKG_FILES.to_a s.require_path = "lib" s.autorequire = "nitro" s.has_rdoc = true s.extra_rdoc_files = FileList["[A-Z]*"].exclude("*.og").to_a s.rdoc_options << "--main" << "README" << "--title" << "Nitro Documentation" s.test_files = [] s.bindir = "bin" s.author = "George Moschovitis" s.email = "gm@navel.gr" s.homepage = "http://www.navel.gr/nitro" s.rubyforge_project = "nitro" end else # Og stand-alone GemSpec # require "lib/og/version" PKG_VERSION = $og_version PKG_FILES = FileList[ "README.og", "RELEASES.og", "LICENSE", "AUTHORS", "Rakefile", "ChangeLog*", "examples/og/*", "lib/glue.rb", "lib/glue/**/*", "lib/og/**/*", "lib/og.rb", "test/*og*.rb", "test/og/*", "vendor/extensions/**/*" ].exclude(".svn/**/*").exclude("**/*.log") spec = Gem::Specification.new do |s| s.name = 'og' s.version = PKG_VERSION s.summary = 'Og (ObjectGraph)' s.description = 'An efficient and transparent Object-Relational mapping library' # s.add_dependency("postgres", ">= 0.7.1") # s.add_dependency("extensions", ">= 0.5") # s.add_dependency("builder") s.required_ruby_version = ">= 1.8.1" s.files = PKG_FILES.to_a s.require_path = "lib" s.autorequire = "og" s.has_rdoc = true s.extra_rdoc_files = FileList["README.og", "RELEASES.og", "LICENSE", "AUTHORS"].to_a s.rdoc_options << "--main" << "README.og" << "--title" << "Og Documentation" s.test_files = [] s.bindir = "bin" s.author = "George Moschovitis" s.email = "gm@navel.gr" s.homepage = "http://www.navel.gr/og" s.rubyforge_project = "og-rml" end end Rake::GemPackageTask.new(spec) do |pkg| pkg.package_dir = "dist" pkg.need_zip = true pkg.need_tar = true end # ---------------------------------------------------------------------- desc "Install the gem" task :install => :repackage do sh "gem install --local --no-rdoc dist/nitro-#{PKG_VERSION}.gem" end # vim: ft=ruby