# WebROaR - Ruby Application Server - http://webroar.in/ # Copyright (C) 2009 WebROaR # # This file is part of WebROaR. # # WebROaR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # WebROaR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with WebROaR. If not, see . ############################################################################### # Rake file for Gem packaging ############################################################################### require 'rubygems' #Gem::manage_gems require 'rake/gempackagetask' task :clean => :clobber_package task :package => :clean_db_log task :gem => :clean_db_log spec = Gem::Specification.new do |s| s.name = "webroar" s.version = Webroar::VERSION::STRING s.platform = Gem::Platform::RUBY s.summary = "A ruby application server." s.description = "WebROaR is the first true application server for ruby based web applications that provides in-built support for scalable and robust deployment of multiple applications simultaneously." s.authors = ["Aditya Babbar", "Ashish Sharma", "Dharmarth Shah", "Nikunj Limbaseeya"] s.email = ["aditya.babbar@webroar.in", "ashish.sharma@webroar.in", "dharmarth.shah@webroar.in", "nikunj.limbaseeya@webroar.in"] s.homepage = "http://webroar.in" s.rubyforge_project = "webroar" s.has_rdoc = false s.executables = ['webroar','webroar-analyzer'] s.required_ruby_version = '>= 1.8.5' s.add_dependency 'calendar_date_select', '>= 1.15' s.add_dependency 'rack', '>= 0.9.1' s.add_dependency 'rake', '>= 0.8.1' s.add_dependency 'rspec', '>=1.2.2' s.add_dependency 'sqlite3-ruby', '>=1.2.3' s.add_dependency 'starling-starling', '>=0.10.0' s.files = FileList['Rakefile', # 'CHANGELOG', 'COPYING', File.join('bin', 'webroar'), File.join('bin', 'webroar-analyzer'), File.join('conf', '*.yml'), File.join('doc', '**','*.{txt,html,png}'), File.join('{src,lib,tasks}', '**', '**', '*'), File.join('src', 'admin_panel', 'lib', 'tasks'), File.join('src', 'admin_panel', 'test', 'integration','*'), File.join('src', 'admin_panel', 'tmp','*'), File.join('src', 'admin_panel', 'tmp', 'cache','*'), File.join('src', 'admin_panel', 'tmp', 'pids','*'), File.join('src', 'admin_panel', 'tmp', 'sessions','*'), File.join('src', 'admin_panel', 'tmp', 'sockets','*')].exclude( File.join('src', 'admin_panel', 'db','*.*'), File.join('src', 'admin_panel', 'log','*.*'), File.join('src', 'admin_panel', 'config','user.yml'), File.join('src', 'admin_panel', 'test.log'), File.join('src', 'admin_panel', 'test_summary'), File.join('conf','mail_config.yml'), File.join('conf', 'config.yml')) s.test_files = FileList[File.join('test', '**', '*.{c,h,yml,rb,js,css,html,txt}'), File.join('test', 'spec','test_app','app','**','*'), File.join('test', 'spec','test_app','script','**','*'), File.join('test', 'spec', 'test_app', 'vendor', '.placeholder'), File.join('test', 'spec', 'test_app', 'Rakefile')].exclude( File.join('test', 'spec', 'test_app', 'test', '**', '*'), File.join('test', 'spec', 'test_app', 'db', 'schema.rb')) s.require_path = "lib" s.bindir = "bin" end Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = true end task :tag do sh "git tag -m 'Tagging #{Webroar::SERVER}' -a v#{Webroar::VERSION::STRING}" end desc "Install WebROaR from repository. Optionally ssl=yes(for SSL build) and debug_build=yes(for debug build) can be passed." task :install => [:clobber, :gem] do sh "gem install pkg/#{spec.full_name}.gem" opt_str = "" if ENV["ssl"] == "yes" opt_str += "-s " end if ENV['debug_build'] == 'yes' opt_str += "-d " end sh "webroar install #{opt_str}" end desc "Uninstall WebROaR" task :uninstall => :clean do sh "webroar uninstall" sh "gem uninstall -v #{Webroar::VERSION::STRING} -x webroar" end task :clean_db_log do cur_dir = File.expand_path(Dir.getwd) Dir.chdir(File.expand_path(File.join(File.dirname(__FILE__), '..','src','admin_panel'))) system("rake log:clear") Dir.chdir(cur_dir) end