mongrel 1.0.5 → 1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mongrel might be problematic. Click here for more details.

@@ -4,10 +4,7 @@
4
4
  # Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html
5
5
  # for more information.
6
6
 
7
- require 'rubygems'
8
- require 'gem_plugin'
9
-
10
- # file is just a stub that makes sure the mongrel_plugins gem is loaded and ready
11
-
12
-
7
+ require 'mongrel/gems'
8
+ Mongrel::Gems.require 'gem_plugin'
13
9
 
10
+ # File is just a stub that makes sure the mongrel_plugins gem is loaded and ready
@@ -0,0 +1,76 @@
1
+
2
+ module Mongrel
3
+ class URIClassifier
4
+
5
+ class RegistrationError < RuntimeError
6
+ end
7
+ class UsageError < RuntimeError
8
+ end
9
+
10
+ attr_reader :handler_map
11
+
12
+ # Returns the URIs that have been registered with this classifier so far.
13
+ def uris
14
+ @handler_map.keys
15
+ end
16
+
17
+ def initialize
18
+ @handler_map = {}
19
+ @matcher = //
20
+ @root_handler = nil
21
+ end
22
+
23
+ # Register a handler object at a particular URI. The handler can be whatever
24
+ # you want, including an array. It's up to you what to do with it.
25
+ #
26
+ # Registering a handler is not necessarily threadsafe, so be careful if you go
27
+ # mucking around once the server is running.
28
+ def register(uri, handler)
29
+ raise RegistrationError, "#{uri.inspect} is already registered" if @handler_map[uri]
30
+ raise RegistrationError, "URI is empty" if !uri or uri.empty?
31
+ raise RegistrationError, "URI must begin with a \"#{Const::SLASH}\"" unless uri[0..0] == Const::SLASH
32
+ @handler_map[uri.dup] = handler
33
+ rebuild
34
+ end
35
+
36
+ # Unregister a particular URI and its handler.
37
+ def unregister(uri)
38
+ handler = @handler_map.delete(uri)
39
+ raise RegistrationError, "#{uri.inspect} was not registered" unless handler
40
+ rebuild
41
+ handler
42
+ end
43
+
44
+ # Resolve a request URI by finding the best partial match in the registered
45
+ # handler URIs.
46
+ def resolve(request_uri)
47
+ if @root_handler
48
+ # Optimization for the pathological case of only one handler on "/"; e.g. Rails
49
+ [Const::SLASH, request_uri, @root_handler]
50
+ elsif match = @matcher.match(request_uri)
51
+ uri = match.to_s
52
+ # A root mounted ("/") handler must resolve such that path info matches the original URI.
53
+ [uri, (uri == Const::SLASH ? request_uri : match.post_match), @handler_map[uri]]
54
+ else
55
+ [nil, nil, nil]
56
+ end
57
+ end
58
+
59
+ private
60
+
61
+ def rebuild
62
+ if @handler_map.size == 1 and @handler_map[Const::SLASH]
63
+ @root_handler = @handler_map.values.first
64
+ else
65
+ @root_handler = nil
66
+ routes = @handler_map.keys.sort.sort_by do |uri|
67
+ -uri.length
68
+ end
69
+ @matcher = Regexp.new(routes.map do |uri|
70
+ Regexp.new('^' + Regexp.escape(uri))
71
+ end.join('|'))
72
+ end
73
+ end
74
+
75
+ end
76
+ end
@@ -1,258 +1,263 @@
1
-
2
- # Gem::Specification for Mongrel-1.0.5
3
- # Originally generated by Echoe
4
-
5
- Gem::Specification.new do |s|
6
- s.name = %q{mongrel}
7
- s.version = "1.0.5"
8
- s.date = %q{2007-12-29}
9
- s.summary = %q{A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps.}
10
- s.require_paths = ["lib", "ext"]
11
- s.email = %q{}
12
- s.homepage = %q{}
13
- s.rubyforge_project = %q{mongrel}
14
- s.description = %q{A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps.}
15
- s.default_executable = %q{mongrel_rails}
16
- s.has_rdoc = true
17
- s.required_ruby_version = Gem::Version::Requirement.new(">= 1.8.4")
18
- s.authors = ["Zed A. Shaw"]
19
- s.test_files = ["test/test_cgi_wrapper.rb", "test/test_command.rb", "test/test_conditional.rb", "test/test_configurator.rb", "test/test_debug.rb", "test/test_handlers.rb", "test/test_http11.rb", "test/test_redirect_handler.rb", "test/test_request_progress.rb", "test/test_response.rb", "test/test_stats.rb", "test/test_uriclassifier.rb", "test/test_ws.rb"]
20
- s.executables = ["mongrel_rails"]
21
- s.extensions = ["ext/http11/extconf.rb"]
22
- s.add_dependency(%q<gem_plugin>, [">= 0.2.3"])
23
- end
24
-
25
-
26
- # # Original Rakefile source (requires the Echoe gem):
27
- #
28
- #
29
- # require 'rubygems'
30
- # gem 'echoe', '>=2.7.5'
31
- # require 'echoe'
32
- # FORCE_PURE = ENV['FORCE_PURE'] || false
33
- #
34
- # e = Echoe.new("mongrel") do |p|
35
- # p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
36
- # p.author ="Zed A. Shaw"
37
- # 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']
38
- # p.rdoc_pattern = ['README', 'LICENSE', 'CHANGELOG', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
39
- # p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
40
- # p.ruby_version = '>=1.8.4'
41
- # p.dependencies = ['gem_plugin >=0.2.3']
42
- # p.extension_pattern = nil
43
- #
44
- # p.need_tar_gz = false
45
- # p.need_tgz = true
46
- #
47
- # case RUBY_PLATFORM
48
- # when /mswin/
49
- # ]
50
- # when /java/
51
- # else
52
- # p.extension_pattern = ["ext/**/extconf.rb"]
53
- # end
54
- #
55
- # unless FORCE_PURE
56
- # p.eval = proc do
57
- # case RUBY_PLATFORM
58
- # when /mswin/
59
- # self.files += ['lib/http11.so']
60
- # self.platform = Gem::Platform::CURRENT
61
- # add_dependency('cgi_multipart_eof_fix', '>= 2.4')
62
- # when /java/
63
- # self.files += ['lib/http11.jar']
64
- # self.platform = 'jruby'
65
- # else
66
- # add_dependency('daemons', '>= 1.0.3')
67
- # add_dependency('fastthread', '>= 1.0.1')
68
- # add_dependency('cgi_multipart_eof_fix', '>= 2.4')
69
- # end
70
- # end
71
- # else
72
- # p.extension_pattern = ["ext/**/extconf.rb"]
73
- # end
74
- # end
75
- #
76
- # #### Ragel builder
77
- #
78
- # desc "Rebuild the Ragel sources"
79
- # task :ragel do
80
- # Dir.chdir "ext/http11" do
81
- # target = "http11_parser.c"
82
- # File.unlink target if File.exist? target
83
- # sh "ragel http11_parser.rl | rlgen-cd -G2 -o #{target}"
84
- # raise "Failed to build C source" unless File.exist? target
85
- # end
86
- # Dir.chdir "ext/http11" do
87
- # target = "../../ext/http11_java/org/jruby/mongrel/Http11Parser.java"
88
- # File.unlink target if File.exist? target
89
- # sh "ragel -J http11_parser.java.rl | rlgen-java -o #{target}"
90
- # raise "Failed to build Java source" unless File.exist? target
91
- # end
92
- # end
93
- #
94
- # #### Pre-compiled extensions for alternative platforms
95
- #
96
- # def move_extensions
97
- # Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
98
- # end
99
- #
100
- # def java_classpath_arg
101
- # # A myriad of ways to discover the JRuby classpath
102
- # classpath = begin
103
- # require 'java'
104
- # # Already running in a JRuby JVM
105
- # Java::java.lang.System.getProperty('java.class.path')
106
- # rescue LoadError
107
- # ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] && FileList["#{ENV['JRUBY_HOME']}/lib/*.jar"].join(File::PATH_SEPARATOR)
108
- # end
109
- # classpath ? "-cp #{classpath}" : ""
110
- # end
111
- #
112
- # case RUBY_PLATFORM
113
- # when /mswin/
114
- # filename = "lib/http11.so"
115
- # file filename do
116
- # Dir.chdir("ext/http11") do
117
- # ruby "extconf.rb"
118
- # system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
119
- # end
120
- # move_extensions
121
- # end
122
- # task :compile => [filename]
123
- #
124
- # when /java/
125
- #
126
- # # Avoid JRuby in-process launching problem
127
- # begin
128
- # require 'jruby'
129
- # JRuby.runtime.instance_config.run_ruby_in_process = false
130
- # rescue LoadError
131
- # end
132
- #
133
- # filename = "lib/http11.jar"
134
- # file filename do
135
- # build_dir = "ext/http11_java/classes"
136
- # mkdir_p build_dir
137
- # sources = FileList['ext/http11_java/**/*.java'].join(' ')
138
- # sh "javac -target 1.4 -source 1.4 -d #{build_dir} #{java_classpath_arg} #{sources}"
139
- # sh "jar cf lib/http11.jar -C #{build_dir} ."
140
- # move_extensions
141
- # end
142
- # task :compile => [filename]
143
- #
144
- # end
145
- #
146
- # #### Project-wide install and uninstall tasks
147
- #
148
- # def sub_project(project, *targets)
149
- # targets.each do |target|
150
- # Dir.chdir "projects/#{project}" do
151
- # unless RUBY_PLATFORM =~ /mswin/
152
- # sh("rake #{target.to_s}") # --trace
153
- # end
154
- # end
155
- # end
156
- # end
157
- #
158
- # desc "Package Mongrel and all subprojects"
159
- # task :package_all => [:package] do
160
- # sub_project("gem_plugin", :package)
161
- # sub_project("cgi_multipart_eof_fix", :package)
162
- # sub_project("fastthread", :package)
163
- # sub_project("mongrel_status", :package)
164
- # sub_project("mongrel_upload_progress", :package)
165
- # sub_project("mongrel_console", :package)
166
- # sub_project("mongrel_cluster", :package)
167
- #
168
- # sh("rake java package") unless RUBY_PLATFORM =~ /java/
169
- #
170
- # # XXX Broken by RubyGems 0.9.5
171
- # # sub_project("mongrel_service", :package) if RUBY_PLATFORM =~ /mswin/
172
- # # sh("rake mswin package") unless RUBY_PLATFORM =~ /mswin/
173
- # end
174
- #
175
- # task :install_requirements do
176
- # # These run before Mongrel is installed
177
- # sub_project("gem_plugin", :install)
178
- # sub_project("cgi_multipart_eof_fix", :install)
179
- # sub_project("fastthread", :install)
180
- # end
181
- #
182
- # desc "for Mongrel and all subprojects"
183
- # task :install => [:install_requirements] do
184
- # # These run after Mongrel is installed
185
- # sub_project("mongrel_status", :install)
186
- # sub_project("mongrel_upload_progress", :install)
187
- # sub_project("mongrel_console", :install)
188
- # sub_project("mongrel_cluster", :install)
189
- # sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
190
- # end
191
- #
192
- # desc "for Mongrel and all its subprojects"
193
- # task :uninstall => [:clean] do
194
- # sub_project("mongrel_status", :uninstall)
195
- # sub_project("cgi_multipart_eof_fix", :uninstall)
196
- # sub_project("mongrel_upload_progress", :uninstall)
197
- # sub_project("mongrel_console", :uninstall)
198
- # sub_project("gem_plugin", :uninstall)
199
- # sub_project("fastthread", :uninstall)
200
- # sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
201
- # end
202
- #
203
- # desc "for Mongrel and all its subprojects"
204
- # task :clean do
205
- # sub_project("gem_plugin", :clean)
206
- # sub_project("cgi_multipart_eof_fix", :clean)
207
- # sub_project("fastthread", :clean)
208
- # sub_project("mongrel_status", :clean)
209
- # sub_project("mongrel_upload_progress", :clean)
210
- # sub_project("mongrel_console", :clean)
211
- # sub_project("mongrel_cluster", :clean)
212
- # sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
213
- # end
214
- #
215
- # #### Site upload tasks
216
- #
217
- # namespace :site do
218
- #
219
- # desc "Package and upload .gem files and .tgz files for Mongrel and all subprojects to http://mongrel.rubyforge.org/releases/"
220
- # task :source => [:package_all] do
221
- # rm_rf "pkg/gems"
222
- # rm_rf "pkg/tars"
223
- # mkdir_p "pkg/gems"
224
- # mkdir_p "pkg/tars"
225
- #
226
- # FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
227
- # FileList["**/*.tgz"].each {|tgz| mv tgz, "pkg/tars" }
228
- #
229
- # sh "rm -rf pkg/mongrel*"
230
- # sh "gem generate_index -d pkg"
231
- # sh "scp -r CHANGELOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
232
- # sh "svn log -v > SVN_LOG"
233
- # sh "scp -r SVN_LOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
234
- # rm "SVN_LOG"
235
- # end
236
- #
237
- # desc "Upload the website"
238
- # task :web do
239
- # # Requires the 'webgem' gem
240
- # sh "cd site; webgen; webgen; curl 'http://feed43.com/mongrel.xml' > output/rss.xml; rsync -azv --no-perms --no-times output/* rubyforge.org:/var/www/gforge-projects/mongrel/"
241
- # puts "\nMake sure to re-run the site update 6 hours later if you updated the news. This delay is required for Feed43 to pick up the site changes."
242
- # end
243
- #
244
- # desc "Upload the rdocs"
245
- # task :rdoc => [:doc] do
246
- # sh "rsync -azv --no-perms --no-times doc/* rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/"
247
- # sh "cd projects/gem_plugin; rake site:rdoc"
248
- # end
249
- #
250
- # desc "Upload the coverage report"
251
- # task :coverage => [:rcov] do
252
- # sh "rsync -azv --no-perms --no-times test/coverage/* rubyforge.org:/var/www/gforge-projects/mongrel/coverage/" rescue nil
253
- # end
254
- #
255
- # desc "Upload the website, the rdocs, and the coverage report"
256
- # task :all => [:clean, :web, :rdoc, :coverage]
257
- #
258
- # end
1
+
2
+ # Gem::Specification for Mongrel-1.1
3
+ # Originally generated by Echoe
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = %q{mongrel}
7
+ s.version = "1.1"
8
+
9
+ s.specification_version = 2 if s.respond_to? :specification_version=
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.authors = ["Zed A. Shaw"]
13
+ s.date = %q{2007-11-01}
14
+ s.default_executable = %q{mongrel_rails}
15
+ s.description = %q{A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps.}
16
+ s.email = %q{}
17
+ s.executables = ["mongrel_rails"]
18
+ s.extensions = ["ext/http11/extconf.rb"]
19
+ s.has_rdoc = true
20
+ s.homepage = %q{}
21
+ s.require_paths = ["lib", "ext"]
22
+ s.required_ruby_version = Gem::Requirement.new(">= 1.8.4")
23
+ s.rubyforge_project = %q{mongrel}
24
+ s.rubygems_version = %q{0.9.4.6}
25
+ s.summary = %q{A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps.}
26
+ s.test_files = ["test/test_cgi_wrapper.rb", "test/test_command.rb", "test/test_conditional.rb", "test/test_configurator.rb", "test/test_debug.rb", "test/test_handlers.rb", "test/test_http11.rb", "test/test_redirect_handler.rb", "test/test_request_progress.rb", "test/test_response.rb", "test/test_stats.rb", "test/test_uriclassifier.rb", "test/test_ws.rb"]
27
+
28
+ s.add_dependency(%q<gem_plugin>, [">= 0.2.3"])
29
+ s.add_dependency(%q<cgi_multipart_eof_fix>, [">= 2.4"])
30
+ s.add_dependency(%q<daemons>, [">= 1.0.3"])
31
+ s.add_dependency(%q<fastthread>, [">= 1.0.1"])
32
+ end
33
+
34
+
35
+ # # Original Rakefile source (requires the Echoe gem):
36
+ #
37
+ #
38
+ # require 'rubygems'
39
+ # gem 'echoe', '>=2.7'
40
+ # require 'echoe'
41
+ #
42
+ # e = Echoe.new("mongrel") do |p|
43
+ # p.summary = "A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps."
44
+ # p.author ="Zed A. Shaw"
45
+ # 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']
46
+ # p.rdoc_pattern = ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
47
+ # p.ignore_pattern = /^(pkg|site|projects|doc|log)|CVS|\.log/
48
+ # p.ruby_version = '>= 1.8.4'
49
+ # p.dependencies = ['gem_plugin >=0.2.3', 'cgi_multipart_eof_fix >=2.4']
50
+ #
51
+ # p.need_tar_gz = false
52
+ # p.need_tgz = true
53
+ #
54
+ # # case RUBY_PLATFORM
55
+ # # when /mswin/
56
+ # # else
57
+ # # end
58
+ #
59
+ # p.eval = proc do
60
+ # case RUBY_PLATFORM
61
+ # when /mswin/
62
+ # extensions.clear
63
+ # self.files += ['lib/http11.so']
64
+ # self.platform = Gem::Platform::WIN32
65
+ # when /java/
66
+ # extensions.clear
67
+ # self.files += ['lib/http11.jar']
68
+ # self.platform = 'jruby'
69
+ # else
70
+ # add_dependency('daemons', '>= 1.0.3')
71
+ # add_dependency('fastthread', '>= 1.0.1')
72
+ # end
73
+ # end
74
+ #
75
+ # end
76
+ #
77
+ # #### Ragel builder
78
+ #
79
+ # desc "Rebuild the Ragel sources"
80
+ # task :ragel do
81
+ # Dir.chdir "ext/http11" do
82
+ # target = "http11_parser.c"
83
+ # File.unlink target if File.exist? target
84
+ # sh "ragel http11_parser.rl | rlgen-cd -G2 -o #{target}"
85
+ # raise "Failed to build C source" unless File.exist? target
86
+ # end
87
+ # Dir.chdir "ext/http11" do
88
+ # target = "../../ext/http11_java/org/jruby/mongrel/Http11Parser.java"
89
+ # File.unlink target if File.exist? target
90
+ # sh "ragel -J http11_parser.java.rl | rlgen-java -o #{target}"
91
+ # raise "Failed to build Java source" unless File.exist? target
92
+ # end
93
+ # end
94
+ #
95
+ # #### XXX Hack around JRuby test/unit interaction problems
96
+ #
97
+ # desc "Run each test suite in isolation on JRuby"
98
+ # task :test_java do
99
+ # e.test_pattern.each do |f|
100
+ # sh "/opt/local/jruby/bin/jruby -w -Ilib:ext:bin:test -e 'require \"#{f}\"'" rescue nil
101
+ # end
102
+ # end
103
+ #
104
+ # #### XXX Hack around RubyGems and Echoe for pre-compiled extensions.
105
+ #
106
+ # def move_extensions
107
+ # Dir["ext/**/*.#{Config::CONFIG['DLEXT']}"].each { |file| mv file, "lib/" }
108
+ # end
109
+ #
110
+ # def java_classpath_arg
111
+ # # A myriad of ways to discover the JRuby classpath
112
+ # classpath = begin
113
+ # require 'java'
114
+ # # Already running in a JRuby JVM
115
+ # Java::java.lang.System.getProperty('java.class.path')
116
+ # rescue LoadError
117
+ # ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] && FileList["#{ENV['JRUBY_HOME']}/lib/*.jar"].join(File::PATH_SEPARATOR)
118
+ # end
119
+ # classpath ? "-cp #{classpath}" : ""
120
+ # end
121
+ #
122
+ # case RUBY_PLATFORM
123
+ # when /mswin/
124
+ # filename = "lib/http11.so"
125
+ # file filename do
126
+ # Dir.chdir("ext/http11") do
127
+ # ruby "extconf.rb"
128
+ # system(PLATFORM =~ /mswin/ ? 'nmake' : 'make')
129
+ # end
130
+ # move_extensions
131
+ # end
132
+ # task :compile => [filename]
133
+ #
134
+ # when /java/
135
+ # filename = "lib/http11.jar"
136
+ # file filename do
137
+ # build_dir = "ext/http11_java/classes"
138
+ # mkdir_p build_dir
139
+ # sources = FileList['ext/http11_java/**/*.java'].join(' ')
140
+ # sh "javac -target 1.4 -source 1.4 -d #{build_dir} #{java_classpath_arg} #{sources}"
141
+ # sh "jar cf lib/http11.jar -C #{build_dir} ."
142
+ # move_extensions
143
+ # end
144
+ # task :compile => [filename]
145
+ #
146
+ # end
147
+ #
148
+ # #### Project-wide install and uninstall tasks
149
+ #
150
+ # def sub_project(project, *targets)
151
+ # targets.each do |target|
152
+ # Dir.chdir "projects/#{project}" do
153
+ # unless RUBY_PLATFORM =~ /mswin/
154
+ # sh %{rake --trace #{target.to_s} }
155
+ # end
156
+ # end
157
+ # end
158
+ # end
159
+ #
160
+ # desc "Package Mongrel and all subprojects"
161
+ # task :package_all => [:package] do
162
+ # sub_project("gem_plugin", :package)
163
+ # sub_project("cgi_multipart_eof_fix", :package)
164
+ # sub_project("fastthread", :package)
165
+ # sub_project("mongrel_status", :package)
166
+ # sub_project("mongrel_upload_progress", :package)
167
+ # sub_project("mongrel_console", :package)
168
+ # sub_project("mongrel_cluster", :package)
169
+ # sub_project("mongrel_experimental", :package)
170
+ # sub_project("mongrel_service", :package) if RUBY_PLATFORM =~ /mswin/
171
+ # sh("rake java package") unless RUBY_PLATFORM =~ /java/
172
+ # # sh("rake mswin package") unless RUBY_PLATFORM =~ /mswin/
173
+ # end
174
+ #
175
+ # task :install_requirements do
176
+ # # These run before Mongrel is installed
177
+ # sub_project("gem_plugin", :install)
178
+ # sub_project("cgi_multipart_eof_fix", :install)
179
+ # sub_project("fastthread", :install)
180
+ # end
181
+ #
182
+ # desc "for Mongrel and all subprojects"
183
+ # task :install => [:install_requirements] do
184
+ # # These run after Mongrel is installed
185
+ # sub_project("mongrel_status", :install)
186
+ # sub_project("mongrel_upload_progress", :install)
187
+ # sub_project("mongrel_console", :install)
188
+ # sub_project("mongrel_cluster", :install)
189
+ # sub_project("mongrel_experimental", :install)
190
+ # sub_project("mongrel_service", :install) if RUBY_PLATFORM =~ /mswin/
191
+ # end
192
+ #
193
+ # desc "for Mongrel and all its subprojects"
194
+ # task :uninstall => [:clean] do
195
+ # sub_project("mongrel_status", :uninstall)
196
+ # sub_project("cgi_multipart_eof_fix", :uninstall)
197
+ # sub_project("mongrel_upload_progress", :uninstall)
198
+ # sub_project("mongrel_console", :uninstall)
199
+ # sub_project("gem_plugin", :uninstall)
200
+ # sub_project("fastthread", :uninstall)
201
+ # sub_project("mongrel_experimental", :uninstall)
202
+ # sub_project("mongrel_service", :uninstall) if RUBY_PLATFORM =~ /mswin/
203
+ # end
204
+ #
205
+ # desc "for Mongrel and all its subprojects"
206
+ # task :clean do
207
+ # sub_project("gem_plugin", :clean)
208
+ # sub_project("cgi_multipart_eof_fix", :clean)
209
+ # sub_project("fastthread", :clean)
210
+ # sub_project("mongrel_status", :clean)
211
+ # sub_project("mongrel_upload_progress", :clean)
212
+ # sub_project("mongrel_console", :clean)
213
+ # sub_project("mongrel_cluster", :clean)
214
+ # sub_project("mongrel_experimental", :clean)
215
+ # sub_project("mongrel_service", :clean) if RUBY_PLATFORM =~ /mswin/
216
+ # end
217
+ #
218
+ # #### Site upload tasks
219
+ #
220
+ # namespace :site do
221
+ #
222
+ # desc "Package and upload .gem files and .tgz files for Mongrel and all subprojects to http://mongrel.rubyforge.org/releases/"
223
+ # task :source => [:package_all] do
224
+ # rm_rf "pkg/gems"
225
+ # rm_rf "pkg/tars"
226
+ # mkdir_p "pkg/gems"
227
+ # mkdir_p "pkg/tars"
228
+ #
229
+ # FileList["**/*.gem"].each { |gem| mv gem, "pkg/gems" }
230
+ # FileList["**/*.tgz"].each {|tgz| mv tgz, "pkg/tars" }
231
+ #
232
+ # # XXX Hack, because only Luis can package for Win32 right now
233
+ # sh "cp ~/Downloads/mongrel-#{e.version}-mswin32.gem pkg/gems/"
234
+ # sh "cp ~/Downloads/mongrel_service-0.3.3-mswin32.gem pkg/gems/"
235
+ # sh "rm -rf pkg/mongrel*"
236
+ # sh "gem generate_index -d pkg"
237
+ # sh "scp -r CHANGELOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
238
+ # sh "svn log -v > SVN_LOG"
239
+ # sh "scp -r SVN_LOG pkg/* rubyforge.org:/var/www/gforge-projects/mongrel/releases/"
240
+ # rm "SVN_LOG"
241
+ # end
242
+ #
243
+ # desc "Upload the website"
244
+ # task :web do
245
+ # # Requires the 'webgem' gem and the 'atom-tools' gem
246
+ # sh "cd site; webgen; webgen; ruby atom.rb > output/feed.atom; rsync -azv --no-perms --no-times output/* rubyforge.org:/var/www/gforge-projects/mongrel/"
247
+ # end
248
+ #
249
+ # desc "Upload the rdocs"
250
+ # task :rdoc => [:doc] do
251
+ # sh "rsync -azv --no-perms --no-times doc/* rubyforge.org:/var/www/gforge-projects/mongrel/rdoc/"
252
+ # sh "cd projects/gem_plugin; rake site:rdoc"
253
+ # end
254
+ #
255
+ # desc "Upload the coverage report"
256
+ # task :coverage => [:rcov] do
257
+ # sh "rsync -azv --no-perms --no-times test/coverage/* rubyforge.org:/var/www/gforge-projects/mongrel/coverage/" rescue nil
258
+ # end
259
+ #
260
+ # desc "Upload the website, the rdocs, and the coverage report"
261
+ # task :all => [:clean, :web, :rdoc, :coverage]
262
+ #
263
+ # end