sinatra 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sinatra might be problematic. Click here for more details.
- data/CHANGELOG +1 -0
- data/LICENSE +22 -0
- data/Manifest +78 -1
- data/lib/sinatra.rb +12 -1
- data/sinatra.gemspec +7 -14
- data/vendor/rack/AUTHORS +7 -0
- data/vendor/rack/COPYING +18 -0
- data/vendor/rack/KNOWN-ISSUES +18 -0
- data/vendor/rack/README +242 -0
- data/vendor/rack/Rakefile +174 -0
- data/vendor/rack/bin/rackup +153 -0
- data/vendor/rack/contrib/rack_logo.svg +111 -0
- data/vendor/rack/example/lobster.ru +4 -0
- data/vendor/rack/example/protectedlobster.rb +14 -0
- data/vendor/rack/example/protectedlobster.ru +8 -0
- data/vendor/rack/lib/rack.rb +92 -0
- data/vendor/rack/lib/rack/adapter/camping.rb +22 -0
- data/vendor/rack/lib/rack/auth/abstract/handler.rb +28 -0
- data/vendor/rack/lib/rack/auth/abstract/request.rb +37 -0
- data/vendor/rack/lib/rack/auth/basic.rb +58 -0
- data/vendor/rack/lib/rack/auth/digest/md5.rb +124 -0
- data/vendor/rack/lib/rack/auth/digest/nonce.rb +51 -0
- data/vendor/rack/lib/rack/auth/digest/params.rb +55 -0
- data/vendor/rack/lib/rack/auth/digest/request.rb +40 -0
- data/vendor/rack/lib/rack/auth/openid.rb +116 -0
- data/vendor/rack/lib/rack/builder.rb +56 -0
- data/vendor/rack/lib/rack/cascade.rb +36 -0
- data/vendor/rack/lib/rack/commonlogger.rb +56 -0
- data/vendor/rack/lib/rack/file.rb +112 -0
- data/vendor/rack/lib/rack/handler/cgi.rb +57 -0
- data/vendor/rack/lib/rack/handler/fastcgi.rb +83 -0
- data/vendor/rack/lib/rack/handler/lsws.rb +52 -0
- data/vendor/rack/lib/rack/handler/mongrel.rb +78 -0
- data/vendor/rack/lib/rack/handler/scgi.rb +57 -0
- data/vendor/rack/lib/rack/handler/webrick.rb +57 -0
- data/vendor/rack/lib/rack/lint.rb +394 -0
- data/vendor/rack/lib/rack/lobster.rb +65 -0
- data/vendor/rack/lib/rack/mock.rb +160 -0
- data/vendor/rack/lib/rack/recursive.rb +57 -0
- data/vendor/rack/lib/rack/reloader.rb +64 -0
- data/vendor/rack/lib/rack/request.rb +197 -0
- data/vendor/rack/lib/rack/response.rb +166 -0
- data/vendor/rack/lib/rack/session/abstract/id.rb +126 -0
- data/vendor/rack/lib/rack/session/cookie.rb +71 -0
- data/vendor/rack/lib/rack/session/memcache.rb +83 -0
- data/vendor/rack/lib/rack/session/pool.rb +67 -0
- data/vendor/rack/lib/rack/showexceptions.rb +344 -0
- data/vendor/rack/lib/rack/showstatus.rb +103 -0
- data/vendor/rack/lib/rack/static.rb +38 -0
- data/vendor/rack/lib/rack/urlmap.rb +48 -0
- data/vendor/rack/lib/rack/utils.rb +240 -0
- data/vendor/rack/test/cgi/lighttpd.conf +20 -0
- data/vendor/rack/test/cgi/test +9 -0
- data/vendor/rack/test/cgi/test.fcgi +7 -0
- data/vendor/rack/test/cgi/test.ru +7 -0
- data/vendor/rack/test/spec_rack_auth_basic.rb +69 -0
- data/vendor/rack/test/spec_rack_auth_digest.rb +169 -0
- data/vendor/rack/test/spec_rack_builder.rb +50 -0
- data/vendor/rack/test/spec_rack_camping.rb +47 -0
- data/vendor/rack/test/spec_rack_cascade.rb +50 -0
- data/vendor/rack/test/spec_rack_cgi.rb +91 -0
- data/vendor/rack/test/spec_rack_commonlogger.rb +32 -0
- data/vendor/rack/test/spec_rack_fastcgi.rb +91 -0
- data/vendor/rack/test/spec_rack_file.rb +40 -0
- data/vendor/rack/test/spec_rack_lint.rb +317 -0
- data/vendor/rack/test/spec_rack_lobster.rb +45 -0
- data/vendor/rack/test/spec_rack_mock.rb +152 -0
- data/vendor/rack/test/spec_rack_mongrel.rb +165 -0
- data/vendor/rack/test/spec_rack_recursive.rb +77 -0
- data/vendor/rack/test/spec_rack_request.rb +384 -0
- data/vendor/rack/test/spec_rack_response.rb +167 -0
- data/vendor/rack/test/spec_rack_session_cookie.rb +49 -0
- data/vendor/rack/test/spec_rack_session_memcache.rb +100 -0
- data/vendor/rack/test/spec_rack_session_pool.rb +84 -0
- data/vendor/rack/test/spec_rack_showexceptions.rb +21 -0
- data/vendor/rack/test/spec_rack_showstatus.rb +71 -0
- data/vendor/rack/test/spec_rack_static.rb +37 -0
- data/vendor/rack/test/spec_rack_urlmap.rb +175 -0
- data/vendor/rack/test/spec_rack_utils.rb +57 -0
- data/vendor/rack/test/spec_rack_webrick.rb +106 -0
- data/vendor/rack/test/testrequest.rb +43 -0
- metadata +81 -4
- data/Rakefile +0 -24
data/CHANGELOG
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2007 Blake Mizerany
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest
CHANGED
@@ -6,6 +6,8 @@ lib/sinatra/test/methods.rb
|
|
6
6
|
lib/sinatra/test/spec.rb
|
7
7
|
lib/sinatra/test/unit.rb
|
8
8
|
lib/sinatra.rb
|
9
|
+
LICENSE
|
10
|
+
Manifest
|
9
11
|
README.rdoc
|
10
12
|
test/app_test.rb
|
11
13
|
test/application_test.rb
|
@@ -42,4 +44,79 @@ test/views/layout_test/layout.haml
|
|
42
44
|
test/views/layout_test/layout.sass
|
43
45
|
test/views/no_layout/no_layout.builder
|
44
46
|
test/views/no_layout/no_layout.haml
|
45
|
-
|
47
|
+
vendor/rack/AUTHORS
|
48
|
+
vendor/rack/bin/rackup
|
49
|
+
vendor/rack/contrib/rack_logo.svg
|
50
|
+
vendor/rack/COPYING
|
51
|
+
vendor/rack/example/lobster.ru
|
52
|
+
vendor/rack/example/protectedlobster.rb
|
53
|
+
vendor/rack/example/protectedlobster.ru
|
54
|
+
vendor/rack/KNOWN-ISSUES
|
55
|
+
vendor/rack/lib/rack/adapter/camping.rb
|
56
|
+
vendor/rack/lib/rack/auth/abstract/handler.rb
|
57
|
+
vendor/rack/lib/rack/auth/abstract/request.rb
|
58
|
+
vendor/rack/lib/rack/auth/basic.rb
|
59
|
+
vendor/rack/lib/rack/auth/digest/md5.rb
|
60
|
+
vendor/rack/lib/rack/auth/digest/nonce.rb
|
61
|
+
vendor/rack/lib/rack/auth/digest/params.rb
|
62
|
+
vendor/rack/lib/rack/auth/digest/request.rb
|
63
|
+
vendor/rack/lib/rack/auth/openid.rb
|
64
|
+
vendor/rack/lib/rack/builder.rb
|
65
|
+
vendor/rack/lib/rack/cascade.rb
|
66
|
+
vendor/rack/lib/rack/commonlogger.rb
|
67
|
+
vendor/rack/lib/rack/file.rb
|
68
|
+
vendor/rack/lib/rack/handler/cgi.rb
|
69
|
+
vendor/rack/lib/rack/handler/fastcgi.rb
|
70
|
+
vendor/rack/lib/rack/handler/lsws.rb
|
71
|
+
vendor/rack/lib/rack/handler/mongrel.rb
|
72
|
+
vendor/rack/lib/rack/handler/scgi.rb
|
73
|
+
vendor/rack/lib/rack/handler/webrick.rb
|
74
|
+
vendor/rack/lib/rack/lint.rb
|
75
|
+
vendor/rack/lib/rack/lobster.rb
|
76
|
+
vendor/rack/lib/rack/mock.rb
|
77
|
+
vendor/rack/lib/rack/recursive.rb
|
78
|
+
vendor/rack/lib/rack/reloader.rb
|
79
|
+
vendor/rack/lib/rack/request.rb
|
80
|
+
vendor/rack/lib/rack/response.rb
|
81
|
+
vendor/rack/lib/rack/session/abstract/id.rb
|
82
|
+
vendor/rack/lib/rack/session/cookie.rb
|
83
|
+
vendor/rack/lib/rack/session/memcache.rb
|
84
|
+
vendor/rack/lib/rack/session/pool.rb
|
85
|
+
vendor/rack/lib/rack/showexceptions.rb
|
86
|
+
vendor/rack/lib/rack/showstatus.rb
|
87
|
+
vendor/rack/lib/rack/static.rb
|
88
|
+
vendor/rack/lib/rack/urlmap.rb
|
89
|
+
vendor/rack/lib/rack/utils.rb
|
90
|
+
vendor/rack/lib/rack.rb
|
91
|
+
vendor/rack/Rakefile
|
92
|
+
vendor/rack/README
|
93
|
+
vendor/rack/test/cgi/lighttpd.conf
|
94
|
+
vendor/rack/test/cgi/test
|
95
|
+
vendor/rack/test/cgi/test.fcgi
|
96
|
+
vendor/rack/test/cgi/test.ru
|
97
|
+
vendor/rack/test/spec_rack_auth_basic.rb
|
98
|
+
vendor/rack/test/spec_rack_auth_digest.rb
|
99
|
+
vendor/rack/test/spec_rack_builder.rb
|
100
|
+
vendor/rack/test/spec_rack_camping.rb
|
101
|
+
vendor/rack/test/spec_rack_cascade.rb
|
102
|
+
vendor/rack/test/spec_rack_cgi.rb
|
103
|
+
vendor/rack/test/spec_rack_commonlogger.rb
|
104
|
+
vendor/rack/test/spec_rack_fastcgi.rb
|
105
|
+
vendor/rack/test/spec_rack_file.rb
|
106
|
+
vendor/rack/test/spec_rack_lint.rb
|
107
|
+
vendor/rack/test/spec_rack_lobster.rb
|
108
|
+
vendor/rack/test/spec_rack_mock.rb
|
109
|
+
vendor/rack/test/spec_rack_mongrel.rb
|
110
|
+
vendor/rack/test/spec_rack_recursive.rb
|
111
|
+
vendor/rack/test/spec_rack_request.rb
|
112
|
+
vendor/rack/test/spec_rack_response.rb
|
113
|
+
vendor/rack/test/spec_rack_session_cookie.rb
|
114
|
+
vendor/rack/test/spec_rack_session_memcache.rb
|
115
|
+
vendor/rack/test/spec_rack_session_pool.rb
|
116
|
+
vendor/rack/test/spec_rack_showexceptions.rb
|
117
|
+
vendor/rack/test/spec_rack_showstatus.rb
|
118
|
+
vendor/rack/test/spec_rack_static.rb
|
119
|
+
vendor/rack/test/spec_rack_urlmap.rb
|
120
|
+
vendor/rack/test/spec_rack_utils.rb
|
121
|
+
vendor/rack/test/spec_rack_webrick.rb
|
122
|
+
vendor/rack/test/testrequest.rb
|
data/lib/sinatra.rb
CHANGED
@@ -82,7 +82,7 @@ module Sinatra
|
|
82
82
|
module Version
|
83
83
|
MAJOR = '0'
|
84
84
|
MINOR = '2'
|
85
|
-
REVISION = '
|
85
|
+
REVISION = '2'
|
86
86
|
def self.combined
|
87
87
|
[MAJOR, MINOR, REVISION].join('.')
|
88
88
|
end
|
@@ -1039,6 +1039,17 @@ module Kernel
|
|
1039
1039
|
|
1040
1040
|
end
|
1041
1041
|
|
1042
|
+
class NilClass
|
1043
|
+
|
1044
|
+
# Returns nil. Necessary for mappings where
|
1045
|
+
# params are optional, such as: '/:blah?'
|
1046
|
+
# nil.from_param # => nil
|
1047
|
+
def from_param
|
1048
|
+
nil
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
end
|
1052
|
+
|
1042
1053
|
class String
|
1043
1054
|
|
1044
1055
|
# Converts +self+ to an escaped URI parameter value
|
data/sinatra.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Sinatra-0.2.
|
2
|
+
# Gem::Specification for Sinatra-0.2.2
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = %q{sinatra}
|
7
|
-
s.version = "0.2.
|
7
|
+
s.version = "0.2.2"
|
8
8
|
|
9
9
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
10
10
|
|
@@ -13,11 +13,11 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.date = %q{2008-04-15}
|
14
14
|
s.description = %q{Classy web-development dressed in a DSL}
|
15
15
|
s.email = %q{}
|
16
|
-
s.extra_rdoc_files = ["CHANGELOG", "lib/sinatra/test/methods.rb", "lib/sinatra/test/spec.rb", "lib/sinatra/test/unit.rb", "lib/sinatra.rb", "README.rdoc"]
|
17
|
-
s.files = ["CHANGELOG", "images/404.png", "images/500.png", "index.html", "lib/sinatra/test/methods.rb", "lib/sinatra/test/spec.rb", "lib/sinatra/test/unit.rb", "lib/sinatra.rb", "README.rdoc", "test/app_test.rb", "test/application_test.rb", "test/builder_test.rb", "test/custom_error_test.rb", "test/diddy_test.rb", "test/erb_test.rb", "test/event_context_test.rb", "test/events_test.rb", "test/haml_test.rb", "test/helper.rb", "test/mapped_error_test.rb", "test/public/foo.xml", "test/rest_test.rb", "test/sass_test.rb", "test/sessions_test.rb", "test/streaming_test.rb", "test/sym_params_test.rb", "test/template_test.rb", "test/use_in_file_templates_test.rb", "test/views/foo.builder", "test/views/foo.erb", "test/views/foo.haml", "test/views/foo.sass", "test/views/foo_layout.erb", "test/views/foo_layout.haml", "test/views/layout_test/foo.builder", "test/views/layout_test/foo.erb", "test/views/layout_test/foo.haml", "test/views/layout_test/foo.sass", "test/views/layout_test/layout.builder", "test/views/layout_test/layout.erb", "test/views/layout_test/layout.haml", "test/views/layout_test/layout.sass", "test/views/no_layout/no_layout.builder", "test/views/no_layout/no_layout.haml", "
|
16
|
+
s.extra_rdoc_files = ["CHANGELOG", "lib/sinatra/test/methods.rb", "lib/sinatra/test/spec.rb", "lib/sinatra/test/unit.rb", "lib/sinatra.rb", "LICENSE", "README.rdoc"]
|
17
|
+
s.files = ["CHANGELOG", "images/404.png", "images/500.png", "index.html", "lib/sinatra/test/methods.rb", "lib/sinatra/test/spec.rb", "lib/sinatra/test/unit.rb", "lib/sinatra.rb", "LICENSE", "Manifest", "README.rdoc", "test/app_test.rb", "test/application_test.rb", "test/builder_test.rb", "test/custom_error_test.rb", "test/diddy_test.rb", "test/erb_test.rb", "test/event_context_test.rb", "test/events_test.rb", "test/haml_test.rb", "test/helper.rb", "test/mapped_error_test.rb", "test/public/foo.xml", "test/rest_test.rb", "test/sass_test.rb", "test/sessions_test.rb", "test/streaming_test.rb", "test/sym_params_test.rb", "test/template_test.rb", "test/use_in_file_templates_test.rb", "test/views/foo.builder", "test/views/foo.erb", "test/views/foo.haml", "test/views/foo.sass", "test/views/foo_layout.erb", "test/views/foo_layout.haml", "test/views/layout_test/foo.builder", "test/views/layout_test/foo.erb", "test/views/layout_test/foo.haml", "test/views/layout_test/foo.sass", "test/views/layout_test/layout.builder", "test/views/layout_test/layout.erb", "test/views/layout_test/layout.haml", "test/views/layout_test/layout.sass", "test/views/no_layout/no_layout.builder", "test/views/no_layout/no_layout.haml", "vendor/rack/AUTHORS", "vendor/rack/bin/rackup", "vendor/rack/contrib/rack_logo.svg", "vendor/rack/COPYING", "vendor/rack/example/lobster.ru", "vendor/rack/example/protectedlobster.rb", "vendor/rack/example/protectedlobster.ru", "vendor/rack/KNOWN-ISSUES", "vendor/rack/lib/rack/adapter/camping.rb", "vendor/rack/lib/rack/auth/abstract/handler.rb", "vendor/rack/lib/rack/auth/abstract/request.rb", "vendor/rack/lib/rack/auth/basic.rb", "vendor/rack/lib/rack/auth/digest/md5.rb", "vendor/rack/lib/rack/auth/digest/nonce.rb", "vendor/rack/lib/rack/auth/digest/params.rb", "vendor/rack/lib/rack/auth/digest/request.rb", "vendor/rack/lib/rack/auth/openid.rb", "vendor/rack/lib/rack/builder.rb", "vendor/rack/lib/rack/cascade.rb", "vendor/rack/lib/rack/commonlogger.rb", "vendor/rack/lib/rack/file.rb", "vendor/rack/lib/rack/handler/cgi.rb", "vendor/rack/lib/rack/handler/fastcgi.rb", "vendor/rack/lib/rack/handler/lsws.rb", "vendor/rack/lib/rack/handler/mongrel.rb", "vendor/rack/lib/rack/handler/scgi.rb", "vendor/rack/lib/rack/handler/webrick.rb", "vendor/rack/lib/rack/lint.rb", "vendor/rack/lib/rack/lobster.rb", "vendor/rack/lib/rack/mock.rb", "vendor/rack/lib/rack/recursive.rb", "vendor/rack/lib/rack/reloader.rb", "vendor/rack/lib/rack/request.rb", "vendor/rack/lib/rack/response.rb", "vendor/rack/lib/rack/session/abstract/id.rb", "vendor/rack/lib/rack/session/cookie.rb", "vendor/rack/lib/rack/session/memcache.rb", "vendor/rack/lib/rack/session/pool.rb", "vendor/rack/lib/rack/showexceptions.rb", "vendor/rack/lib/rack/showstatus.rb", "vendor/rack/lib/rack/static.rb", "vendor/rack/lib/rack/urlmap.rb", "vendor/rack/lib/rack/utils.rb", "vendor/rack/lib/rack.rb", "vendor/rack/Rakefile", "vendor/rack/README", "vendor/rack/test/cgi/lighttpd.conf", "vendor/rack/test/cgi/test", "vendor/rack/test/cgi/test.fcgi", "vendor/rack/test/cgi/test.ru", "vendor/rack/test/spec_rack_auth_basic.rb", "vendor/rack/test/spec_rack_auth_digest.rb", "vendor/rack/test/spec_rack_builder.rb", "vendor/rack/test/spec_rack_camping.rb", "vendor/rack/test/spec_rack_cascade.rb", "vendor/rack/test/spec_rack_cgi.rb", "vendor/rack/test/spec_rack_commonlogger.rb", "vendor/rack/test/spec_rack_fastcgi.rb", "vendor/rack/test/spec_rack_file.rb", "vendor/rack/test/spec_rack_lint.rb", "vendor/rack/test/spec_rack_lobster.rb", "vendor/rack/test/spec_rack_mock.rb", "vendor/rack/test/spec_rack_mongrel.rb", "vendor/rack/test/spec_rack_recursive.rb", "vendor/rack/test/spec_rack_request.rb", "vendor/rack/test/spec_rack_response.rb", "vendor/rack/test/spec_rack_session_cookie.rb", "vendor/rack/test/spec_rack_session_memcache.rb", "vendor/rack/test/spec_rack_session_pool.rb", "vendor/rack/test/spec_rack_showexceptions.rb", "vendor/rack/test/spec_rack_showstatus.rb", "vendor/rack/test/spec_rack_static.rb", "vendor/rack/test/spec_rack_urlmap.rb", "vendor/rack/test/spec_rack_utils.rb", "vendor/rack/test/spec_rack_webrick.rb", "vendor/rack/test/testrequest.rb", "sinatra.gemspec"]
|
18
18
|
s.has_rdoc = true
|
19
19
|
s.homepage = %q{http://www.sinatrarb.com}
|
20
|
-
s.post_install_message = %q{*** Be sure to checkout
|
20
|
+
s.post_install_message = %q{*** Be sure to checkout http://sinatrarb.com for helpful tips!***}
|
21
21
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Sinatra", "--main", "README.rdoc"]
|
22
22
|
s.require_paths = ["lib"]
|
23
23
|
s.rubyforge_project = %q{sinatra}
|
@@ -38,20 +38,13 @@ end
|
|
38
38
|
#
|
39
39
|
# task :default => :test
|
40
40
|
#
|
41
|
-
# Rake::RDocTask.new do |rd|
|
42
|
-
# rd.main = "README.rdoc"
|
43
|
-
# rd.rdoc_files += ["README.rdoc"]
|
44
|
-
# rd.rdoc_files += Dir.glob("lib/**/*.rb")
|
45
|
-
# rd.rdoc_dir = 'doc'
|
46
|
-
# end
|
47
|
-
#
|
48
41
|
# Echoe.new("sinatra") do |p|
|
42
|
+
# p.files = Dir[File.dirname(__FILE__) + "/{lib,vendor}/**/*"]
|
49
43
|
# p.author = "Blake Mizerany"
|
50
44
|
# p.summary = "Classy web-development dressed in a DSL"
|
51
45
|
# p.url = "http://www.sinatrarb.com"
|
52
46
|
# p.docs_host = "sinatrarb.com:/var/www/blakemizerany.com/public/docs/"
|
53
47
|
# p.dependencies = ["mongrel >=1.0.1"]
|
54
|
-
# p.install_message = "*** Be sure to checkout
|
55
|
-
# p.include_rakefile = true
|
48
|
+
# p.install_message = "*** Be sure to checkout http://sinatrarb.com for helpful tips!***"
|
56
49
|
# end
|
57
50
|
#
|
data/vendor/rack/AUTHORS
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
* Christian Neukirchen <chneukirchen@gmail.com>
|
2
|
+
* HTTP authentication: Tim Fletcher <twoggle@gmail.com>
|
3
|
+
* Cookie sessions, Static handler: Luc Heinrich <luc@honk-honk.com>
|
4
|
+
* Pool sessions, OpenID authentication: blink <blinketje@gmail.com>
|
5
|
+
* LiteSpeed handler: Adrian Madrid
|
6
|
+
* SCGI handler: Jeremy Evans
|
7
|
+
* Official Logo: Armin Ronacher
|
data/vendor/rack/COPYING
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
Copyright (c) 2007 Christian Neukirchen <purl.org/net/chneukirchen>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to
|
5
|
+
deal in the Software without restriction, including without limitation the
|
6
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
7
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
16
|
+
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= Known issues with Rack and Web servers
|
2
|
+
|
3
|
+
* Lighttpd sets wrong SCRIPT_NAME and PATH_INFO if you mount your
|
4
|
+
FastCGI app at "/". This can be fixed by using this middleware:
|
5
|
+
|
6
|
+
class LighttpdScriptNameFix
|
7
|
+
def initialize(app)
|
8
|
+
@app = app
|
9
|
+
end
|
10
|
+
|
11
|
+
def call(env)
|
12
|
+
env["PATH_INFO"] = env["SCRIPT_NAME"].to_s + env["PATH_INFO"].to_s
|
13
|
+
env["SCRIPT_NAME"] = ""
|
14
|
+
@app.call(env)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Of course, use this only when your app runs at "/".
|
data/vendor/rack/README
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
= Rack, a modular Ruby webserver interface
|
2
|
+
|
3
|
+
Rack provides a minimal, modular and adaptable interface for developing
|
4
|
+
web applications in Ruby. By wrapping HTTP requests and responses in
|
5
|
+
the simplest way possible, it unifies and distills the API for web
|
6
|
+
servers, web frameworks, and software in between (the so-called
|
7
|
+
middleware) into a single method call.
|
8
|
+
|
9
|
+
The exact details of this are described in the Rack specification,
|
10
|
+
which all Rack applications should conform to.
|
11
|
+
|
12
|
+
== Supported web servers
|
13
|
+
|
14
|
+
The included *handlers* connect all kinds of web servers to Rack:
|
15
|
+
* Mongrel
|
16
|
+
* Mongrel/Swiftcore (require it before requiring rack)
|
17
|
+
* WEBrick
|
18
|
+
* FCGI
|
19
|
+
* CGI
|
20
|
+
* SCGI
|
21
|
+
* LiteSpeed
|
22
|
+
|
23
|
+
These web servers include Rack handlers in their distributions:
|
24
|
+
* Ebb
|
25
|
+
* Fuzed
|
26
|
+
* Thin
|
27
|
+
|
28
|
+
Any valid Rack app will run the same on all these handlers, without
|
29
|
+
changing anything.
|
30
|
+
|
31
|
+
== Supported web frameworks
|
32
|
+
|
33
|
+
The included *adapters* connect Rack with existing Ruby web frameworks:
|
34
|
+
* Camping
|
35
|
+
|
36
|
+
These frameworks include Rack adapters in their distributions:
|
37
|
+
* Coset
|
38
|
+
* Halcyon
|
39
|
+
* Maveric
|
40
|
+
* Merb
|
41
|
+
* Racktools::SimpleApplication
|
42
|
+
* Ramaze
|
43
|
+
* Sinatra
|
44
|
+
* Vintage
|
45
|
+
|
46
|
+
Ruby on Rails can be run with the adapter included with Thin, which
|
47
|
+
will be merged into a later Rack version.
|
48
|
+
|
49
|
+
Current links to these projects can be found at
|
50
|
+
http://ramaze.net/#other-frameworks
|
51
|
+
|
52
|
+
== Available middleware
|
53
|
+
|
54
|
+
Between the server and the framework, Rack can be customized to your
|
55
|
+
applications needs using middleware, for example:
|
56
|
+
* Rack::URLMap, to route to multiple applications inside the same process.
|
57
|
+
* Rack::CommonLogger, for creating Apache-style logfiles.
|
58
|
+
* Rack::ShowException, for catching unhandled exceptions and
|
59
|
+
presenting them in a nice and helpful way with clickable backtrace.
|
60
|
+
* Rack::File, for serving static files.
|
61
|
+
* ...many others!
|
62
|
+
|
63
|
+
All these components use the same interface, which is described in
|
64
|
+
detail in the Rack specification. You can choose to use them exactly
|
65
|
+
in the way you want.
|
66
|
+
|
67
|
+
== Convenience
|
68
|
+
|
69
|
+
If you want to develop outside of existing frameworks, implement your
|
70
|
+
own ones, or develop middleware, Rack provides many helpers to create
|
71
|
+
Rack applications quickly and without doing the same web stuff all
|
72
|
+
over:
|
73
|
+
* Rack::Request, which also provides query string parsing and
|
74
|
+
multipart handling.
|
75
|
+
* Rack::Response, for convenient generation of HTTP replies and
|
76
|
+
cookie handling.
|
77
|
+
* Rack::MockRequest and Rack::MockResponse for efficient and quick
|
78
|
+
testing of Rack application without real HTTP round-trips.
|
79
|
+
|
80
|
+
== rackup
|
81
|
+
|
82
|
+
rackup is a useful tool for running Rack applications, which uses the
|
83
|
+
Rack::Builder DSL to configure middleware and build up applications
|
84
|
+
easily.
|
85
|
+
|
86
|
+
rackup automatically figures out the environment it is run in, and
|
87
|
+
runs your application as FastCGI, CGI, or standalone with Mongrel or
|
88
|
+
WEBrick---all from the same configuration.
|
89
|
+
|
90
|
+
== Quick start
|
91
|
+
|
92
|
+
Try the lobster!
|
93
|
+
|
94
|
+
Either with the embedded WEBrick starter:
|
95
|
+
|
96
|
+
ruby -Ilib lib/rack/lobster.rb
|
97
|
+
|
98
|
+
Or with rackup:
|
99
|
+
|
100
|
+
bin/rackup -Ilib example/lobster.ru
|
101
|
+
|
102
|
+
By default, the lobster is found at http://localhost:9292.
|
103
|
+
|
104
|
+
== Installing with RubyGems
|
105
|
+
|
106
|
+
A Gem of Rack is available. You can install it with:
|
107
|
+
|
108
|
+
gem install rack
|
109
|
+
|
110
|
+
I also provide a local mirror of the gems (and development snapshots)
|
111
|
+
at my site:
|
112
|
+
|
113
|
+
gem install rack --source http://chneukirchen.org/releases/gems
|
114
|
+
|
115
|
+
== Running the tests
|
116
|
+
|
117
|
+
Testing Rack requires the test/spec testing framework:
|
118
|
+
|
119
|
+
gem install test-spec
|
120
|
+
|
121
|
+
The full set of tests also test FCGI access with lighttpd so you will
|
122
|
+
need lighttpd installed as well as the FCGI libraries and the fcgi gem
|
123
|
+
installed:
|
124
|
+
|
125
|
+
Download and install lighttpd:
|
126
|
+
|
127
|
+
http://www.lighttpd.net/download
|
128
|
+
|
129
|
+
Installing the FCGI libraries:
|
130
|
+
|
131
|
+
curl -O http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
|
132
|
+
tar xzvf fcgi-2.4.0.tar.gz
|
133
|
+
cd fcgi-2.4.0
|
134
|
+
./configure --prefix=/usr/local
|
135
|
+
make
|
136
|
+
sudo make install
|
137
|
+
cd ..
|
138
|
+
|
139
|
+
Installing the Ruby fcgi gem:
|
140
|
+
|
141
|
+
gem install fcgi
|
142
|
+
|
143
|
+
There are two rake-based test tasks:
|
144
|
+
|
145
|
+
rake test tests all the fast tests (no Handlers or Adapters)
|
146
|
+
rake fulltest runs all the tests
|
147
|
+
|
148
|
+
== History
|
149
|
+
|
150
|
+
* March 3rd, 2007: First public release 0.1.
|
151
|
+
|
152
|
+
* May 16th, 2007: Second public release 0.2.
|
153
|
+
* HTTP Basic authentication.
|
154
|
+
* Cookie Sessions.
|
155
|
+
* Static file handler.
|
156
|
+
* Improved Rack::Request.
|
157
|
+
* Improved Rack::Response.
|
158
|
+
* Added Rack::ShowStatus, for better default error messages.
|
159
|
+
* Bug fixes in the Camping adapter.
|
160
|
+
* Removed Rails adapter, was too alpha.
|
161
|
+
|
162
|
+
* February 26th, 2008: Third public release 0.3.
|
163
|
+
* LiteSpeed handler, by Adrian Madrid.
|
164
|
+
* SCGI handler, by Jeremy Evans.
|
165
|
+
* Pool sessions, by blink.
|
166
|
+
* OpenID authentication, by blink.
|
167
|
+
* :Port and :File options for opening FastCGI sockets, by blink.
|
168
|
+
* Last-Modified HTTP header for Rack::File, by blink.
|
169
|
+
* Rack::Builder#use now accepts blocks, by Corey Jewett.
|
170
|
+
(See example/protectedlobster.ru)
|
171
|
+
* HTTP status 201 can contain a Content-Type and a body now.
|
172
|
+
* Many bugfixes, especially related to Cookie handling.
|
173
|
+
|
174
|
+
* XXX, 2008: Fourth public release 0.4.
|
175
|
+
* New Memcache sessions, by blink.
|
176
|
+
* Rack::Reloader is not loaded in rackup development mode.
|
177
|
+
* Many bugfixes, especially for pool sessions and URLMap.
|
178
|
+
|
179
|
+
== Contact
|
180
|
+
|
181
|
+
Please mail bugs, suggestions and patches to
|
182
|
+
<mailto:chneukirchen@gmail.com>.
|
183
|
+
|
184
|
+
Darcs repository ("darcs send" is welcome for patches):
|
185
|
+
http://chneukirchen.org/repos/rack
|
186
|
+
|
187
|
+
You are also welcome to join the #rack channel on irc.freenode.net.
|
188
|
+
|
189
|
+
== Thanks to
|
190
|
+
|
191
|
+
* blink for the Pool sessions, OpenID support, many tweaks, patches
|
192
|
+
and bugreports.
|
193
|
+
* Michael Fellinger, for the helpful discussion, bugfixes and a better
|
194
|
+
Rack::Request interface.
|
195
|
+
* Adrian Madrid, for the LiteSpeed handler.
|
196
|
+
* Christoffer Sawicki, for the Rails adapter.
|
197
|
+
* Tim Fletcher, for the HTTP authentication code.
|
198
|
+
* Luc Heinrich for the Cookie sessions, the static file handler and bugfixes.
|
199
|
+
* Armin Ronacher, for the logo and racktools.
|
200
|
+
* Aredridel, for bug fixing.
|
201
|
+
* Stephen Bannasch, for bug reports and documentation.
|
202
|
+
* Gary Wright, for proposing a better Rack::Response interface.
|
203
|
+
* Jonathan Buch, for improvements regarding Rack::Response.
|
204
|
+
* Armin Röhrl, for tracking down bugs in the Cookie generator.
|
205
|
+
* Alexander Kellett for testing the Gem and reviewing the announce.
|
206
|
+
* Marcus Rückert, for help with configuring and debugging lighttpd.
|
207
|
+
* The WSGI team for the well-done and documented work they've done and
|
208
|
+
Rack builds up on.
|
209
|
+
|
210
|
+
== Copyright
|
211
|
+
|
212
|
+
Copyright (C) 2007, 2008 Christian Neukirchen <http://purl.org/net/chneukirchen>
|
213
|
+
|
214
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
215
|
+
of this software and associated documentation files (the "Software"), to
|
216
|
+
deal in the Software without restriction, including without limitation the
|
217
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
218
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
219
|
+
furnished to do so, subject to the following conditions:
|
220
|
+
|
221
|
+
The above copyright notice and this permission notice shall be included in
|
222
|
+
all copies or substantial portions of the Software.
|
223
|
+
|
224
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
225
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
226
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
227
|
+
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
228
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
229
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
230
|
+
|
231
|
+
== Links
|
232
|
+
|
233
|
+
Rack:: <http://rack.rubyforge.org/>
|
234
|
+
Rack's Rubyforge project:: <http://rubyforge.org/projects/rack>
|
235
|
+
|
236
|
+
Camping:: <http://camping.rubyforge.org/>
|
237
|
+
Ramaze:: <http://ramaze.rubyforge.org/>
|
238
|
+
Maveric:: <http://maveric.rubyforge.org/>
|
239
|
+
racktools:: <http://lucumr.pocoo.org/trac/repos/racktools/>
|
240
|
+
|
241
|
+
Christian Neukirchen:: <http://chneukirchen.org/>
|
242
|
+
|