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.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +1 -2
- data/LICENSE +2 -2
- data/Manifest +11 -10
- data/README +27 -39
- data/TODO +5 -0
- data/bin/mongrel_rails +1 -1
- data/ext/http11/http11.c +1 -195
- data/ext/http11_java/Http11Service.java +13 -0
- data/ext/http11_java/org/jruby/mongrel/Http11.java +266 -0
- data/ext/http11_java/org/jruby/mongrel/Http11Parser.java +572 -0
- data/lib/mongrel.rb +75 -545
- data/lib/mongrel/command.rb +3 -2
- data/lib/mongrel/configurator.rb +1 -1
- data/lib/mongrel/const.rb +110 -0
- data/lib/mongrel/gems.rb +23 -0
- data/lib/mongrel/handlers.rb +3 -7
- data/lib/mongrel/header_out.rb +28 -0
- data/lib/mongrel/http_request.rb +155 -0
- data/lib/mongrel/http_response.rb +163 -0
- data/lib/mongrel/init.rb +3 -6
- data/lib/mongrel/uri_classifier.rb +76 -0
- data/mongrel.gemspec +263 -258
- data/test/test_configurator.rb +1 -0
- data/test/test_redirect_handler.rb +3 -1
- data/test/test_request_progress.rb +3 -1
- data/test/test_uriclassifier.rb +1 -1
- data/test/test_ws.rb +11 -6
- data/test/testhelp.rb +1 -0
- metadata +67 -34
- metadata.gz.sig +1 -1
- data/ext/http11/MANIFEST +0 -0
- data/ext/http11/tst.h +0 -40
- data/ext/http11/tst_cleanup.c +0 -23
- data/ext/http11/tst_delete.c +0 -146
- data/ext/http11/tst_grow_node_free_list.c +0 -38
- data/ext/http11/tst_init.c +0 -41
- data/ext/http11/tst_insert.c +0 -218
- data/ext/http11/tst_search.c +0 -73
- data/lib/mutex_fix.rb +0 -34
- data/test/jruby_socket.rb +0 -39
data/lib/mongrel/init.rb
CHANGED
@@ -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 '
|
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
|
data/mongrel.gemspec
CHANGED
@@ -1,258 +1,263 @@
|
|
1
|
-
|
2
|
-
# Gem::Specification for Mongrel-1.
|
3
|
-
# Originally generated by Echoe
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = %q{mongrel}
|
7
|
-
s.version = "1.
|
8
|
-
|
9
|
-
s.
|
10
|
-
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
s.
|
17
|
-
s.
|
18
|
-
s.
|
19
|
-
s.
|
20
|
-
s.
|
21
|
-
s.
|
22
|
-
s.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
# p.
|
45
|
-
# p.
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
#
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
# end
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
#
|
93
|
-
#
|
94
|
-
#
|
95
|
-
#
|
96
|
-
#
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
# end
|
132
|
-
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
148
|
-
#
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
#
|
160
|
-
#
|
161
|
-
#
|
162
|
-
# sub_project("
|
163
|
-
# sub_project("
|
164
|
-
# sub_project("
|
165
|
-
# sub_project("
|
166
|
-
# sub_project("
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
#
|
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("
|
190
|
-
#
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
# sub_project("
|
196
|
-
# sub_project("
|
197
|
-
# sub_project("
|
198
|
-
# sub_project("
|
199
|
-
# sub_project("
|
200
|
-
# sub_project("
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
207
|
-
# sub_project("
|
208
|
-
# sub_project("
|
209
|
-
# sub_project("
|
210
|
-
# sub_project("
|
211
|
-
# sub_project("
|
212
|
-
# sub_project("
|
213
|
-
#
|
214
|
-
#
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
#
|
230
|
-
#
|
231
|
-
#
|
232
|
-
#
|
233
|
-
# sh "
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
241
|
-
#
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
# sh "rsync -azv --no-perms --no-times
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
# sh "
|
253
|
-
# end
|
254
|
-
#
|
255
|
-
# desc "Upload the
|
256
|
-
# task :
|
257
|
-
#
|
258
|
-
#
|
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
|