rack 1.3.10 → 1.4.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 (83) hide show
  1. data/COPYING +1 -1
  2. data/KNOWN-ISSUES +0 -9
  3. data/README.rdoc +4 -118
  4. data/Rakefile +15 -0
  5. data/SPEC +3 -5
  6. data/lib/rack.rb +0 -12
  7. data/lib/rack/auth/abstract/request.rb +1 -5
  8. data/lib/rack/auth/basic.rb +1 -1
  9. data/lib/rack/auth/digest/nonce.rb +1 -1
  10. data/lib/rack/backports/uri/common_18.rb +28 -14
  11. data/lib/rack/backports/uri/common_192.rb +17 -14
  12. data/lib/rack/body_proxy.rb +0 -10
  13. data/lib/rack/builder.rb +26 -18
  14. data/lib/rack/cascade.rb +1 -12
  15. data/lib/rack/chunked.rb +2 -0
  16. data/lib/rack/content_type.rb +7 -1
  17. data/lib/rack/deflater.rb +1 -5
  18. data/lib/rack/directory.rb +5 -1
  19. data/lib/rack/file.rb +26 -9
  20. data/lib/rack/handler.rb +2 -2
  21. data/lib/rack/head.rb +0 -1
  22. data/lib/rack/lint.rb +3 -5
  23. data/lib/rack/methodoverride.rb +10 -4
  24. data/lib/rack/mime.rb +606 -171
  25. data/lib/rack/mock.rb +2 -1
  26. data/lib/rack/multipart.rb +2 -2
  27. data/lib/rack/multipart/parser.rb +3 -10
  28. data/lib/rack/reloader.rb +1 -1
  29. data/lib/rack/request.rb +45 -13
  30. data/lib/rack/response.rb +15 -14
  31. data/lib/rack/sendfile.rb +8 -6
  32. data/lib/rack/server.rb +4 -30
  33. data/lib/rack/session/abstract/id.rb +25 -6
  34. data/lib/rack/session/cookie.rb +12 -16
  35. data/lib/rack/static.rb +21 -8
  36. data/lib/rack/urlmap.rb +28 -13
  37. data/lib/rack/utils.rb +22 -28
  38. data/rack.gemspec +5 -5
  39. data/test/builder/end.ru +2 -0
  40. data/test/cgi/lighttpd.conf +1 -0
  41. data/test/cgi/sample_rackup.ru +1 -1
  42. data/test/cgi/test+directory/test+file +1 -0
  43. data/test/cgi/test.ru +1 -1
  44. data/test/gemloader.rb +6 -2
  45. data/test/spec_auth_basic.rb +4 -9
  46. data/test/spec_auth_digest.rb +3 -16
  47. data/test/spec_body_proxy.rb +0 -4
  48. data/test/spec_builder.rb +63 -20
  49. data/test/spec_cascade.rb +10 -13
  50. data/test/spec_cgi.rb +1 -1
  51. data/test/spec_chunked.rb +39 -12
  52. data/test/spec_commonlogger.rb +4 -3
  53. data/test/spec_conditionalget.rb +16 -12
  54. data/test/spec_content_length.rb +1 -1
  55. data/test/spec_content_type.rb +6 -0
  56. data/test/spec_deflater.rb +2 -2
  57. data/test/spec_directory.rb +12 -0
  58. data/test/spec_fastcgi.rb +1 -1
  59. data/test/spec_file.rb +58 -8
  60. data/test/spec_head.rb +6 -18
  61. data/test/spec_lint.rb +2 -2
  62. data/test/spec_methodoverride.rb +15 -0
  63. data/test/spec_mock.rb +6 -2
  64. data/test/spec_mongrel.rb +8 -8
  65. data/test/spec_multipart.rb +10 -63
  66. data/test/spec_request.rb +94 -21
  67. data/test/spec_response.rb +22 -24
  68. data/test/spec_sendfile.rb +3 -0
  69. data/test/spec_server.rb +2 -49
  70. data/test/spec_session_cookie.rb +58 -22
  71. data/test/spec_session_memcache.rb +31 -1
  72. data/test/spec_session_pool.rb +10 -4
  73. data/test/spec_static.rb +8 -0
  74. data/test/spec_thin.rb +2 -2
  75. data/test/spec_utils.rb +38 -35
  76. data/test/spec_webrick.rb +5 -3
  77. data/test/static/index.html +1 -0
  78. metadata +13 -18
  79. data/contrib/rack.png +0 -0
  80. data/contrib/rack.svg +0 -150
  81. data/lib/rack/backports/uri/common_193.rb +0 -29
  82. data/test/builder/line.ru +0 -1
  83. data/test/spec_auth.rb +0 -57
@@ -6,7 +6,7 @@ Thread.abort_on_exception = true
6
6
  describe Rack::Handler::WEBrick do
7
7
  extend TestRequest::Helpers
8
8
 
9
- @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0',
9
+ @server = WEBrick::HTTPServer.new(:Host => @host='127.0.0.1',
10
10
  :Port => @port=9202,
11
11
  :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
12
12
  :AccessLog => [])
@@ -28,7 +28,7 @@ describe Rack::Handler::WEBrick do
28
28
  response["HTTP_VERSION"].should.equal "HTTP/1.1"
29
29
  response["SERVER_PROTOCOL"].should.equal "HTTP/1.1"
30
30
  response["SERVER_PORT"].should.equal "9202"
31
- response["SERVER_NAME"].should.equal "0.0.0.0"
31
+ response["SERVER_NAME"].should.equal "127.0.0.1"
32
32
  end
33
33
 
34
34
  should "have rack headers" do
@@ -106,7 +106,9 @@ describe Rack::Handler::WEBrick do
106
106
  block_ran = false
107
107
  catch(:done) {
108
108
  Rack::Handler::WEBrick.run(lambda {},
109
- {:Port => 9210,
109
+ {
110
+ :Host => '127.0.0.1',
111
+ :Port => 9210,
110
112
  :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN),
111
113
  :AccessLog => []}) { |server|
112
114
  block_ran = true
@@ -0,0 +1 @@
1
+ index!
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 3
9
- - 10
10
- version: 1.3.10
8
+ - 4
9
+ - 0
10
+ version: 1.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christian Neukirchen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-08 00:00:00 Z
18
+ date: 2011-12-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bacon
@@ -46,7 +46,7 @@ dependencies:
46
46
  type: :development
47
47
  version_requirements: *id002
48
48
  - !ruby/object:Gem::Dependency
49
- name: fcgi
49
+ name: ruby-fcgi
50
50
  prerelease: false
51
51
  requirement: &id003 !ruby/object:Gem::Requirement
52
52
  none: false
@@ -81,7 +81,7 @@ dependencies:
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- hash: -747770836
84
+ hash: 1923831981
85
85
  segments:
86
86
  - 1
87
87
  - 2
@@ -106,13 +106,13 @@ dependencies:
106
106
  type: :development
107
107
  version_requirements: *id006
108
108
  description: |
109
- Rack provides minimal, modular and adaptable interface for developing
109
+ Rack provides a minimal, modular and adaptable interface for developing
110
110
  web applications in Ruby. By wrapping HTTP requests and responses in
111
111
  the simplest way possible, it unifies and distills the API for web
112
112
  servers, web frameworks, and software in between (the so-called
113
113
  middleware) into a single method call.
114
114
 
115
- Also see http://rack.github.com/.
115
+ Also see http://rack.rubyforge.org.
116
116
 
117
117
  email: chneukirchen@gmail.com
118
118
  executables:
@@ -124,8 +124,6 @@ extra_rdoc_files:
124
124
  - KNOWN-ISSUES
125
125
  files:
126
126
  - bin/rackup
127
- - contrib/rack.png
128
- - contrib/rack.svg
129
127
  - contrib/rack_logo.svg
130
128
  - example/lobster.ru
131
129
  - example/protectedlobster.rb
@@ -139,7 +137,6 @@ files:
139
137
  - lib/rack/auth/digest/request.rb
140
138
  - lib/rack/backports/uri/common_18.rb
141
139
  - lib/rack/backports/uri/common_192.rb
142
- - lib/rack/backports/uri/common_193.rb
143
140
  - lib/rack/body_proxy.rb
144
141
  - lib/rack/builder.rb
145
142
  - lib/rack/cascade.rb
@@ -197,12 +194,12 @@ files:
197
194
  - test/builder/anything.rb
198
195
  - test/builder/comment.ru
199
196
  - test/builder/end.ru
200
- - test/builder/line.ru
201
197
  - test/builder/options.ru
202
198
  - test/cgi/lighttpd.conf
203
199
  - test/cgi/rackup_stub.rb
204
200
  - test/cgi/sample_rackup.ru
205
201
  - test/cgi/test
202
+ - test/cgi/test+directory/test+file
206
203
  - test/cgi/test.fcgi
207
204
  - test/cgi/test.ru
208
205
  - test/gemloader.rb
@@ -226,7 +223,6 @@ files:
226
223
  - test/multipart/webkit
227
224
  - test/rackup/config.ru
228
225
  - test/registering_handler/rack/handler/registering_myself.rb
229
- - test/spec_auth.rb
230
226
  - test/spec_auth_basic.rb
231
227
  - test/spec_auth_digest.rb
232
228
  - test/spec_body_proxy.rb
@@ -273,6 +269,7 @@ files:
273
269
  - test/spec_urlmap.rb
274
270
  - test/spec_utils.rb
275
271
  - test/spec_webrick.rb
272
+ - test/static/index.html
276
273
  - test/testrequest.rb
277
274
  - test/unregistered_handler/rack/handler/unregistered.rb
278
275
  - test/unregistered_handler/rack/handler/unregistered_long_one.rb
@@ -282,7 +279,7 @@ files:
282
279
  - Rakefile
283
280
  - README.rdoc
284
281
  - SPEC
285
- homepage: http://rack.github.com/
282
+ homepage: http://rack.rubyforge.org
286
283
  licenses: []
287
284
 
288
285
  post_install_message:
@@ -311,12 +308,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
308
  requirements: []
312
309
 
313
310
  rubyforge_project: rack
314
- rubygems_version: 1.8.24
311
+ rubygems_version: 1.8.12
315
312
  signing_key:
316
313
  specification_version: 3
317
314
  summary: a modular Ruby webserver interface
318
315
  test_files:
319
- - test/spec_auth.rb
320
316
  - test/spec_auth_basic.rb
321
317
  - test/spec_auth_digest.rb
322
318
  - test/spec_body_proxy.rb
@@ -363,4 +359,3 @@ test_files:
363
359
  - test/spec_urlmap.rb
364
360
  - test/spec_utils.rb
365
361
  - test/spec_webrick.rb
366
- has_rdoc:
Binary file
@@ -1,150 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
-
4
- <svg
5
- xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
6
- xmlns:dc="http://purl.org/dc/elements/1.1/"
7
- xmlns:cc="http://creativecommons.org/ns#"
8
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9
- xmlns:svg="http://www.w3.org/2000/svg"
10
- xmlns="http://www.w3.org/2000/svg"
11
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
- width="744.09448819"
14
- height="1052.3622047"
15
- id="svg2"
16
- version="1.1"
17
- inkscape:version="0.48.3.1 r9886"
18
- sodipodi:docname="rack.svg">
19
- <defs
20
- id="defs4">
21
- <linearGradient
22
- id="linearGradient3837"
23
- osb:paint="solid">
24
- <stop
25
- style="stop-color:#000000;stop-opacity:1;"
26
- offset="0"
27
- id="stop3839" />
28
- </linearGradient>
29
- </defs>
30
- <sodipodi:namedview
31
- id="base"
32
- pagecolor="#ffffff"
33
- bordercolor="#666666"
34
- borderopacity="1.0"
35
- inkscape:pageopacity="0.0"
36
- inkscape:pageshadow="2"
37
- inkscape:zoom="0.98994949"
38
- inkscape:cx="230.49849"
39
- inkscape:cy="656.46253"
40
- inkscape:document-units="px"
41
- inkscape:current-layer="layer1"
42
- showgrid="false"
43
- showguides="false"
44
- inkscape:guide-bbox="true"
45
- inkscape:window-width="1920"
46
- inkscape:window-height="1056"
47
- inkscape:window-x="1920"
48
- inkscape:window-y="24"
49
- inkscape:window-maximized="1">
50
- <sodipodi:guide
51
- orientation="1,0"
52
- position="645.99255,757.10933"
53
- id="guide2995" />
54
- <sodipodi:guide
55
- orientation="1,0"
56
- position="488.40876,686.90373"
57
- id="guide2997" />
58
- <sodipodi:guide
59
- orientation="1,0"
60
- position="176.7767,748.52304"
61
- id="guide2999" />
62
- <sodipodi:guide
63
- orientation="1,0"
64
- position="355.71429,782.85714"
65
- id="guide3005" />
66
- <sodipodi:guide
67
- orientation="0,1"
68
- position="527.14286,642.85714"
69
- id="guide3007" />
70
- <sodipodi:guide
71
- orientation="0,1"
72
- position="431.42857,507.85714"
73
- id="guide3009" />
74
- <sodipodi:guide
75
- orientation="0,1"
76
- position="488.40876,783.57143"
77
- id="guide3011" />
78
- <sodipodi:guide
79
- orientation="0,1"
80
- position="505,372.85714"
81
- id="guide3013" />
82
- </sodipodi:namedview>
83
- <metadata
84
- id="metadata7">
85
- <rdf:RDF>
86
- <cc:Work
87
- rdf:about="">
88
- <dc:format>image/svg+xml</dc:format>
89
- <dc:type
90
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
91
- <dc:title></dc:title>
92
- </cc:Work>
93
- </rdf:RDF>
94
- </metadata>
95
- <g
96
- inkscape:label="Layer 1"
97
- inkscape:groupmode="layer"
98
- id="layer1">
99
- <path
100
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
101
- d="m 176.28125,201.03125 0,0.625 0,395.125 0,0.375 0.34375,0.0937 312.34375,91.6875 0.625,0.1875 0,-0.65625 0.125,-419.09375 0,-0.40625 -0.40625,-0.0937 -312.4375,-67.71875 -0.59375,-0.125 z m 1,1.21875 311.4375,67.5 -0.125,418.0625 -311.3125,-91.375 0,-394.1875 z"
102
- id="path2985"
103
- inkscape:connector-curvature="0" />
104
- <path
105
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
106
- d="m 647.21875,206.59375 -0.6875,0.28125 -157.59375,62.21875 -0.3125,0.125 0,0.34375 0.1875,419.125 0,0.75 0.6875,-0.28125 156.0625,-63.1875 0.3125,-0.125 0,-0.34375 1.34375,-418.15625 0,-0.75 z m -1,1.4375 -1.34375,417.125 -155.0625,62.78125 -0.1875,-418.03125 156.59375,-61.875 z"
107
- id="path2993"
108
- inkscape:connector-curvature="0" />
109
- <path
110
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
111
- d="m 355.6875,137.40625 -0.15625,0.0625 L 176.96875,201.0625 177.3125,202 355.75,138.4375 646.78125,207.53125 647,206.5625 l -291.15625,-69.125 -0.15625,-0.0312 z"
112
- id="path3003"
113
- inkscape:connector-curvature="0" />
114
- <path
115
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
116
- d="m 355.71875,277.53125 -0.125,0.0312 -178.9375,47.96875 -1.8125,0.46875 1.8125,0.5 311.625,83.5 0.15625,0.0312 0.125,-0.0625 157.59375,-53.65625 1.5625,-0.53125 -1.59375,-0.4375 -290.28125,-77.78125 -0.125,-0.0312 z m 0,1.03125 L 644.3125,355.90625 488.375,409 178.71875,326 l 177,-47.4375 z"
117
- id="path3015"
118
- inkscape:connector-curvature="0" />
119
- <path
120
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
121
- d="m 355.21875,240.9375 0,37.125 1,0 0,-37.125 -1,0 z"
122
- id="path3017"
123
- inkscape:connector-curvature="0" />
124
- <path
125
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
126
- d="m 176.28125,202.65625 0,393.28125 1,0 0,-393.28125 -1,0 z"
127
- id="path3019"
128
- inkscape:connector-curvature="0" />
129
- <path
130
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
131
- d="m 355.71875,409 -0.125,0.0312 L 177,455.8125 l -1.78125,0.46875 1.78125,0.5 L 488.28125,545 l 0.15625,0.0312 0.125,-0.0625 156.71875,-56.25 1.46875,-0.53125 -1.53125,-0.40625 -289.375,-78.75 -0.125,-0.0312 z m 0,1.03125 287.6875,78.28125 L 488.375,544 179.03125,456.3125 355.71875,410.03125 z"
132
- id="path3021"
133
- inkscape:connector-curvature="0" />
134
- <path
135
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
136
- d="m 355.71875,544 -0.15625,0.0312 -178.5625,52.3125 0.28125,0.96875 178.4375,-52.28125 289.59375,80.25 0.28125,-0.96875 -289.75,-80.28125 -0.125,-0.0312 z"
137
- id="path3023"
138
- inkscape:connector-curvature="0" />
139
- <path
140
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
141
- d="m 355.21875,374.34375 0,35.15625 1,0 0,-35.15625 -1,0 z"
142
- id="path3025"
143
- inkscape:connector-curvature="0" />
144
- <path
145
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:10;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans;stroke-opacity:1;stroke-miterlimit:30;stroke-dasharray:none;stroke-linecap:round;stroke-linejoin:round"
146
- d="m 355.1875,507.03125 0,37.4375 1.03125,0 0,-37.4375 -1.03125,0 z"
147
- id="path3027"
148
- inkscape:connector-curvature="0" />
149
- </g>
150
- </svg>
@@ -1,29 +0,0 @@
1
- # :stopdoc:
2
-
3
- require 'uri/common'
4
-
5
- # Issue:
6
- # http://bugs.ruby-lang.org/issues/5925
7
- #
8
- # Relevant commit:
9
- # https://github.com/ruby/ruby/commit/edb7cdf1eabaff78dfa5ffedfbc2e91b29fa9ca1
10
-
11
- module URI
12
- 256.times do |i|
13
- TBLENCWWWCOMP_[i.chr] = '%%%02X' % i
14
- end
15
- TBLENCWWWCOMP_[' '] = '+'
16
- TBLENCWWWCOMP_.freeze
17
-
18
- 256.times do |i|
19
- h, l = i>>4, i&15
20
- TBLDECWWWCOMP_['%%%X%X' % [h, l]] = i.chr
21
- TBLDECWWWCOMP_['%%%x%X' % [h, l]] = i.chr
22
- TBLDECWWWCOMP_['%%%X%x' % [h, l]] = i.chr
23
- TBLDECWWWCOMP_['%%%x%x' % [h, l]] = i.chr
24
- end
25
- TBLDECWWWCOMP_['+'] = ' '
26
- TBLDECWWWCOMP_.freeze
27
- end
28
-
29
- # :startdoc:
@@ -1 +0,0 @@
1
- run lambda{ |env| [200, {'Content-Type' => 'text/plain'}, [__LINE__.to_s]] }
@@ -1,57 +0,0 @@
1
- require 'rack'
2
-
3
- describe Rack::Auth do
4
- it "should have all common authentication schemes" do
5
- Rack::Auth.schemes.should.include? 'basic'
6
- Rack::Auth.schemes.should.include? 'digest'
7
- Rack::Auth.schemes.should.include? 'bearer'
8
- Rack::Auth.schemes.should.include? 'token'
9
- end
10
-
11
- it "should allow registration of new auth schemes" do
12
- Rack::Auth.schemes.should.not.include "test"
13
- Rack::Auth.add_scheme "test"
14
- Rack::Auth.schemes.should.include "test"
15
- end
16
- end
17
-
18
- describe Rack::Auth::AbstractRequest do
19
- it "should symbolize known auth schemes" do
20
- env = Rack::MockRequest.env_for('/')
21
- env['HTTP_AUTHORIZATION'] = 'Basic aXJyZXNwb25zaWJsZQ=='
22
- req = Rack::Auth::AbstractRequest.new(env)
23
- req.scheme.should.equal :basic
24
-
25
-
26
- env['HTTP_AUTHORIZATION'] = 'Digest aXJyZXNwb25zaWJsZQ=='
27
- req = Rack::Auth::AbstractRequest.new(env)
28
- req.scheme.should.equal :digest
29
-
30
- env['HTTP_AUTHORIZATION'] = 'Bearer aXJyZXNwb25zaWJsZQ=='
31
- req = Rack::Auth::AbstractRequest.new(env)
32
- req.scheme.should.equal :bearer
33
-
34
- env['HTTP_AUTHORIZATION'] = 'MAC aXJyZXNwb25zaWJsZQ=='
35
- req = Rack::Auth::AbstractRequest.new(env)
36
- req.scheme.should.equal :mac
37
-
38
- env['HTTP_AUTHORIZATION'] = 'Token aXJyZXNwb25zaWJsZQ=='
39
- req = Rack::Auth::AbstractRequest.new(env)
40
- req.scheme.should.equal :token
41
-
42
- env['HTTP_AUTHORIZATION'] = 'OAuth aXJyZXNwb25zaWJsZQ=='
43
- req = Rack::Auth::AbstractRequest.new(env)
44
- req.scheme.should.equal :oauth
45
-
46
- env['HTTP_AUTHORIZATION'] = 'OAuth2 aXJyZXNwb25zaWJsZQ=='
47
- req = Rack::Auth::AbstractRequest.new(env)
48
- req.scheme.should.equal :oauth2
49
- end
50
-
51
- it "should not symbolize unknown auth schemes" do
52
- env = Rack::MockRequest.env_for('/')
53
- env['HTTP_AUTHORIZATION'] = 'magic aXJyZXNwb25zaWJsZQ=='
54
- req = Rack::Auth::AbstractRequest.new(env)
55
- req.scheme.should == "magic"
56
- end
57
- end