rack 2.0.6 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/{HISTORY.md → CHANGELOG.md} +220 -155
  3. data/{COPYING → MIT-LICENSE} +4 -2
  4. data/README.rdoc +77 -117
  5. data/Rakefile +25 -18
  6. data/SPEC +3 -4
  7. data/bin/rackup +1 -0
  8. data/example/lobster.ru +2 -0
  9. data/example/protectedlobster.rb +3 -1
  10. data/example/protectedlobster.ru +2 -0
  11. data/lib/rack/auth/abstract/handler.rb +3 -1
  12. data/lib/rack/auth/abstract/request.rb +2 -0
  13. data/lib/rack/auth/basic.rb +4 -1
  14. data/lib/rack/auth/digest/md5.rb +9 -7
  15. data/lib/rack/auth/digest/nonce.rb +6 -3
  16. data/lib/rack/auth/digest/params.rb +4 -2
  17. data/lib/rack/auth/digest/request.rb +2 -0
  18. data/lib/rack/body_proxy.rb +3 -6
  19. data/lib/rack/builder.rb +38 -15
  20. data/lib/rack/cascade.rb +6 -5
  21. data/lib/rack/chunked.rb +29 -6
  22. data/lib/rack/common_logger.rb +9 -8
  23. data/lib/rack/conditional_get.rb +3 -1
  24. data/lib/rack/config.rb +2 -0
  25. data/lib/rack/content_length.rb +3 -1
  26. data/lib/rack/content_type.rb +3 -1
  27. data/lib/rack/core_ext/regexp.rb +14 -0
  28. data/lib/rack/deflater.rb +28 -17
  29. data/lib/rack/directory.rb +17 -14
  30. data/lib/rack/etag.rb +3 -1
  31. data/lib/rack/events.rb +5 -3
  32. data/lib/rack/file.rb +5 -173
  33. data/lib/rack/files.rb +178 -0
  34. data/lib/rack/handler/cgi.rb +3 -1
  35. data/lib/rack/handler/fastcgi.rb +4 -2
  36. data/lib/rack/handler/lsws.rb +3 -1
  37. data/lib/rack/handler/scgi.rb +9 -6
  38. data/lib/rack/handler/thin.rb +3 -1
  39. data/lib/rack/handler/webrick.rb +4 -2
  40. data/lib/rack/handler.rb +7 -2
  41. data/lib/rack/head.rb +2 -0
  42. data/lib/rack/lint.rb +14 -11
  43. data/lib/rack/lobster.rb +7 -5
  44. data/lib/rack/lock.rb +2 -0
  45. data/lib/rack/logger.rb +2 -0
  46. data/lib/rack/media_type.rb +10 -5
  47. data/lib/rack/method_override.rb +4 -2
  48. data/lib/rack/mime.rb +9 -1
  49. data/lib/rack/mock.rb +74 -15
  50. data/lib/rack/multipart/generator.rb +6 -7
  51. data/lib/rack/multipart/parser.rb +55 -52
  52. data/lib/rack/multipart/uploaded_file.rb +2 -0
  53. data/lib/rack/multipart.rb +5 -3
  54. data/lib/rack/null_logger.rb +2 -0
  55. data/lib/rack/query_parser.rb +51 -25
  56. data/lib/rack/recursive.rb +7 -5
  57. data/lib/rack/reloader.rb +10 -4
  58. data/lib/rack/request.rb +80 -27
  59. data/lib/rack/response.rb +71 -31
  60. data/lib/rack/rewindable_input.rb +4 -2
  61. data/lib/rack/runtime.rb +4 -2
  62. data/lib/rack/sendfile.rb +15 -8
  63. data/lib/rack/server.rb +88 -16
  64. data/lib/rack/session/abstract/id.rb +104 -21
  65. data/lib/rack/session/cookie.rb +21 -11
  66. data/lib/rack/session/memcache.rb +4 -87
  67. data/lib/rack/session/pool.rb +17 -8
  68. data/lib/rack/show_exceptions.rb +15 -9
  69. data/lib/rack/show_status.rb +4 -2
  70. data/lib/rack/static.rb +15 -10
  71. data/lib/rack/tempfile_reaper.rb +2 -0
  72. data/lib/rack/urlmap.rb +11 -2
  73. data/lib/rack/utils.rb +55 -70
  74. data/lib/rack.rb +63 -60
  75. data/rack.gemspec +17 -7
  76. metadata +30 -171
  77. data/test/builder/an_underscore_app.rb +0 -5
  78. data/test/builder/anything.rb +0 -5
  79. data/test/builder/comment.ru +0 -4
  80. data/test/builder/end.ru +0 -5
  81. data/test/builder/line.ru +0 -1
  82. data/test/builder/options.ru +0 -2
  83. data/test/cgi/assets/folder/test.js +0 -1
  84. data/test/cgi/assets/fonts/font.eot +0 -1
  85. data/test/cgi/assets/images/image.png +0 -1
  86. data/test/cgi/assets/index.html +0 -1
  87. data/test/cgi/assets/javascripts/app.js +0 -1
  88. data/test/cgi/assets/stylesheets/app.css +0 -1
  89. data/test/cgi/lighttpd.conf +0 -26
  90. data/test/cgi/rackup_stub.rb +0 -6
  91. data/test/cgi/sample_rackup.ru +0 -5
  92. data/test/cgi/test +0 -9
  93. data/test/cgi/test+directory/test+file +0 -1
  94. data/test/cgi/test.fcgi +0 -9
  95. data/test/cgi/test.gz +0 -0
  96. data/test/cgi/test.ru +0 -5
  97. data/test/gemloader.rb +0 -10
  98. data/test/helper.rb +0 -34
  99. data/test/multipart/bad_robots +0 -259
  100. data/test/multipart/binary +0 -0
  101. data/test/multipart/content_type_and_no_filename +0 -6
  102. data/test/multipart/empty +0 -10
  103. data/test/multipart/fail_16384_nofile +0 -814
  104. data/test/multipart/file1.txt +0 -1
  105. data/test/multipart/filename_and_modification_param +0 -7
  106. data/test/multipart/filename_and_no_name +0 -6
  107. data/test/multipart/filename_with_encoded_words +0 -7
  108. data/test/multipart/filename_with_escaped_quotes +0 -6
  109. data/test/multipart/filename_with_escaped_quotes_and_modification_param +0 -7
  110. data/test/multipart/filename_with_null_byte +0 -7
  111. data/test/multipart/filename_with_percent_escaped_quotes +0 -6
  112. data/test/multipart/filename_with_single_quote +0 -7
  113. data/test/multipart/filename_with_unescaped_percentages +0 -6
  114. data/test/multipart/filename_with_unescaped_percentages2 +0 -6
  115. data/test/multipart/filename_with_unescaped_percentages3 +0 -6
  116. data/test/multipart/filename_with_unescaped_quotes +0 -6
  117. data/test/multipart/ie +0 -6
  118. data/test/multipart/invalid_character +0 -6
  119. data/test/multipart/mixed_files +0 -21
  120. data/test/multipart/nested +0 -10
  121. data/test/multipart/none +0 -9
  122. data/test/multipart/quoted +0 -15
  123. data/test/multipart/rack-logo.png +0 -0
  124. data/test/multipart/semicolon +0 -6
  125. data/test/multipart/text +0 -15
  126. data/test/multipart/three_files_three_fields +0 -31
  127. data/test/multipart/unity3d_wwwform +0 -11
  128. data/test/multipart/webkit +0 -32
  129. data/test/rackup/config.ru +0 -31
  130. data/test/registering_handler/rack/handler/registering_myself.rb +0 -8
  131. data/test/spec_auth_basic.rb +0 -89
  132. data/test/spec_auth_digest.rb +0 -260
  133. data/test/spec_body_proxy.rb +0 -85
  134. data/test/spec_builder.rb +0 -233
  135. data/test/spec_cascade.rb +0 -63
  136. data/test/spec_cgi.rb +0 -84
  137. data/test/spec_chunked.rb +0 -103
  138. data/test/spec_common_logger.rb +0 -95
  139. data/test/spec_conditional_get.rb +0 -103
  140. data/test/spec_config.rb +0 -23
  141. data/test/spec_content_length.rb +0 -86
  142. data/test/spec_content_type.rb +0 -46
  143. data/test/spec_deflater.rb +0 -375
  144. data/test/spec_directory.rb +0 -148
  145. data/test/spec_etag.rb +0 -108
  146. data/test/spec_events.rb +0 -133
  147. data/test/spec_fastcgi.rb +0 -85
  148. data/test/spec_file.rb +0 -264
  149. data/test/spec_handler.rb +0 -57
  150. data/test/spec_head.rb +0 -46
  151. data/test/spec_lint.rb +0 -515
  152. data/test/spec_lobster.rb +0 -59
  153. data/test/spec_lock.rb +0 -204
  154. data/test/spec_logger.rb +0 -24
  155. data/test/spec_media_type.rb +0 -42
  156. data/test/spec_method_override.rb +0 -110
  157. data/test/spec_mime.rb +0 -51
  158. data/test/spec_mock.rb +0 -359
  159. data/test/spec_multipart.rb +0 -722
  160. data/test/spec_null_logger.rb +0 -21
  161. data/test/spec_recursive.rb +0 -75
  162. data/test/spec_request.rb +0 -1398
  163. data/test/spec_response.rb +0 -510
  164. data/test/spec_rewindable_input.rb +0 -128
  165. data/test/spec_runtime.rb +0 -50
  166. data/test/spec_sendfile.rb +0 -125
  167. data/test/spec_server.rb +0 -193
  168. data/test/spec_session_abstract_id.rb +0 -31
  169. data/test/spec_session_abstract_session_hash.rb +0 -45
  170. data/test/spec_session_cookie.rb +0 -442
  171. data/test/spec_session_memcache.rb +0 -320
  172. data/test/spec_session_pool.rb +0 -210
  173. data/test/spec_show_exceptions.rb +0 -93
  174. data/test/spec_show_status.rb +0 -104
  175. data/test/spec_static.rb +0 -184
  176. data/test/spec_tempfile_reaper.rb +0 -64
  177. data/test/spec_thin.rb +0 -96
  178. data/test/spec_urlmap.rb +0 -237
  179. data/test/spec_utils.rb +0 -742
  180. data/test/spec_version.rb +0 -11
  181. data/test/spec_webrick.rb +0 -206
  182. data/test/static/another/index.html +0 -1
  183. data/test/static/foo.html +0 -1
  184. data/test/static/index.html +0 -1
  185. data/test/testrequest.rb +0 -78
  186. data/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
  187. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
data/lib/rack.rb CHANGED
@@ -1,7 +1,9 @@
1
- # Copyright (C) 2007, 2008, 2009, 2010 Christian Neukirchen <purl.org/net/chneukirchen>
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (C) 2007-2019 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
2
4
  #
3
5
  # Rack is freely distributable under the terms of an MIT-style license.
4
- # See COPYING or http://www.opensource.org/licenses/mit-license.php.
6
+ # See MIT-LICENSE or https://opensource.org/licenses/MIT.
5
7
 
6
8
  # The Rack main module, serving as a namespace for all core Rack
7
9
  # modules and classes.
@@ -11,80 +13,80 @@
11
13
 
12
14
  module Rack
13
15
  # The Rack protocol version number implemented.
14
- VERSION = [1,3]
16
+ VERSION = [1, 3]
15
17
 
16
18
  # Return the Rack protocol version as a dotted string.
17
19
  def self.version
18
20
  VERSION.join(".")
19
21
  end
20
22
 
21
- RELEASE = "2.0.6"
23
+ RELEASE = "2.1.0"
22
24
 
23
25
  # Return the Rack release as a dotted string.
24
26
  def self.release
25
27
  RELEASE
26
28
  end
27
29
 
28
- HTTP_HOST = 'HTTP_HOST'.freeze
29
- HTTP_VERSION = 'HTTP_VERSION'.freeze
30
- HTTPS = 'HTTPS'.freeze
31
- PATH_INFO = 'PATH_INFO'.freeze
32
- REQUEST_METHOD = 'REQUEST_METHOD'.freeze
33
- REQUEST_PATH = 'REQUEST_PATH'.freeze
34
- SCRIPT_NAME = 'SCRIPT_NAME'.freeze
35
- QUERY_STRING = 'QUERY_STRING'.freeze
36
- SERVER_PROTOCOL = 'SERVER_PROTOCOL'.freeze
37
- SERVER_NAME = 'SERVER_NAME'.freeze
38
- SERVER_ADDR = 'SERVER_ADDR'.freeze
39
- SERVER_PORT = 'SERVER_PORT'.freeze
40
- CACHE_CONTROL = 'Cache-Control'.freeze
41
- CONTENT_LENGTH = 'Content-Length'.freeze
42
- CONTENT_TYPE = 'Content-Type'.freeze
43
- SET_COOKIE = 'Set-Cookie'.freeze
44
- TRANSFER_ENCODING = 'Transfer-Encoding'.freeze
45
- HTTP_COOKIE = 'HTTP_COOKIE'.freeze
46
- ETAG = 'ETag'.freeze
30
+ HTTP_HOST = 'HTTP_HOST'
31
+ HTTP_VERSION = 'HTTP_VERSION'
32
+ HTTPS = 'HTTPS'
33
+ PATH_INFO = 'PATH_INFO'
34
+ REQUEST_METHOD = 'REQUEST_METHOD'
35
+ REQUEST_PATH = 'REQUEST_PATH'
36
+ SCRIPT_NAME = 'SCRIPT_NAME'
37
+ QUERY_STRING = 'QUERY_STRING'
38
+ SERVER_PROTOCOL = 'SERVER_PROTOCOL'
39
+ SERVER_NAME = 'SERVER_NAME'
40
+ SERVER_ADDR = 'SERVER_ADDR'
41
+ SERVER_PORT = 'SERVER_PORT'
42
+ CACHE_CONTROL = 'Cache-Control'
43
+ CONTENT_LENGTH = 'Content-Length'
44
+ CONTENT_TYPE = 'Content-Type'
45
+ SET_COOKIE = 'Set-Cookie'
46
+ TRANSFER_ENCODING = 'Transfer-Encoding'
47
+ HTTP_COOKIE = 'HTTP_COOKIE'
48
+ ETAG = 'ETag'
47
49
 
48
50
  # HTTP method verbs
49
- GET = 'GET'.freeze
50
- POST = 'POST'.freeze
51
- PUT = 'PUT'.freeze
52
- PATCH = 'PATCH'.freeze
53
- DELETE = 'DELETE'.freeze
54
- HEAD = 'HEAD'.freeze
55
- OPTIONS = 'OPTIONS'.freeze
56
- LINK = 'LINK'.freeze
57
- UNLINK = 'UNLINK'.freeze
58
- TRACE = 'TRACE'.freeze
51
+ GET = 'GET'
52
+ POST = 'POST'
53
+ PUT = 'PUT'
54
+ PATCH = 'PATCH'
55
+ DELETE = 'DELETE'
56
+ HEAD = 'HEAD'
57
+ OPTIONS = 'OPTIONS'
58
+ LINK = 'LINK'
59
+ UNLINK = 'UNLINK'
60
+ TRACE = 'TRACE'
59
61
 
60
62
  # Rack environment variables
61
- RACK_VERSION = 'rack.version'.freeze
62
- RACK_TEMPFILES = 'rack.tempfiles'.freeze
63
- RACK_ERRORS = 'rack.errors'.freeze
64
- RACK_LOGGER = 'rack.logger'.freeze
65
- RACK_INPUT = 'rack.input'.freeze
66
- RACK_SESSION = 'rack.session'.freeze
67
- RACK_SESSION_OPTIONS = 'rack.session.options'.freeze
68
- RACK_SHOWSTATUS_DETAIL = 'rack.showstatus.detail'.freeze
69
- RACK_MULTITHREAD = 'rack.multithread'.freeze
70
- RACK_MULTIPROCESS = 'rack.multiprocess'.freeze
71
- RACK_RUNONCE = 'rack.run_once'.freeze
72
- RACK_URL_SCHEME = 'rack.url_scheme'.freeze
73
- RACK_HIJACK = 'rack.hijack'.freeze
74
- RACK_IS_HIJACK = 'rack.hijack?'.freeze
75
- RACK_HIJACK_IO = 'rack.hijack_io'.freeze
76
- RACK_RECURSIVE_INCLUDE = 'rack.recursive.include'.freeze
77
- RACK_MULTIPART_BUFFER_SIZE = 'rack.multipart.buffer_size'.freeze
78
- RACK_MULTIPART_TEMPFILE_FACTORY = 'rack.multipart.tempfile_factory'.freeze
79
- RACK_REQUEST_FORM_INPUT = 'rack.request.form_input'.freeze
80
- RACK_REQUEST_FORM_HASH = 'rack.request.form_hash'.freeze
81
- RACK_REQUEST_FORM_VARS = 'rack.request.form_vars'.freeze
82
- RACK_REQUEST_COOKIE_HASH = 'rack.request.cookie_hash'.freeze
83
- RACK_REQUEST_COOKIE_STRING = 'rack.request.cookie_string'.freeze
84
- RACK_REQUEST_QUERY_HASH = 'rack.request.query_hash'.freeze
85
- RACK_REQUEST_QUERY_STRING = 'rack.request.query_string'.freeze
86
- RACK_METHODOVERRIDE_ORIGINAL_METHOD = 'rack.methodoverride.original_method'.freeze
87
- RACK_SESSION_UNPACKED_COOKIE_DATA = 'rack.session.unpacked_cookie_data'.freeze
63
+ RACK_VERSION = 'rack.version'
64
+ RACK_TEMPFILES = 'rack.tempfiles'
65
+ RACK_ERRORS = 'rack.errors'
66
+ RACK_LOGGER = 'rack.logger'
67
+ RACK_INPUT = 'rack.input'
68
+ RACK_SESSION = 'rack.session'
69
+ RACK_SESSION_OPTIONS = 'rack.session.options'
70
+ RACK_SHOWSTATUS_DETAIL = 'rack.showstatus.detail'
71
+ RACK_MULTITHREAD = 'rack.multithread'
72
+ RACK_MULTIPROCESS = 'rack.multiprocess'
73
+ RACK_RUNONCE = 'rack.run_once'
74
+ RACK_URL_SCHEME = 'rack.url_scheme'
75
+ RACK_HIJACK = 'rack.hijack'
76
+ RACK_IS_HIJACK = 'rack.hijack?'
77
+ RACK_HIJACK_IO = 'rack.hijack_io'
78
+ RACK_RECURSIVE_INCLUDE = 'rack.recursive.include'
79
+ RACK_MULTIPART_BUFFER_SIZE = 'rack.multipart.buffer_size'
80
+ RACK_MULTIPART_TEMPFILE_FACTORY = 'rack.multipart.tempfile_factory'
81
+ RACK_REQUEST_FORM_INPUT = 'rack.request.form_input'
82
+ RACK_REQUEST_FORM_HASH = 'rack.request.form_hash'
83
+ RACK_REQUEST_FORM_VARS = 'rack.request.form_vars'
84
+ RACK_REQUEST_COOKIE_HASH = 'rack.request.cookie_hash'
85
+ RACK_REQUEST_COOKIE_STRING = 'rack.request.cookie_string'
86
+ RACK_REQUEST_QUERY_HASH = 'rack.request.query_hash'
87
+ RACK_REQUEST_QUERY_STRING = 'rack.request.query_string'
88
+ RACK_METHODOVERRIDE_ORIGINAL_METHOD = 'rack.methodoverride.original_method'
89
+ RACK_SESSION_UNPACKED_COOKIE_DATA = 'rack.session.unpacked_cookie_data'
88
90
 
