mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
signed mongrel_cluster
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@597 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
762ff62672
commit
60b1bb0a03
4 changed files with 24 additions and 143 deletions
2
projects/mongrel_cluster/CHANGELOG
Normal file
2
projects/mongrel_cluster/CHANGELOG
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
v1.0.3. Signed gem.
|
10
projects/mongrel_cluster/Manifest
Normal file
10
projects/mongrel_cluster/Manifest
Normal file
|
@ -0,0 +1,10 @@
|
|||
resources/mongrel_cluster
|
||||
resources/defaults.yaml
|
||||
README
|
||||
Manifest
|
||||
LICENSE
|
||||
lib/mongrel_cluster/recipes.rb
|
||||
lib/mongrel_cluster/init.rb
|
||||
COPYING
|
||||
CHANGELOG
|
||||
bin/mongrel_cluster_ctl
|
|
@ -1,46 +1,20 @@
|
|||
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"]
|
||||
require 'echoe'
|
||||
|
||||
setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
|
||||
Echoe.new("mongrel_cluster") do |p|
|
||||
p.summary = "Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes."
|
||||
p.author="Bradley Taylor"
|
||||
p.dependencies = ['gem_plugin >=0.2.2', 'mongrel >=1.0.1']
|
||||
p.has_rdoc = false
|
||||
|
||||
desc "Does a full compile, test run"
|
||||
task :default => [:test, :package]
|
||||
|
||||
version="1.0.2"
|
||||
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"
|
||||
spec.add_dependency('gem_plugin', '>= 0.2.2')
|
||||
spec.add_dependency('mongrel', '>= 1.0.1')
|
||||
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}}
|
||||
p.need_tar_gz = false
|
||||
p.need_tgz = true
|
||||
p.require_signed = true
|
||||
p.certificate_chain = ['/Users/eweaver/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
|
||||
'/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
|
||||
end
|
||||
|
||||
# Is this still used?
|
||||
task :gem_source do
|
||||
mkdir_p "pkg/gems"
|
||||
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
|
||||
def make(makedir)
|
||||
Dir.chdir(makedir) do
|
||||
sh(PLATFORM =~ /win32/ ? 'nmake' : 'make')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def extconf(dir)
|
||||
Dir.chdir(dir) do ruby "extconf.rb" end
|
||||
end
|
||||
|
||||
|
||||
def setup_tests
|
||||
Rake::TestTask.new do |t|
|
||||
t.libs << "test"
|
||||
t.test_files = FileList['test/test*.rb']
|
||||
t.verbose = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def setup_clean otherfiles
|
||||
files = ['build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log'] + otherfiles
|
||||
CLEAN.include(files)
|
||||
end
|
||||
|
||||
|
||||
def setup_rdoc files
|
||||
Rake::RDocTask.new do |rdoc|
|
||||
rdoc.rdoc_dir = 'doc/rdoc'
|
||||
rdoc.options << '--line-numbers'
|
||||
rdoc.rdoc_files.add(files)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def setup_extension(dir, extension)
|
||||
ext = "ext/#{dir}"
|
||||
ext_so = "#{ext}/#{extension}.#{Config::CONFIG['DLEXT']}"
|
||||
ext_files = FileList[
|
||||
"#{ext}/*.c",
|
||||
"#{ext}/*.h",
|
||||
"#{ext}/extconf.rb",
|
||||
"#{ext}/Makefile",
|
||||
"lib"
|
||||
]
|
||||
|
||||
task "lib" do
|
||||
directory "lib"
|
||||
end
|
||||
|
||||
desc "Builds just the #{extension} extension"
|
||||
task extension.to_sym => ["#{ext}/Makefile", ext_so ]
|
||||
|
||||
file "#{ext}/Makefile" => ["#{ext}/extconf.rb"] do
|
||||
extconf "#{ext}"
|
||||
end
|
||||
|
||||
file ext_so => ext_files do
|
||||
make "#{ext}"
|
||||
cp ext_so, "lib"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def base_gem_spec(pkg_name, pkg_version)
|
||||
pkg_version = pkg_version
|
||||
pkg_name = pkg_name
|
||||
pkg_file_name = "#{pkg_name}-#{pkg_version}"
|
||||
Gem::Specification.new do |s|
|
||||
s.name = pkg_name
|
||||
s.version = pkg_version
|
||||
s.platform = Gem::Platform::RUBY
|
||||
s.has_rdoc = true
|
||||
s.extra_rdoc_files = [ "README" ]
|
||||
|
||||
s.files = %w(COPYING LICENSE README Rakefile) +
|
||||
Dir.glob("{bin,doc/rdoc,test,lib}/**/*") +
|
||||
Dir.glob("ext/**/*.{h,c,rb}") +
|
||||
Dir.glob("examples/**/*.rb") +
|
||||
Dir.glob("tools/*.rb")
|
||||
|
||||
s.require_path = "lib"
|
||||
s.extensions = FileList["ext/**/extconf.rb"].to_a
|
||||
s.bindir = "bin"
|
||||
end
|
||||
end
|
||||
|
||||
def setup_gem(pkg_name, pkg_version)
|
||||
spec = base_gem_spec(pkg_name, pkg_version)
|
||||
yield spec if block_given?
|
||||
|
||||
Rake::GemPackageTask.new(spec) do |p|
|
||||
p.gem_spec = spec
|
||||
p.need_tar = true
|
||||
end
|
||||
end
|
||||
|
||||
def setup_win32_gem(pkg_name, pkg_version)
|
||||
spec = base_gem_spec(pkg_name, pkg_version)
|
||||
yield spec if block_given?
|
||||
|
||||
Gem::Builder.new(spec).build
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue