2006-08-16 16:56:04 -04:00
|
|
|
require 'rake'
|
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rake/clean'
|
|
|
|
require 'rake/gempackagetask'
|
|
|
|
require 'rake/rdoctask'
|
|
|
|
require 'tools/rakehelp'
|
|
|
|
require 'fileutils'
|
|
|
|
include FileUtils
|
|
|
|
|
|
|
|
setup_tests
|
|
|
|
setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"]
|
|
|
|
|
|
|
|
setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
|
|
|
|
|
|
|
|
desc "Does a full compile, test run"
|
|
|
|
task :default => [:test, :package]
|
|
|
|
|
2007-07-10 15:42:59 -04:00
|
|
|
version="1.0.2"
|
2006-08-16 16:56:04 -04:00
|
|
|
name="mongrel_cluster"
|
|
|
|
|
|
|
|
setup_gem(name, version) do |spec|
|
|
|
|
spec.summary = "Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes."
|
|
|
|
spec.description = spec.summary
|
|
|
|
spec.author="Bradley Taylor"
|
2007-01-25 20:48:42 -05:00
|
|
|
spec.add_dependency('gem_plugin', '>= 0.2.2')
|
|
|
|
spec.add_dependency('mongrel', '>= 1.0.1')
|
2006-08-16 16:56:04 -04:00
|
|
|
spec.files += Dir.glob("resources/**/*")
|
|
|
|
spec.has_rdoc = false
|
|
|
|
spec.files += Dir.glob("bin/*")
|
|
|
|
spec.files += Dir.glob("examples/*")
|
|
|
|
spec.default_executable = "mongrel_cluster_ctl"
|
|
|
|
spec.executables = ["mongrel_cluster_ctl"]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
task :install => [:test, :package] do
|
|
|
|
sh %{sudo gem install pkg/#{name}-#{version}.gem}
|
|
|
|
end
|
|
|
|
|
|
|
|
task :uninstall => [:clean] do
|
|
|
|
sh %{sudo gem uninstall #{name}}
|
|
|
|
end
|
|
|
|
|
|
|
|
task :gem_source do
|
|
|
|
mkdir_p "pkg/gems"
|
|
|
|
|
|
|
|
FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
|
|
|
|
FileList["pkg/*.tgz"].each {|tgz| rm tgz }
|
|
|
|
rm_rf "pkg/#{name}-#{version}"
|
|
|
|
|
|
|
|
sh %{ generate_yaml_index.rb -d pkg }
|
2007-07-10 15:42:59 -04:00
|
|
|
sh %{ scp -r pkg/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/releases/ }
|
2006-08-16 16:56:04 -04:00
|
|
|
end
|
|
|
|
|