about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorluislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>2008-03-31 08:19:17 +0000
committerluislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>2008-03-31 08:19:17 +0000
commit74edc38c9d3702a6fafbb67e190564b7f1422a28 (patch)
tree8e4d391190fed9be442142877264b956bd96f08b
parent9ed23d6b1be6f24a5ac43ff77db20ac77dbf176d (diff)
downloadunicorn-74edc38c9d3702a6fafbb67e190564b7f1422a28.tar.gz
Almost nirvana for CI.


git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1001 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r--Manifest3
-rw-r--r--Rakefile51
-rw-r--r--projects/fastthread/Rakefile11
-rw-r--r--projects/gem_plugin/Rakefile7
-rw-r--r--projects/mongrel_service/Rakefile10
5 files changed, 46 insertions, 36 deletions
diff --git a/Manifest b/Manifest
index 2896ec6..9819ba8 100644
--- a/Manifest
+++ b/Manifest
@@ -44,7 +44,6 @@ lib/mongrel/stats.rb
 lib/mongrel/tcphack.rb
 lib/mongrel/uri_classifier.rb
 lib/mongrel.rb
-lib/mongrel.rb.rej
 LICENSE
 Manifest
 mongrel-public_cert.pem
@@ -63,7 +62,7 @@ test/unit/test_conditional.rb
 test/unit/test_configurator.rb
 test/unit/test_debug.rb
 test/unit/test_handlers.rb
-test/unit/test_http11.rb
+test/unit/test_http_parser.rb
 test/unit/test_redirect_handler.rb
 test/unit/test_request_progress.rb
 test/unit/test_response.rb
diff --git a/Rakefile b/Rakefile
index 9ea061c..fbe8801 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,11 +1,12 @@
 
 require 'rubygems'
-gem 'echoe', '>=2.7.5'
+gem 'echoe', '>=2.7.11'
 require 'echoe'
 
 e = Echoe.new("mongrel") do |p|
   p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
-  p.author ="Zed A. Shaw"
+  p.author = "Zed A. Shaw"
+  p.email = "mongrel-development@rubyforge.org"
   p.clean_pattern = ['ext/http11/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'lib/*.{bundle,so,o,obj,pdb,lib,def,exp}', 'ext/http11/Makefile', 'pkg', 'lib/*.bundle', '*.gem', 'site/output', '.config', 'lib/http11.jar', 'ext/http11_java/classes', 'coverage', 'test_*.log', 'log', 'doc']
   p.url = "http://mongrel.rubyforge.org"
   p.rdoc_pattern = ['README', 'LICENSE', 'CONTRIBUTORS', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
@@ -15,28 +16,27 @@ e = Echoe.new("mongrel") do |p|
   p.dependencies = ['gem_plugin >=0.2.3']  
   p.extension_pattern = nil
   
-  p.certificate_chain = case ENV['USER']
+  p.certificate_chain = case (ENV['USER'] || ENV['USERNAME']).downcase
     when 'eweaver'
       ['~/p/configuration/gem_certificates/mongrel/mongrel-public_cert.pem',
        '~/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']
-    when 'luislavena'
-      ['~/gem_certificates/mongrel-public_cert.pem',
-        '~/gem_certificates/luislavena-mongrel-public_cert.pem']    
+    when 'luislavena', 'luis'
+      ['~/projects/gem_certificates/mongrel-public_cert.pem',
+        '~/projects/gem_certificates/luislavena-mongrel-public_cert.pem']    
   end
   
   p.need_tar_gz = false
   p.need_tgz = true
 
-  if RUBY_PLATFORM !~ /mswin|java/
+  unless Platform.windows? or Platform.java?
     p.extension_pattern = ["ext/**/extconf.rb"]
   end
 
   p.eval = proc do
-    case RUBY_PLATFORM
-    when /mswin/
+    if Platform.windows?
       self.files += ['lib/http11.so']
       self.platform = Gem::Platform::CURRENT
-    when /java/
+    elsif Platform.java?
       self.files += ['lib/http11.jar']
       self.platform = 'jruby' # XXX Is this right?
     else
@@ -82,19 +82,18 @@ def java_classpath_arg
   classpath ? "-cp #{classpath}" : ""
 end
 
-case RUBY_PLATFORM
-when /mswin/
+if Platform.windows?
   filename = "lib/http11.so"
   file filename do
     Dir.chdir("ext/http11") do
       ruby "extconf.rb"
-      system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
+      system(Platform.make)
     end
     move_extensions
   end
   task :compile => [filename]
 
-when /java/
+elsif Platform.java?
 
   # Avoid JRuby in-process launching problem
   begin
@@ -121,13 +120,17 @@ end
 def sub_project(project, *targets)
   targets.each do |target|
     Dir.chdir "projects/#{project}" do
-      unless RUBY_PLATFORM =~ /mswin/
-        sh("rake #{target.to_s}") # --trace
-      end
+      sh("#{Platform.rake} #{target.to_s}") # --trace
     end
   end
 end
 
+desc "Compile all the projects"
+task :compile_all => [:compile] do
+  sub_project("fastthread", :compile)
+  sub_project("mongrel_service", :compile)
+end
+
 desc "Package Mongrel and all subprojects"
 task :package_all => [:package] do
   sub_project("gem_plugin", :package)
@@ -139,11 +142,9 @@ task :package_all => [:package] do
   sub_project("mongrel_cluster", :package)
   sub_project("mongrel_experimental", :package)
 
-  sh("rake java package") unless RUBY_PLATFORM =~ /java/
+  sh("rake java package") unless Platform.windows?
   
-  # XXX Broken by RubyGems 0.9.5
-  # sub_project("mongrel_service", :package) if RUBY_PLATFORM =~ /mswin/
-  # sh("rake mswin package") unless RUBY_PLATFORM =~ /mswin/
+  sub_project("mongrel_service", :package) if Platform.windows?
 end
 
 task :install_requirements do
@@ -161,7 +162,7 @@ task :install => [:install_requirements] do
   sub_project("mongrel_console", :install)
   sub_project("mongrel_cluster", :install)
   # sub_project("mongrel_experimental", :install)
-  sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
+  sub_project("mongrel_service", :install) if Platform.windows?
 end
 
 desc "for Mongrel and all its subprojects"
@@ -173,11 +174,11 @@ task :uninstall => [:clean] do
   sub_project("gem_plugin", :uninstall)
   sub_project("fastthread", :uninstall)
   # sub_project("mongrel_experimental", :uninstall)
-  sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
+  sub_project("mongrel_service", :uninstall) if Platform.windows?
 end
 
 desc "for Mongrel and all its subprojects"
-task :clean do
+task :clean_all => [:clean] do
   sub_project("gem_plugin", :clean)
   sub_project("cgi_multipart_eof_fix", :clean)
   sub_project("fastthread", :clean)
@@ -186,7 +187,7 @@ task :clean do
   sub_project("mongrel_console", :clean)
   sub_project("mongrel_cluster", :clean)
   sub_project("mongrel_experimental", :clean)
-  sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
+  sub_project("mongrel_service", :clean) if Platform.windows?
 end
 
 #### Site upload tasks
diff --git a/projects/fastthread/Rakefile b/projects/fastthread/Rakefile
index aadf9f8..e418a5a 100644
--- a/projects/fastthread/Rakefile
+++ b/projects/fastthread/Rakefile
@@ -1,9 +1,12 @@
 
+require 'rubygems'
+gem 'echoe', '>=2.7.11'
 require 'echoe'
 
 Echoe.new("fastthread") do |p|
   p.project = "mongrel"
   p.author = "MenTaLguY <mental@rydia.net>"
+  p.email = "mental@rydia.net"
   p.summary = "Optimized replacement for thread.rb primitives"
   p.extensions = "ext/fastthread/extconf.rb"
   p.clean_pattern = ['build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log', "ext/fastthread/*.{bundle,so,obj,pdb,lib,def,exp}", "ext/fastthread/Makefile", "pkg", "lib/*.bundle", "*.gem", ".config"]
@@ -14,10 +17,10 @@ Echoe.new("fastthread") do |p|
     '/Users/eweaver/p/configuration/gem_certificates/evan_weaver-mongrel-public_cert.pem']    
   p.require_signed = true
 
