# * George Moschovitis # (c) 2004-2005 Navel, all rights reserved. # $Id$ require 'rake/rdoctask' require 'rake/testtask' require 'rake/gempackagetask' og = true 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').exclude('test/og/**/*') t.verbose = true end # Run all tests. (including expensive/depended tests) Rake::TestTask.new(:test_all) do |t| t.libs << 'test' t.test_files = FileList['test/**/tc*.rb'] t.verbose = true end # Generate RDoc documentation. Rake::RDocTask.new do |rd| rd.main = 'README' rd.rdoc_dir = 'doc/rdoc' rd.rdoc_files.include('README', 'INSTALL', 'doc/og_config.txt', 'doc/og_tutorial.txt', 'lib/**/*.rb') rd.options << '--all --inline-source' end # Build gem. if og spec = Gem::Specification.new do |s| s.name = 'og' if File.read('lib/og.rb') =~ /Version\s+=\s+'(\d+\.\d+\.\d+)'/ s.version = $1 else raise 'No version found' end s.summary = 'Og (ObjectGraph)' s.description = 'An efficient and transparent Object-Relational mapping library' # s.add_dependency 'postgres-pr', '>= 0.3.0' # s.add_dependency 'postgres', '>= 0.7.1' s.add_dependency 'extensions', '>= 0.5' # s.add_dependency 'sqlite3-ruby', '>= 1.0.0' #s.add_dependency 'mysql', '>= 2.5.1' s.add_dependency 'flexmock', '>= 0.0.3' s.required_ruby_version = '>= 1.8.0' s.files = FileList[ 'README.og', 'RELEASES.og', 'doc/LICENSE', 'doc/AUTHORS', 'Rakefile', 'ChangeLog*', 'install.rb', 'examples/og/*', 'lib/glue.rb', 'lib/glue/**/*', 'lib/og/**/*', 'lib/og.rb', 'test/*og*.rb', 'test/og/*', 'vendor/extensions/**/*' ].exclude('.svn/**/*').exclude('**/*.log').to_a s.require_path = 'lib' s.autorequire = 'og' s.has_rdoc = true s.extra_rdoc_files = FileList['README.og', 'RELEASES.og', 'doc/LICENSE', 'doc/AUTHORS'].to_a s.rdoc_options << '--main' << 'README.og' << '--title' << 'Og Documentation' s.rdoc_options << '--all' << '--inline-source' s.author = 'George Moschovitis' s.email = 'gm@navel.gr' s.homepage = 'http://www.rubyforge.com/projects/nitro' s.rubyforge_project = 'nitro' end else spec = Gem::Specification.new do |s| s.name = 'nitro' if File.read('lib/nitro.rb') =~ /Version\s+=\s+'(\d+\.\d+\.\d+)'/ s.version = $1 else raise 'No version found' end s.summary = 'Nitro Web Engine' s.description = 'An efficient, multiparadigm and flexible platform for rapid ' + 'web application development. Implements a full development stack.' # s.add_dependency 'postgres-pr', '>= 0.3.0' # s.add_dependency 'postgres', '>= 0.7.1' # s.add_dependency 'ParseTree', '>= 1.3.3' s.add_dependency 'extensions', '>= 0.5' # s.add_dependency 'sqlite3-ruby', '>= 1.0.0' # s.add_dependency 'mysql', '>= 2.5.1' s.add_dependency 'flexmock', '>= 0.0.3' s.required_ruby_version = '>= 1.8.0' s.files = FileList[ '[A-Z]*', 'install.rb', '{bin,benchmark,examples,doc,lib,test,vendor}/**/*' ].exclude('.svn/**/*').exclude('*.og').exclude('**/*.log').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.rdoc_options << '--all' << '--inline-source' s.test_files = [] s.bindir = 'bin' s.executables = ['nitro'] s.default_executable = 'nitro' s.author = 'George Moschovitis' s.email = 'gm@navel.gr' s.homepage = 'http://www.rubyforge.com/projects/nitro' s.rubyforge_project = 'nitro' end end Rake::GemPackageTask.new(spec) do |pkg| pkg.package_dir = 'dist' pkg.need_zip = true pkg.need_tar = true end # Manual install (not recommended). task :install do ruby 'install.rb' end