89
91
  autoload :Builder, "rack/builder"
90
92
  autoload :BodyProxy, "rack/body_proxy"
@@ -97,6 +99,7 @@ module Rack
97
99
  autoload :ContentType, "rack/content_type"
98
100
  autoload :ETag, "rack/etag"
99
101
  autoload :File, "rack/file"
102
+ autoload :Files, "rack/files"
100
103
  autoload :Deflater, "rack/deflater"
101
104
  autoload :Directory, "rack/directory"
102
105
  autoload :ForwardRequest, "rack/recursive"
data/rack.gemspec CHANGED
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Gem::Specification.new do |s|
2
- s.name = "rack"
4
+ s.name = "rack"
3
5
  s.version = File.read('lib/rack.rb')[/RELEASE += +([\"\'])([\d][\w\.]+)\1/, 2]
4
6
  s.platform = Gem::Platform::RUBY
5
7
  s.summary = "a modular Ruby webserver interface"
@@ -15,20 +17,28 @@ middleware) into a single method call.
15
17
  Also see https://rack.github.io/.
16
18
  EOF
17
19
 
18
- s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*,test/**/*}'] +
19
- %w(COPYING rack.gemspec Rakefile README.rdoc SPEC)
20
+ s.files = Dir['{bin/*,contrib/*,example/*,lib/**/*}'] +
21
+ %w(MIT-LICENSE rack.gemspec Rakefile README.rdoc SPEC)
20
22
  s.bindir = 'bin'
21
- s.executables << 'rackup'
22
- s.require_path = 'lib'
23
- s.extra_rdoc_files = ['README.rdoc', 'HISTORY.md']
24
- s.test_files = Dir['test/spec_*.rb']
23
+ s.executables << 'rackup'
24
+ s.require_path = 'lib'
25
+ s.extra_rdoc_files = ['README.rdoc', 'CHANGELOG.md']
25
26
 
26
27
  s.author = 'Leah Neukirchen'
27
28
  s.email = 'leah@vuxu.org'
28
29
  s.homepage = 'https://rack.github.io/'
29
30
  s.required_ruby_version = '>= 2.2.2'
31
+ s.metadata = {
32
+ "bug_tracker_uri" => "https://github.com/rack/rack/issues",
33
+ "changelog_uri" => "https://github.com/rack/rack/blob/master/CHANGELOG.md",
34
+ "documentation_uri" => "https://rubydoc.info/github/rack/rack",
35
+ "homepage_uri" => "https://rack.github.io",
36
+ "mailing_list_uri" => "https://groups.google.com/forum/#!forum/rack-devel",
37
+ "source_code_uri" => "https://github.com/rack/rack"
38
+ }
30
39
 
31
40
  s.add_development_dependency 'minitest', "~> 5.0"
32
41
  s.add_development_dependency 'minitest-sprint'
42
+ s.add_development_dependency 'minitest-global_expectations'
33
43
  s.add_development_dependency 'rake'
34
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leah Neukirchen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2020-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest-global_expectations
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,10 +80,10 @@ executables:
66
80
  extensions: []
67
81
  extra_rdoc_files:
68
82
  - README.rdoc
69
- - HISTORY.md
83
+ - CHANGELOG.md
70
84
  files:
71
- - COPYING
72
- - HISTORY.md
85
+ - CHANGELOG.md
86
+ - MIT-LICENSE
73
87
  - README.rdoc
74
88
  - Rakefile
75
89
  - SPEC
@@ -98,11 +112,13 @@ files:
98
112
  - lib/rack/config.rb
99
113
  - lib/rack/content_length.rb
100
114
  - lib/rack/content_type.rb
115
+ - lib/rack/core_ext/regexp.rb
101
116
  - lib/rack/deflater.rb
102
117
  - lib/rack/directory.rb
103
118
  - lib/rack/etag.rb
104
119
  - lib/rack/events.rb
105
120
  - lib/rack/file.rb
121
+ - lib/rack/files.rb
106
122
  - lib/rack/handler.rb
107
123
  - lib/rack/handler/cgi.rb
108
124
  - lib/rack/handler/fastcgi.rb
@@ -144,121 +160,16 @@ files:
144
160
  - lib/rack/urlmap.rb
145
161
  - lib/rack/utils.rb
146
162
  - rack.gemspec
147
- - test/builder/an_underscore_app.rb
148
- - test/builder/anything.rb
149
- - test/builder/comment.ru
150
- - test/builder/end.ru
151
- - test/builder/line.ru
152
- - test/builder/options.ru
153
- - test/cgi/assets/folder/test.js
154
- - test/cgi/assets/fonts/font.eot
155
- - test/cgi/assets/images/image.png
156
- - test/cgi/assets/index.html
157
- - test/cgi/assets/javascripts/app.js
158
- - test/cgi/assets/stylesheets/app.css
159
- - test/cgi/lighttpd.conf
160
- - test/cgi/rackup_stub.rb
161
- - test/cgi/sample_rackup.ru
162
- - test/cgi/test
163
- - test/cgi/test+directory/test+file
164
- - test/cgi/test.fcgi
165
- - test/cgi/test.gz
166
- - test/cgi/test.ru
167
- - test/gemloader.rb
168
- - test/helper.rb
169
- - test/multipart/bad_robots
170
- - test/multipart/binary
171
- - test/multipart/content_type_and_no_filename
172
- - test/multipart/empty
173
- - test/multipart/fail_16384_nofile
174
- - test/multipart/file1.txt
175
- - test/multipart/filename_and_modification_param
176
- - test/multipart/filename_and_no_name
177
- - test/multipart/filename_with_encoded_words
178
- - test/multipart/filename_with_escaped_quotes
179
- - test/multipart/filename_with_escaped_quotes_and_modification_param
180
- - test/multipart/filename_with_null_byte
181
- - test/multipart/filename_with_percent_escaped_quotes
182
- - test/multipart/filename_with_single_quote
183
- - test/multipart/filename_with_unescaped_percentages
184
- - test/multipart/filename_with_unescaped_percentages2
185
- - test/multipart/filename_with_unescaped_percentages3
186
- - test/multipart/filename_with_unescaped_quotes
187
- - test/multipart/ie
188
- - test/multipart/invalid_character
189
- - test/multipart/mixed_files
190
- - test/multipart/nested
191
- - test/multipart/none
192
- - test/multipart/quoted
193
- - test/multipart/rack-logo.png
194
- - test/multipart/semicolon
195
- - test/multipart/text
196
- - test/multipart/three_files_three_fields
197
- - test/multipart/unity3d_wwwform
198
- - test/multipart/webkit
199
- - test/rackup/config.ru
200
- - test/registering_handler/rack/handler/registering_myself.rb
201
- - test/spec_auth_basic.rb
202
- - test/spec_auth_digest.rb
203
- - test/spec_body_proxy.rb
204
- - test/spec_builder.rb
205
- - test/spec_cascade.rb
206
- - test/spec_cgi.rb
207
- - test/spec_chunked.rb
208
- - test/spec_common_logger.rb
209
- - test/spec_conditional_get.rb
210
- - test/spec_config.rb
211
- - test/spec_content_length.rb
212
- - test/spec_content_type.rb
213
- - test/spec_deflater.rb
214
- - test/spec_directory.rb
215
- - test/spec_etag.rb
216
- - test/spec_events.rb
217
- - test/spec_fastcgi.rb
218
- - test/spec_file.rb
219
- - test/spec_handler.rb
220
- - test/spec_head.rb
221
- - test/spec_lint.rb
222
- - test/spec_lobster.rb
223
- - test/spec_lock.rb
224
- - test/spec_logger.rb
225
- - test/spec_media_type.rb
226
- - test/spec_method_override.rb
227
- - test/spec_mime.rb
228
- - test/spec_mock.rb
229
- - test/spec_multipart.rb
230
- - test/spec_null_logger.rb
231
- - test/spec_recursive.rb
232
- - test/spec_request.rb
233
- - test/spec_response.rb
234
- - test/spec_rewindable_input.rb
235
- - test/spec_runtime.rb
236
- - test/spec_sendfile.rb
237
- - test/spec_server.rb
238
- - test/spec_session_abstract_id.rb
239
- - test/spec_session_abstract_session_hash.rb
240
- - test/spec_session_cookie.rb
241
- - test/spec_session_memcache.rb
242
- - test/spec_session_pool.rb
243
- - test/spec_show_exceptions.rb
244
- - test/spec_show_status.rb
245
- - test/spec_static.rb
246
- - test/spec_tempfile_reaper.rb
247
- - test/spec_thin.rb
248
- - test/spec_urlmap.rb
249
- - test/spec_utils.rb
250
- - test/spec_version.rb
251
- - test/spec_webrick.rb
252
- - test/static/another/index.html
253
- - test/static/foo.html
254
- - test/static/index.html
255
- - test/testrequest.rb
256
- - test/unregistered_handler/rack/handler/unregistered.rb
257
- - test/unregistered_handler/rack/handler/unregistered_long_one.rb
258
163
  homepage: https://rack.github.io/
259
164
  licenses:
260
165
  - MIT
261
- metadata: {}
166
+ metadata:
167
+ bug_tracker_uri: https://github.com/rack/rack/issues
168
+ changelog_uri: https://github.com/rack/rack/blob/master/CHANGELOG.md
169
+ documentation_uri: https://rubydoc.info/github/rack/rack
170
+ homepage_uri: https://rack.github.io
171
+ mailing_list_uri: https://groups.google.com/forum/#!forum/rack-devel
172
+ source_code_uri: https://github.com/rack/rack
262
173
  post_install_message:
263
174
  rdoc_options: []
264
175
  require_paths:
@@ -274,60 +185,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
274
185
  - !ruby/object:Gem::Version
275
186
  version: '0'
276
187
  requirements: []
277
- rubyforge_project:
278
- rubygems_version: 2.7.6
188
+ rubygems_version: 3.1.1
279
189
  signing_key:
280
190
  specification_version: 4
281
191
  summary: a modular Ruby webserver interface
282
- test_files:
283
- - test/spec_multipart.rb
284
- - test/spec_deflater.rb
285
- - test/spec_static.rb
286
- - test/spec_session_cookie.rb
287
- - test/spec_session_pool.rb
288
- - test/spec_etag.rb
289
- - test/spec_version.rb
290
- - test/spec_handler.rb
291
- - test/spec_thin.rb
292
- - test/spec_session_abstract_id.rb
293
- - test/spec_mime.rb
294
- - test/spec_recursive.rb
295
- - test/spec_null_logger.rb
296
- - test/spec_media_type.rb
297
- - test/spec_cgi.rb
298
- - test/spec_method_override.rb
299
- - test/spec_content_type.rb
300
- - test/spec_session_abstract_session_hash.rb
301
- - test/spec_request.rb
302
- - test/spec_chunked.rb
303
- - test/spec_show_exceptions.rb
304
- - test/spec_runtime.rb
305
- - test/spec_fastcgi.rb
306
- - test/spec_common_logger.rb
307
- - test/spec_builder.rb
308
- - test/spec_config.rb
309
- - test/spec_utils.rb
310
- - test/spec_sendfile.rb
311
- - test/spec_lobster.rb
312
- - test/spec_lint.rb
313
- - test/spec_conditional_get.rb
314
- - test/spec_tempfile_reaper.rb
315
- - test/spec_mock.rb
316
- - test/spec_server.rb
317
- - test/spec_directory.rb
318
- - test/spec_webrick.rb
319
- - test/spec_response.rb
320
- - test/spec_file.rb
321
- - test/spec_show_status.rb
322
- - test/spec_body_proxy.rb
323
- - test/spec_logger.rb
324
- - test/spec_auth_digest.rb
325
- - test/spec_urlmap.rb
326
- - test/spec_events.rb
327
- - test/spec_cascade.rb
328
- - test/spec_auth_basic.rb
329
- - test/spec_head.rb
330
- - test/spec_lock.rb
331
- - test/spec_rewindable_input.rb
332
- - test/spec_session_memcache.rb
333
- - test/spec_content_length.rb
192
+ test_files: []
@@ -1,5 +0,0 @@
1
- class AnUnderscoreApp
2
- def self.call(env)
3
- [200, {'Content-Type' => 'text/plain'}, ['OK']]
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class Anything
2
- def self.call(env)
3
- [200, {'Content-Type' => 'text/plain'}, ['OK']]
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- =begin
2
-
3
- =end
4
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
data/test/builder/end.ru DELETED
@@ -1,5 +0,0 @@
1
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
2
- __END__
3
- Should not be evaluated
4
- Neither should
5
- This
data/test/builder/line.ru DELETED
@@ -1 +0,0 @@
1
- run lambda{ |env| [200, {'Content-Type' => 'text/plain'}, [__LINE__.to_s]] }
@@ -1,2 +0,0 @@
1
- #\ -d -p 2929 --env test
2
- run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1 +0,0 @@
1
- ### TestFile ###
@@ -1,26 +0,0 @@
1
- server.modules = ("mod_fastcgi", "mod_cgi")
2
- server.document-root = "."
3
- server.errorlog = var.CWD + "/lighttpd.errors"
4
- server.port = 9203
5
- server.bind = "127.0.0.1"
6
-
7
- server.event-handler = "select"
8
-
9
- cgi.assign = ("/test" => "",
10
- # ".ru" => ""
11
- )
12
-
13
- fastcgi.server = (
14
- "test.fcgi" => ("localhost" =>
15
- ("min-procs" => 1,
16
- "socket" => "/tmp/rack-test-fcgi",
17
- "bin-path" => "test.fcgi")),
18
- "test.ru" => ("localhost" =>
19
- ("min-procs" => 1,
20
- "socket" => "/tmp/rack-test-ru-fcgi",
21
- "bin-path" => CWD + "/rackup_stub.rb test.ru")),
22
- "sample_rackup.ru" => ("localhost" =>
23
- ("min-procs" => 1,
24
- "socket" => "/tmp/rack-test-rackup-fcgi",
25
- "bin-path" => CWD + "/rackup_stub.rb sample_rackup.ru")),
26
- )
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- $:.unshift '../../lib'
5
- require 'rack'
6
- Rack::Server.start
@@ -1,5 +0,0 @@
1
- # -*- ruby -*-
2
-
3
- require '../testrequest'
4
-
5
- run Rack::Lint.new(TestRequest.new)
data/test/cgi/test DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- $: << File.join(File.dirname(__FILE__), "..", "..", "lib")
5
-
6
- require 'rack'
7
- require '../testrequest'
8
-
9
- Rack::Handler::CGI.run(Rack::Lint.new(TestRequest.new))
@@ -1 +0,0 @@
1
- this file has plusses!
data/test/cgi/test.fcgi DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # -*- ruby -*-
3
-
4
- require 'uri'
5
- $:.unshift '../../lib'
6
- require 'rack'
7
- require '../testrequest'
8
-
9
- Rack::Handler::FastCGI.run(Rack::Lint.new(TestRequest.new))
data/test/cgi/test.gz DELETED
Binary file
data/test/cgi/test.ru DELETED
@@ -1,5 +0,0 @@
1
- #!../../bin/rackup
2
- # -*- ruby -*-
3
-
4
- require '../testrequest'
5
- run Rack::Lint.new(TestRequest.new)
data/test/gemloader.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- project = 'rack'
3
- gemspec = File.expand_path("#{project}.gemspec", Dir.pwd)
4
- Gem::Specification.load(gemspec).dependencies.each do |dep|
5
- begin
6
- gem dep.name, *dep.requirement.as_list
7
- rescue Gem::LoadError
8
- warn "Cannot load #{dep.name} #{dep.requirement.to_s}"
9
- end
10
- end
data/test/helper.rb DELETED
@@ -1,34 +0,0 @@
1
- require 'minitest/autorun'
2
-
3
- module Rack
4
- class TestCase < Minitest::Test
5
- # Check for Lighttpd and launch it for tests if available.
6
- `which lighttpd`
7
-
8
- if $?.success?
9
- begin
10
- # Keep this first.
11
- LIGHTTPD_PID = fork {
12
- ENV['RACK_ENV'] = 'deployment'
13
- ENV['RUBYLIB'] = [
14
- ::File.expand_path('../../lib', __FILE__),
15
- ENV['RUBYLIB'],
16
- ].compact.join(':')
17
-
18
- Dir.chdir(::File.expand_path("../cgi", __FILE__)) do
19
- exec "lighttpd -D -f lighttpd.conf"
20
- end
21
- }
22
- rescue NotImplementedError
23
- warn "Your Ruby doesn't support Kernel#fork. Skipping Rack::Handler::CGI and ::FastCGI tests."
24
- else
25
- Minitest.after_run do
26
- Process.kill 15, LIGHTTPD_PID
27
- Process.wait LIGHTTPD_PID
28
- end
29
- end
30
- else
31
- warn "Lighttpd isn't installed. Skipping Rack::Handler::CGI and FastCGI tests. Install lighttpd to run them."
32
- end
33
- end
34
- end