-  p.eval = proc do  
-    if RUBY_PLATFORM.match("win32")
-      platform = Gem::Platform::WIN32
-      files += ['lib/fastthread.so']
+  p.eval = proc do
+    if Platform.windows?
+      self.platform = Gem::Platform::CURRENT
+      self.files += ['lib/fastthread.so']
       task :package => [:clean, :compile]
     end
   end
diff --git a/projects/gem_plugin/Rakefile b/projects/gem_plugin/Rakefile
index f1bd428..b312bfe 100644
--- a/projects/gem_plugin/Rakefile
+++ b/projects/gem_plugin/Rakefile
@@ -1,8 +1,11 @@
 
+require 'rubygems'
+gem 'echoe', '>=2.7.11'
 require 'echoe'
 
 Echoe.new("gem_plugin") do |p|
-  p.author="Zed A. Shaw"
+  p.author= "Zed A. Shaw"
+  p.email = "mongrel-development@rubyforge.org"
   p.project = "mongrel"
   p.summary = "A plugin system based on rubygems that uses dependencies only"
 
@@ -15,7 +18,7 @@ Echoe.new("gem_plugin") do |p|
   p.test_pattern = "test/test_plugins.rb"
   p.clean_pattern += ["pkg", "lib/*.bundle", "*.gem", ".config"]
   p.rdoc_pattern = ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
-  p.rdoc_template = `allison --path`.chomp  
+  p.rdoc_template = `#{Platform.windows? ? 'allison.bat' : 'allison'} --path`.chomp  
 end
 
 namespace :site do
diff --git a/projects/mongrel_service/Rakefile b/projects/mongrel_service/Rakefile
index f9c74a3..1d04826 100644
--- a/projects/mongrel_service/Rakefile
+++ b/projects/mongrel_service/Rakefile
@@ -1,3 +1,6 @@
+
+require 'rubygems'
+gem 'echoe', '>=2.7.11'
 require 'echoe'
 require 'tools/freebasic'
 
@@ -10,15 +13,16 @@ echoe_spec = Echoe.new("mongrel_service") do |p|
   p.summary += " (debug build)" unless ENV['RELEASE']
   p.description = "This plugin offer native win32 services for rails, powered by Mongrel."
   p.author = "Luis Lavena"
-  p.platform = Gem::Platform::WIN32
+  p.email = "luislavena@gmail.com"
+  p.platform = Gem::Platform::CURRENT
   p.dependencies = ['gem_plugin >=0.2.3', 'mongrel >=1.0.2', 'win32-service >=0.5.0']
 
   p.executable_pattern = ""
   
   p.need_tar_gz = false
   p.need_zip = true
-  p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
-    '~/gem_certificates/luislavena-mongrel-public_cert.pem']
+  p.certificate_chain = ['~/projects/gem_certificates/mongrel-public_cert.pem',
+    '~/projects/gem_certificates/luislavena-mongrel-public_cert.pem']
   p.require_signed = true
 end