From b3ebbc2d9d239de4f1c8a1c2bbdb8f7f88eefe99 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Mon, 6 Jul 2009 22:33:28 -0300 Subject: [PATCH] Spinoff: Rework project structure using Hoe. The goal is simplification and less duplication. Previous defined task are commented and specific pieces are going to be added to tasks folder. This was requires since Echoe do not let us remove the compilation steps that rake-compiler needs to hook in. --- CHANGELOG | 18 -------------- History.txt | 51 ++++++++++++++++++++++++++++++++++++++++ Manifest => Manifest.txt | 17 +++++++------- Rakefile | 17 ++++++++++++++ lib/mongrel/const.rb | 2 +- tasks/gem.rake | 26 ++++++++++++++++++++ 6 files changed, 104 insertions(+), 27 deletions(-) delete mode 100644 CHANGELOG create mode 100644 History.txt rename Manifest => Manifest.txt (96%) create mode 100644 tasks/gem.rake diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 637fe895..00000000 --- a/CHANGELOG +++ /dev/null @@ -1,18 +0,0 @@ - -v1.1.5. Fix bug where num_processors is not actually set from mongrel_rails. - -v1.1.4. Fix camping handler. Correct treatment of @throttle parameter. - -v1.1.3. Fix security flaw of DirHandler; reported on mailing list. - -v1.1.2. Fix worker termination bug; fix JRuby 1.0.3 load order issue; fix require issue on systems without Rubygems. - -v1.1.1. Fix mongrel_rails restart bug; fix bug with Rack status codes. - -v1.1. Pure Ruby URIClassifier. More modular architecture. JRuby support. Move C URIClassifier into mongrel_experimental project. - -v1.0.4. Backport fixes for versioning inconsistency, mongrel_rails bug, and DirHandler bug. - -v1.0.3. Fix user-switching bug; make people upgrade to the latest from the RC. - -v1.0.2. Signed gem; many minor bugfixes and patches. diff --git a/History.txt b/History.txt new file mode 100644 index 00000000..31e4522d --- /dev/null +++ b/History.txt @@ -0,0 +1,51 @@ +=== (unrealeased) / 2009-07-?? + +* Rake task project reorganization and reformat using Hoe. + + +=== 1.1.5 / 2008-05-22 + +* Fix bug where num_processors is not actually set from mongrel_rails. + + +=== 1.1.4 / 2008-02-29 + +* Fix camping handler. Correct treatment of @throttle parameter. + + +=== 1.1.3 / 2007-12-29 + +* Fix security flaw of DirHandler; reported on mailing list. + + +=== 1.1.2 / 2007-12-15 + +* Fix worker termination bug; fix JRuby 1.0.3 load order issue; fix require issue on systems without Rubygems. + + +=== 1.1.1 / 2007-11-12 + +* Fix mongrel_rails restart bug; fix bug with Rack status codes. + + +=== 1.1 / 2007-11-01 + +* Pure Ruby URIClassifier. +* More modular architecture. +* JRuby support. +* Move C URIClassifier into mongrel_experimental project. + + +=== 1.0.4 / 2007-10-29 + +* Backport fixes for versioning inconsistency, mongrel_rails bug, and DirHandler bug. + + +=== 1.0.3 + +* Fix user-switching bug; make people upgrade to the latest from the RC. + + +=== 1.0.2 + +* Signed gem; many minor bugfixes and patches. diff --git a/Manifest b/Manifest.txt similarity index 96% rename from Manifest rename to Manifest.txt index 6a77dadf..00237253 100644 --- a/Manifest +++ b/Manifest.txt @@ -1,9 +1,14 @@ -bin/mongrel_rails -CHANGELOG COPYING +History.txt +LICENSE +Manifest.txt +README +Rakefile +TODO +bin/mongrel_rails examples/builder.rb -examples/camping/blog.rb examples/camping/README +examples/camping/blog.rb examples/camping/tepee.rb examples/httpd.conf examples/mime.yaml @@ -43,12 +48,9 @@ lib/mongrel/stats.rb lib/mongrel/tcphack.rb lib/mongrel/uri_classifier.rb lib/mongrel.rb -LICENSE -Manifest mongrel-public_cert.pem -mongrel.gemspec -README setup.rb +tasks/gem.rake test/mime.yaml test/mongrel.conf test/test_cgi_wrapper.rb @@ -65,5 +67,4 @@ test/test_stats.rb test/test_uriclassifier.rb test/test_ws.rb test/testhelp.rb -TODO tools/trickletest.rb diff --git a/Rakefile b/Rakefile index 41f62809..ab5799f2 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,20 @@ +# +# NOTE: Keep this file clean. +# Add your customizations inside tasks directory. +# Thank You. +# + +begin + require 'rake' +rescue LoadError + require 'rubygems' + require 'rake' +end + +# load rakefile extensions (tasks) +Dir['tasks/*.rake'].sort.each { |f| load f } + +__END__ require 'rubygems' gem 'echoe', '>=2.7.5' diff --git a/lib/mongrel/const.rb b/lib/mongrel/const.rb index 9b4109ec..c397d34f 100644 --- a/lib/mongrel/const.rb +++ b/lib/mongrel/const.rb @@ -65,7 +65,7 @@ module Mongrel REQUEST_URI='REQUEST_URI'.freeze REQUEST_PATH='REQUEST_PATH'.freeze - MONGREL_VERSION="1.1.5".freeze + MONGREL_VERSION = VERSION = "1.1.5".freeze MONGREL_TMP_BASE="mongrel".freeze diff --git a/tasks/gem.rake b/tasks/gem.rake new file mode 100644 index 00000000..68088f97 --- /dev/null +++ b/tasks/gem.rake @@ -0,0 +1,26 @@ +require 'rubygems/package_task' +require 'hoe' + +HOE = Hoe.spec 'mongrel' do + self.rubyforge_name = 'mongrel' + self.author = ['Zed A. Shaw'] + self.email = %w[mongrel-users@rubyforge.org] + self.readme_file = "README" + self.need_tar = false + self.need_zip = false + + spec_extras[:required_ruby_version] = Gem::Requirement.new('>= 1.8.6') + + spec_extras[:extensions] = ["ext/http11/extconf.rb"] + + extra_deps << ['gem_plugin', '>= 0.2.3'] + extra_dev_deps << ['rake-compiler', ">= 0.5.0"] +end + +file "#{HOE.spec.name}.gemspec" => ['Rakefile', 'tasks/gem.rake'] do |t| + puts "Generating #{t.name}" + File.open(t.name, 'w') { |f| f.puts HOE.spec.to_yaml } +end + +desc "Generate or update the standalone gemspec file for the project" +task :gemspec => ["#{HOE.spec.name}.gemspec"]