rack 1.0.1 → 1.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 (82) hide show
  1. data/COPYING +1 -1
  2. data/KNOWN-ISSUES +3 -0
  3. data/RDOX +0 -428
  4. data/README +61 -26
  5. data/SPEC +8 -1
  6. data/bin/rackup +2 -174
  7. data/lib/rack.rb +10 -8
  8. data/lib/rack/builder.rb +17 -0
  9. data/lib/rack/cascade.rb +17 -12
  10. data/lib/rack/chunked.rb +2 -2
  11. data/lib/rack/commonlogger.rb +31 -43
  12. data/lib/rack/config.rb +15 -0
  13. data/lib/rack/content_type.rb +1 -1
  14. data/lib/rack/directory.rb +6 -2
  15. data/lib/rack/etag.rb +23 -0
  16. data/lib/rack/file.rb +4 -2
  17. data/lib/rack/handler.rb +19 -0
  18. data/lib/rack/handler/cgi.rb +1 -1
  19. data/lib/rack/handler/fastcgi.rb +2 -3
  20. data/lib/rack/handler/lsws.rb +4 -1
  21. data/lib/rack/handler/mongrel.rb +8 -5
  22. data/lib/rack/handler/scgi.rb +4 -4
  23. data/lib/rack/handler/webrick.rb +2 -4
  24. data/lib/rack/lint.rb +44 -15
  25. data/lib/rack/logger.rb +20 -0
  26. data/lib/rack/mime.rb +3 -1
  27. data/lib/rack/mock.rb +30 -4
  28. data/lib/rack/nulllogger.rb +18 -0
  29. data/lib/rack/reloader.rb +4 -1
  30. data/lib/rack/request.rb +40 -15
  31. data/lib/rack/response.rb +5 -39
  32. data/lib/rack/runtime.rb +27 -0
  33. data/lib/rack/sendfile.rb +142 -0
  34. data/lib/rack/server.rb +212 -0
  35. data/lib/rack/session/abstract/id.rb +3 -5
  36. data/lib/rack/session/cookie.rb +3 -4
  37. data/lib/rack/session/memcache.rb +53 -43
  38. data/lib/rack/session/pool.rb +1 -1
  39. data/lib/rack/urlmap.rb +9 -8
  40. data/lib/rack/utils.rb +230 -11
  41. data/rack.gemspec +33 -49
  42. data/test/spec_rack_cascade.rb +3 -5
  43. data/test/spec_rack_cgi.rb +3 -3
  44. data/test/spec_rack_commonlogger.rb +39 -10
  45. data/test/spec_rack_config.rb +24 -0
  46. data/test/spec_rack_directory.rb +1 -1
  47. data/test/spec_rack_etag.rb +17 -0
  48. data/test/spec_rack_fastcgi.rb +2 -2
  49. data/test/spec_rack_file.rb +1 -1
  50. data/test/spec_rack_lint.rb +26 -19
  51. data/test/spec_rack_logger.rb +21 -0
  52. data/test/spec_rack_mock.rb +87 -1
  53. data/test/spec_rack_mongrel.rb +4 -4
  54. data/test/spec_rack_nulllogger.rb +13 -0
  55. data/test/spec_rack_request.rb +47 -6
  56. data/test/spec_rack_response.rb +3 -0
  57. data/test/spec_rack_runtime.rb +35 -0
  58. data/test/spec_rack_sendfile.rb +86 -0
  59. data/test/spec_rack_session_cookie.rb +1 -10
  60. data/test/spec_rack_session_memcache.rb +53 -20
  61. data/test/spec_rack_urlmap.rb +30 -0
  62. data/test/spec_rack_utils.rb +171 -6
  63. data/test/spec_rack_webrick.rb +4 -4
  64. data/test/spec_rackup.rb +154 -0
  65. metadata +37 -79
  66. data/Rakefile +0 -164
  67. data/lib/rack/auth/openid.rb +0 -480
  68. data/test/cgi/lighttpd.conf +0 -20
  69. data/test/cgi/test +0 -9
  70. data/test/cgi/test.fcgi +0 -8
  71. data/test/cgi/test.ru +0 -7
  72. data/test/multipart/binary +0 -0
  73. data/test/multipart/empty +0 -10
  74. data/test/multipart/ie +0 -6
  75. data/test/multipart/nested +0 -10
  76. data/test/multipart/none +0 -9
  77. data/test/multipart/semicolon +0 -6
  78. data/test/multipart/text +0 -10
  79. data/test/spec_rack_auth_openid.rb +0 -84
  80. data/test/testrequest.rb +0 -57
  81. data/test/unregistered_handler/rack/handler/unregistered.rb +0 -7
  82. data/test/unregistered_handler/rack/handler/unregistered_long_one.rb +0 -7
@@ -30,7 +30,10 @@ context "Rack::Utils" do
30
30
  end
31
31
 
32
32
  specify "should parse query strings correctly" do
33
- Rack::Utils.parse_query("foo=bar").should.equal "foo" => "bar"
33
+ Rack::Utils.parse_query("foo=bar").
34
+ should.equal "foo" => "bar"
35
+ Rack::Utils.parse_query("foo=\"bar\"").
36
+ should.equal "foo" => "bar"
34
37
  Rack::Utils.parse_query("foo=bar&foo=quux").
35
38
  should.equal "foo" => ["bar", "quux"]
36
39
  Rack::Utils.parse_query("foo=1&bar=2").
@@ -47,6 +50,8 @@ context "Rack::Utils" do
47
50
  should.equal "foo" => ""
48
51
  Rack::Utils.parse_nested_query("foo=bar").
49
52
  should.equal "foo" => "bar"
53
+ Rack::Utils.parse_nested_query("foo=\"bar\"").
54
+ should.equal "foo" => "bar"
50
55
 
51
56
  Rack::Utils.parse_nested_query("foo=bar&foo=quux").
52
57
  should.equal "foo" => "quux"
@@ -126,6 +131,53 @@ context "Rack::Utils" do
126
131
  should.equal "my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F"
127
132
  end
128
133
 
134
+ specify "should build nested query strings correctly" do
135
+ Rack::Utils.build_nested_query("foo" => nil).should.equal "foo"
136
+ Rack::Utils.build_nested_query("foo" => "").should.equal "foo="
137
+ Rack::Utils.build_nested_query("foo" => "bar").should.equal "foo=bar"
138
+
139
+ Rack::Utils.build_nested_query("foo" => "1", "bar" => "2").
140
+ should.equal "foo=1&bar=2"
141
+ Rack::Utils.build_nested_query("my weird field" => "q1!2\"'w$5&7/z8)?").
142
+ should.equal "my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F"
143
+
144
+ Rack::Utils.build_nested_query("foo" => [nil]).
145
+ should.equal "foo[]"
146
+ Rack::Utils.build_nested_query("foo" => [""]).
147
+ should.equal "foo[]="
148
+ Rack::Utils.build_nested_query("foo" => ["bar"]).
149
+ should.equal "foo[]=bar"
150
+
151
+ # The ordering of the output query string is unpredictable with 1.8's
152
+ # unordered hash. Test that build_nested_query performs the inverse
153
+ # function of parse_nested_query.
154
+ [{"foo" => nil, "bar" => ""},
155
+ {"foo" => "bar", "baz" => ""},
156
+ {"foo" => ["1", "2"]},
157
+ {"foo" => "bar", "baz" => ["1", "2", "3"]},
158
+ {"foo" => ["bar"], "baz" => ["1", "2", "3"]},
159
+ {"foo" => ["1", "2"]},
160
+ {"foo" => "bar", "baz" => ["1", "2", "3"]},
161
+ {"x" => {"y" => {"z" => "1"}}},
162
+ {"x" => {"y" => {"z" => ["1"]}}},
163
+ {"x" => {"y" => {"z" => ["1", "2"]}}},
164
+ {"x" => {"y" => [{"z" => "1"}]}},
165
+ {"x" => {"y" => [{"z" => ["1"]}]}},
166
+ {"x" => {"y" => [{"z" => "1", "w" => "2"}]}},
167
+ {"x" => {"y" => [{"v" => {"w" => "1"}}]}},
168
+ {"x" => {"y" => [{"z" => "1", "v" => {"w" => "2"}}]}},
169
+ {"x" => {"y" => [{"z" => "1"}, {"z" => "2"}]}},
170
+ {"x" => {"y" => [{"z" => "1", "w" => "a"}, {"z" => "2", "w" => "3"}]}}
171
+ ].each { |params|
172
+ qs = Rack::Utils.build_nested_query(params)
173
+ Rack::Utils.parse_nested_query(qs).should.equal params
174
+ }
175
+
176
+ lambda { Rack::Utils.build_nested_query("foo=bar") }.
177
+ should.raise(ArgumentError).
178
+ message.should.equal "value must be a Hash"
179
+ end
180
+
129
181
  specify "should figure out which encodings are acceptable" do
130
182
  helper = lambda do |a, b|
131
183
  request = Rack::Request.new(Rack::MockRequest.env_for("", "HTTP_ACCEPT_ENCODING" => a))
@@ -152,6 +204,18 @@ context "Rack::Utils" do
152
204
  specify "should return the bytesize of String" do
153
205
  Rack::Utils.bytesize("FOO\xE2\x82\xAC").should.equal 6
154
206
  end
207
+
208
+ specify "should return status code for integer" do
209
+ Rack::Utils.status_code(200).should.equal 200
210
+ end
211
+
212
+ specify "should return status code for string" do
213
+ Rack::Utils.status_code("200").should.equal 200
214
+ end
215
+
216
+ specify "should return status code for symbol" do
217
+ Rack::Utils.status_code(:ok).should.equal 200
218
+ end
155
219
  end
156
220
 
157
221
  context "Rack::Utils::HeaderHash" do
@@ -190,30 +254,53 @@ context "Rack::Utils::HeaderHash" do
190
254
  h = Rack::Utils::HeaderHash.new("foo" => ["bar", "baz"])
191
255
  h.to_hash.should.equal({ "foo" => "bar\nbaz" })
192
256
  end
193
-
257
+
258
+ specify "should replace hashes correctly" do
259
+ h = Rack::Utils::HeaderHash.new("Foo-Bar" => "baz")
260
+ j = {"foo" => "bar"}
261
+ h.replace(j)
262
+ h["foo"].should.equal "bar"
263
+ end
264
+
194
265
  specify "should be able to delete the given key case-sensitively" do
195
266
  h = Rack::Utils::HeaderHash.new("foo" => "bar")
196
267
  h.delete("foo")
197
268
  h["foo"].should.be.nil
198
269
  h["FOO"].should.be.nil
199
270
  end
200
-
271
+
201
272
  specify "should be able to delete the given key case-insensitively" do
202
273
  h = Rack::Utils::HeaderHash.new("foo" => "bar")
203
274
  h.delete("FOO")
204
275
  h["foo"].should.be.nil
205
276
  h["FOO"].should.be.nil
206
277
  end
207
-
278
+
208
279
  specify "should return the deleted value when #delete is called on an existing key" do
209
280
  h = Rack::Utils::HeaderHash.new("foo" => "bar")
210
281
  h.delete("Foo").should.equal("bar")
211
282
  end
212
-
283
+
213
284
  specify "should return nil when #delete is called on a non-existant key" do
214
285
  h = Rack::Utils::HeaderHash.new("foo" => "bar")
215
286
  h.delete("Hello").should.be.nil
216
287
  end
288
+
289
+ specify "should avoid unnecessary object creation if possible" do
290
+ a = Rack::Utils::HeaderHash.new("foo" => "bar")
291
+ b = Rack::Utils::HeaderHash.new(a)
292
+ b.object_id.should.equal(a.object_id)
293
+ b.should.equal(a)
294
+ end
295
+
296
+ specify "should convert Array values to Strings when responding to #each" do
297
+ h = Rack::Utils::HeaderHash.new("foo" => ["bar", "baz"])
298
+ h.each do |k,v|
299
+ k.should.equal("foo")
300
+ v.should.equal("bar\nbaz")
301
+ end
302
+ end
303
+
217
304
  end
218
305
 
219
306
  context "Rack::Utils::Context" do
@@ -372,9 +459,83 @@ context "Rack::Utils::Multipart" do
372
459
  input.read.length.should.equal 197
373
460
  end
374
461
 
462
+ specify "builds multipart body" do
463
+ files = Rack::Utils::Multipart::UploadedFile.new(multipart_file("file1.txt"))
464
+ data = Rack::Utils::Multipart.build_multipart("submit-name" => "Larry", "files" => files)
465
+
466
+ options = {
467
+ "CONTENT_TYPE" => "multipart/form-data; boundary=AaB03x",
468
+ "CONTENT_LENGTH" => data.length.to_s,
469
+ :input => StringIO.new(data)
470
+ }
471
+ env = Rack::MockRequest.env_for("/", options)
472
+ params = Rack::Utils::Multipart.parse_multipart(env)
473
+ params["submit-name"].should.equal "Larry"
474
+ params["files"][:filename].should.equal "file1.txt"
475
+ params["files"][:tempfile].read.should.equal "contents"
476
+ end
477
+
478
+ specify "builds nested multipart body" do
479
+ files = Rack::Utils::Multipart::UploadedFile.new(multipart_file("file1.txt"))
480
+ data = Rack::Utils::Multipart.build_multipart("people" => [{"submit-name" => "Larry", "files" => files}])
481
+
482
+ options = {
483
+ "CONTENT_TYPE" => "multipart/form-data; boundary=AaB03x",
484
+ "CONTENT_LENGTH" => data.length.to_s,
485
+ :input => StringIO.new(data)
486
+ }
487
+ env = Rack::MockRequest.env_for("/", options)
488
+ params = Rack::Utils::Multipart.parse_multipart(env)
489
+ params["people"][0]["submit-name"].should.equal "Larry"
490
+ params["people"][0]["files"][:filename].should.equal "file1.txt"
491
+ params["people"][0]["files"][:tempfile].read.should.equal "contents"
492
+ end
493
+
494
+ specify "can parse fields that end at the end of the buffer" do
495
+ input = File.read(multipart_file("bad_robots"))
496
+
497
+ req = Rack::Request.new Rack::MockRequest.env_for("/",
498
+ "CONTENT_TYPE" => "multipart/form-data, boundary=1yy3laWhgX31qpiHinh67wJXqKalukEUTvqTzmon",
499
+ "CONTENT_LENGTH" => input.size,
500
+ :input => input)
501
+
502
+ req.POST['file.path'].should.equal "/var/tmp/uploads/4/0001728414"
503
+ req.POST['addresses'].should.not.equal nil
504
+ end
505
+
506
+ specify "builds complete params with the chunk size of 16384 slicing exactly on boundary" do
507
+ data = File.open(multipart_file("fail_16384_nofile")) { |f| f.read }.gsub(/\n/, "\r\n")
508
+ options = {
509
+ "CONTENT_TYPE" => "multipart/form-data; boundary=----WebKitFormBoundaryWsY0GnpbI5U7ztzo",
510
+ "CONTENT_LENGTH" => data.length.to_s,
511
+ :input => StringIO.new(data)
512
+ }
513
+ env = Rack::MockRequest.env_for("/", options)
514
+ params = Rack::Utils::Multipart.parse_multipart(env)
515
+
516
+ params.should.not.equal nil
517
+ params.keys.should.include "AAAAAAAAAAAAAAAAAAA"
518
+ params["AAAAAAAAAAAAAAAAAAA"].keys.should.include "PLAPLAPLA_MEMMEMMEMM_ATTRATTRER"
519
+ params["AAAAAAAAAAAAAAAAAAA"]["PLAPLAPLA_MEMMEMMEMM_ATTRATTRER"].keys.should.include "new"
520
+ params["AAAAAAAAAAAAAAAAAAA"]["PLAPLAPLA_MEMMEMMEMM_ATTRATTRER"]["new"].keys.should.include "-2"
521
+ params["AAAAAAAAAAAAAAAAAAA"]["PLAPLAPLA_MEMMEMMEMM_ATTRATTRER"]["new"]["-2"].keys.should.include "ba_unit_id"
522
+ params["AAAAAAAAAAAAAAAAAAA"]["PLAPLAPLA_MEMMEMMEMM_ATTRATTRER"]["new"]["-2"]["ba_unit_id"].should.equal "1017"
523
+ end
524
+
525
+ specify "should return nil if no UploadedFiles were used" do
526
+ data = Rack::Utils::Multipart.build_multipart("people" => [{"submit-name" => "Larry", "files" => "contents"}])
527
+ data.should.equal nil
528
+ end
529
+
530
+ specify "should raise ArgumentError if params is not a Hash" do
531
+ lambda { Rack::Utils::Multipart.build_multipart("foo=bar") }.
532
+ should.raise(ArgumentError).
533
+ message.should.equal "value must be a Hash"
534
+ end
535
+
375
536
  private
376
537
  def multipart_fixture(name)
377
- file = File.join(File.dirname(__FILE__), "multipart", name.to_s)
538
+ file = multipart_file(name)
378
539
  data = File.open(file, 'rb') { |io| io.read }
379
540
 
380
541
  type = "multipart/form-data; boundary=AaB03x"
@@ -384,4 +545,8 @@ context "Rack::Utils::Multipart" do
384
545
  "CONTENT_LENGTH" => length.to_s,
385
546
  :input => StringIO.new(data) }
386
547
  end
548
+
549
+ def multipart_file(name)
550
+ File.join(File.dirname(__FILE__), "multipart", name.to_s)
551
+ end
387
552
  end
@@ -9,7 +9,7 @@ Thread.abort_on_exception = true
9
9
 
10
10
  context "Rack::Handler::WEBrick" do
11
11
  include TestRequest::Helpers
12
-
12
+
13
13
  setup do
14
14
  @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0',
15
15
  :Port => @port=9202,
@@ -39,7 +39,7 @@ context "Rack::Handler::WEBrick" do
39
39
 
40
40
  specify "should have rack headers" do
41
41
  GET("/test")
42
- response["rack.version"].should.equal [1,0]
42
+ response["rack.version"].should.equal [1,1]
43
43
  response["rack.multithread"].should.be true
44
44
  response["rack.multiprocess"].should.be false
45
45
  response["rack.run_once"].should.be false
@@ -50,7 +50,7 @@ context "Rack::Handler::WEBrick" do
50
50
  response["REQUEST_METHOD"].should.equal "GET"
51
51
  response["SCRIPT_NAME"].should.equal "/test"
52
52
  response["REQUEST_PATH"].should.equal "/"
53
- response["PATH_INFO"].should.be.nil
53
+ response["PATH_INFO"].should.be.equal ""
54
54
  response["QUERY_STRING"].should.equal ""
55
55
  response["test.postdata"].should.equal ""
56
56
 
@@ -60,7 +60,7 @@ context "Rack::Handler::WEBrick" do
60
60
  response["REQUEST_PATH"].should.equal "/"
61
61
  response["PATH_INFO"].should.equal "/foo"
62
62
  response["QUERY_STRING"].should.equal "quux=1"
63
-
63
+
64
64
  GET("/test/foo%25encoding?quux=1")
65
65
  response["REQUEST_METHOD"].should.equal "GET"
66
66
  response["SCRIPT_NAME"].should.equal "/test"
@@ -0,0 +1,154 @@
1
+ require 'test/spec'
2
+ require 'testrequest'
3
+ require 'rack/server'
4
+ require 'open3'
5
+
6
+ begin
7
+ require "mongrel"
8
+
9
+ context "rackup" do
10
+ include TestRequest::Helpers
11
+
12
+ def run_rackup(*args)
13
+ options = args.last.is_a?(Hash) ? args.pop : {}
14
+ flags = args.first
15
+ @host = options[:host] || "0.0.0.0"
16
+ @port = options[:port] || 9292
17
+
18
+ Dir.chdir("#{root}/test/rackup") do
19
+ @in, @rackup, @err = Open3.popen3("#{Gem.ruby} -S #{rackup} #{flags}")
20
+ end
21
+
22
+ return if options[:port] == false
23
+
24
+ # Wait until the server is available
25
+ begin
26
+ GET("/")
27
+ rescue
28
+ sleep 0.05
29
+ retry
30
+ end
31
+ end
32
+
33
+ def output
34
+ @rackup.read
35
+ end
36
+
37
+ after do
38
+ # This doesn't actually return a response, so we rescue
39
+ GET "/die" rescue nil
40
+
41
+ Dir["#{root}/**/*.pid"].each do |file|
42
+ File.delete(file)
43
+ end
44
+
45
+ File.delete("#{root}/log_output") if File.exist?("#{root}/log_output")
46
+ end
47
+
48
+ specify "rackup" do
49
+ run_rackup
50
+ response["PATH_INFO"].should.equal '/'
51
+ response["test.$DEBUG"].should.be false
52
+ response["test.$EVAL"].should.be nil
53
+ response["test.$VERBOSE"].should.be false
54
+ response["test.Ping"].should.be nil
55
+ response["SERVER_SOFTWARE"].should.not =~ /webrick/
56
+ end
57
+
58
+ specify "rackup --help" do
59
+ run_rackup "--help", :port => false
60
+ output.should.match /--port/
61
+ end
62
+
63
+ specify "rackup --port" do
64
+ run_rackup "--port 9000", :port => 9000
65
+ response["SERVER_PORT"].should.equal "9000"
66
+ end
67
+
68
+ specify "rackup --debug" do
69
+ run_rackup "--debug"
70
+ response["test.$DEBUG"].should.be true
71
+ end
72
+
73
+ specify "rackup --eval" do
74
+ run_rackup %{--eval "BUKKIT = 'BUKKIT'"}
75
+ response["test.$EVAL"].should.equal "BUKKIT"
76
+ end
77
+
78
+ specify "rackup --warn" do
79
+ run_rackup %{--warn}
80
+ response["test.$VERBOSE"].should.be true
81
+ end
82
+
83
+ specify "rackup --include" do
84
+ run_rackup %{--include /foo/bar}
85
+ response["test.$LOAD_PATH"].should.include "/foo/bar"
86
+ end
87
+
88
+ specify "rackup --require" do
89
+ run_rackup %{--require ping}
90
+ response["test.Ping"].should.equal "constant"
91
+ end
92
+
93
+ specify "rackup --server" do
94
+ run_rackup %{--server webrick}
95
+ response["SERVER_SOFTWARE"].should =~ /webrick/i
96
+ end
97
+
98
+ specify "rackup --host" do
99
+ run_rackup %{--host 127.0.0.1}, :host => "127.0.0.1"
100
+ response["REMOTE_ADDR"].should.equal "127.0.0.1"
101
+ end
102
+
103
+ specify "rackup --daemonize --pid" do
104
+ run_rackup %{--daemonize --pid testing.pid}
105
+ status.should.be 200
106
+ @rackup.should.be.eof?
107
+ Dir["#{root}/**/testing.pid"].should.not.be.empty?
108
+ end
109
+
110
+ specify "rackup --pid" do
111
+ run_rackup %{--pid testing.pid}
112
+ status.should.be 200
113
+ Dir["#{root}/**/testing.pid"].should.not.be.empty?
114
+ end
115
+
116
+ specify "rackup --version" do
117
+ run_rackup %{--version}, :port => false
118
+ output.should =~ /1.0/
119
+ end
120
+
121
+ specify "rackup --env development includes lint" do
122
+ run_rackup
123
+ GET("/broken_lint")
124
+ status.should.be 500
125
+ end
126
+
127
+ specify "rackup --env deployment does not include lint" do
128
+ run_rackup %{--env deployment}
129
+ GET("/broken_lint")
130
+ status.should.be 200
131
+ end
132
+
133
+ specify "rackup --env none does not include lint" do
134
+ run_rackup %{--env none}
135
+ GET("/broken_lint")
136
+ status.should.be 200
137
+ end
138
+
139
+ specify "rackup --env deployment does log" do
140
+ run_rackup %{--env deployment}
141
+ log = File.read(response["test.stderr"])
142
+ log.should.be.empty?
143
+ end
144
+
145
+ specify "rackup --env none does not log" do
146
+ run_rackup %{--env none}
147
+ GET("/")
148
+ log = File.read(response["test.stderr"])
149
+ log.should.be.empty?
150
+ end
151
+ end
152
+ rescue LoadError
153
+ $stderr.puts "Skipping rackup --server tests (mongrel is required). `gem install thin` and try again."
154
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Neukirchen
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-18 00:00:00 +02:00
13
- default_executable: rackup
12
+ date: 2010-01-04 00:00:00 +01:00
13
+ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: test-spec
@@ -62,16 +62,6 @@ dependencies:
62
62
  - !ruby/object:Gem::Version
63
63
  version: "0"
64
64
  version:
65
- - !ruby/object:Gem::Dependency
66
- name: ruby-openid
67
- type: :development
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - ~>
72
- - !ruby/object:Gem::Version
73
- version: 2.0.0
74
- version:
75
65
  - !ruby/object:Gem::Dependency
76
66
  name: thin
77
67
  type: :development
@@ -82,7 +72,15 @@ dependencies:
82
72
  - !ruby/object:Gem::Version
83
73
  version: "0"
84
74
  version:
85
- description: Rack provides minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. Also see http://rack.rubyforge.org.
75
+ description: |
76
+ Rack provides minimal, modular and adaptable interface for developing
77
+ web applications in Ruby. By wrapping HTTP requests and responses in
78
+ the simplest way possible, it unifies and distills the API for web
79
+ servers, web frameworks, and software in between (the so-called
80
+ middleware) into a single method call.
81
+
82
+ Also see http://rack.rubyforge.org.
83
+
86
84
  email: chneukirchen@gmail.com
87
85
  executables:
88
86
  - rackup
@@ -91,19 +89,13 @@ extensions: []
91
89
  extra_rdoc_files:
92
90
  - README
93
91
  - SPEC
94
- - RDOX
95
92
  - KNOWN-ISSUES
96
93
  files:
97
- - COPYING
98
- - KNOWN-ISSUES
99
- - README
100
- - Rakefile
101
94
  - bin/rackup
102
95
  - contrib/rack_logo.svg
103
96
  - example/lobster.ru
104
97
  - example/protectedlobster.rb
105
98
  - example/protectedlobster.ru
106
- - lib/rack.rb
107
99
  - lib/rack/adapter/camping.rb
108
100
  - lib/rack/auth/abstract/handler.rb
109
101
  - lib/rack/auth/abstract/request.rb
@@ -112,18 +104,18 @@ files:
112
104
  - lib/rack/auth/digest/nonce.rb
113
105
  - lib/rack/auth/digest/params.rb
114
106
  - lib/rack/auth/digest/request.rb
115
- - lib/rack/auth/openid.rb
116
107
  - lib/rack/builder.rb
117
108
  - lib/rack/cascade.rb
118
109
  - lib/rack/chunked.rb
119
110
  - lib/rack/commonlogger.rb
120
111
  - lib/rack/conditionalget.rb
112
+ - lib/rack/config.rb
121
113
  - lib/rack/content_length.rb
122
114
  - lib/rack/content_type.rb
123
115
  - lib/rack/deflater.rb
124
116
  - lib/rack/directory.rb
117
+ - lib/rack/etag.rb
125
118
  - lib/rack/file.rb
126
- - lib/rack/handler.rb
127
119
  - lib/rack/handler/cgi.rb
128
120
  - lib/rack/handler/evented_mongrel.rb
129
121
  - lib/rack/handler/fastcgi.rb
@@ -133,18 +125,24 @@ files:
133
125
  - lib/rack/handler/swiftiplied_mongrel.rb
134
126
  - lib/rack/handler/thin.rb
135
127
  - lib/rack/handler/webrick.rb
128
+ - lib/rack/handler.rb
136
129
  - lib/rack/head.rb
137
130
  - lib/rack/lint.rb
138
131
  - lib/rack/lobster.rb
139
132
  - lib/rack/lock.rb
133
+ - lib/rack/logger.rb
140
134
  - lib/rack/methodoverride.rb
141
135
  - lib/rack/mime.rb
142
136
  - lib/rack/mock.rb
137
+ - lib/rack/nulllogger.rb
143
138
  - lib/rack/recursive.rb
144
139
  - lib/rack/reloader.rb
145
140
  - lib/rack/request.rb
146
141
  - lib/rack/response.rb
147
142
  - lib/rack/rewindable_input.rb
143
+ - lib/rack/runtime.rb
144
+ - lib/rack/sendfile.rb
145
+ - lib/rack/server.rb
148
146
  - lib/rack/session/abstract/id.rb
149
147
  - lib/rack/session/cookie.rb
150
148
  - lib/rack/session/memcache.rb
@@ -154,63 +152,17 @@ files:
154
152
  - lib/rack/static.rb
155
153
  - lib/rack/urlmap.rb
156
154
  - lib/rack/utils.rb
157
- - test/cgi/lighttpd.conf
158
- - test/cgi/test
159
- - test/cgi/test.fcgi
160
- - test/cgi/test.ru
161
- - test/multipart/binary
162
- - test/multipart/empty
163
- - test/multipart/ie
164
- - test/multipart/nested
165
- - test/multipart/none
166
- - test/multipart/semicolon
167
- - test/multipart/text
168
- - test/spec_rack_auth_basic.rb
169
- - test/spec_rack_auth_digest.rb
170
- - test/spec_rack_auth_openid.rb
171
- - test/spec_rack_builder.rb
172
- - test/spec_rack_camping.rb
173
- - test/spec_rack_cascade.rb
174
- - test/spec_rack_cgi.rb
175
- - test/spec_rack_chunked.rb
176
- - test/spec_rack_commonlogger.rb
177
- - test/spec_rack_conditionalget.rb
178
- - test/spec_rack_content_length.rb
179
- - test/spec_rack_content_type.rb
180
- - test/spec_rack_deflater.rb
181
- - test/spec_rack_directory.rb
182
- - test/spec_rack_fastcgi.rb
183
- - test/spec_rack_file.rb
184
- - test/spec_rack_handler.rb
185
- - test/spec_rack_head.rb
186
- - test/spec_rack_lint.rb
187
- - test/spec_rack_lobster.rb
188
- - test/spec_rack_lock.rb
189
- - test/spec_rack_methodoverride.rb
190
- - test/spec_rack_mock.rb
191
- - test/spec_rack_mongrel.rb
192
- - test/spec_rack_recursive.rb
193
- - test/spec_rack_request.rb
194
- - test/spec_rack_response.rb
195
- - test/spec_rack_rewindable_input.rb
196
- - test/spec_rack_session_cookie.rb
197
- - test/spec_rack_session_memcache.rb
198
- - test/spec_rack_session_pool.rb
199
- - test/spec_rack_showexceptions.rb
200
- - test/spec_rack_showstatus.rb
201
- - test/spec_rack_static.rb
202
- - test/spec_rack_thin.rb
203
- - test/spec_rack_urlmap.rb
204
- - test/spec_rack_utils.rb
205
- - test/spec_rack_webrick.rb
206
- - test/testrequest.rb
207
- - test/unregistered_handler/rack/handler/unregistered.rb
208
- - test/unregistered_handler/rack/handler/unregistered_long_one.rb
209
- - SPEC
210
- - RDOX
155
+ - lib/rack.rb
156
+ - COPYING
157
+ - KNOWN-ISSUES
211
158
  - rack.gemspec
159
+ - RDOX
160
+ - README
161
+ - SPEC
212
162
  has_rdoc: true
213
163
  homepage: http://rack.rubyforge.org
164
+ licenses: []
165
+
214
166
  post_install_message:
215
167
  rdoc_options: []
216
168
 
@@ -231,14 +183,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
183
  requirements: []
232
184
 
233
185
  rubyforge_project: rack
234
- rubygems_version: 1.3.1
186
+ rubygems_version: 1.3.5
235
187
  signing_key:
236
- specification_version: 2
188
+ specification_version: 3
237
189
  summary: a modular Ruby webserver interface
238
190
  test_files:
239
191
  - test/spec_rack_auth_basic.rb
240
192
  - test/spec_rack_auth_digest.rb
241
- - test/spec_rack_auth_openid.rb
242
193
  - test/spec_rack_builder.rb
243
194
  - test/spec_rack_camping.rb
244
195
  - test/spec_rack_cascade.rb
@@ -246,10 +197,12 @@ test_files:
246
197
  - test/spec_rack_chunked.rb
247
198
  - test/spec_rack_commonlogger.rb
248
199
  - test/spec_rack_conditionalget.rb
200
+ - test/spec_rack_config.rb
249
201
  - test/spec_rack_content_length.rb
250
202
  - test/spec_rack_content_type.rb
251
203
  - test/spec_rack_deflater.rb
252
204
  - test/spec_rack_directory.rb
205
+ - test/spec_rack_etag.rb
253
206
  - test/spec_rack_fastcgi.rb
254
207
  - test/spec_rack_file.rb
255
208
  - test/spec_rack_handler.rb
@@ -257,13 +210,17 @@ test_files:
257
210
  - test/spec_rack_lint.rb
258
211
  - test/spec_rack_lobster.rb
259
212
  - test/spec_rack_lock.rb
213
+ - test/spec_rack_logger.rb
260
214
  - test/spec_rack_methodoverride.rb
261
215
  - test/spec_rack_mock.rb
262
216
  - test/spec_rack_mongrel.rb
217
+ - test/spec_rack_nulllogger.rb
263
218
  - test/spec_rack_recursive.rb
264
219
  - test/spec_rack_request.rb
265
220
  - test/spec_rack_response.rb
266
221
  - test/spec_rack_rewindable_input.rb
222
+ - test/spec_rack_runtime.rb
223
+ - test/spec_rack_sendfile.rb
267
224
  - test/spec_rack_session_cookie.rb
268
225
  - test/spec_rack_session_memcache.rb
269
226
  - test/spec_rack_session_pool.rb
@@ -274,3 +231,4 @@ test_files:
274
231
  - test/spec_rack_urlmap.rb
275
232
  - test/spec_rack_utils.rb
276
233
  - test/spec_rack_webrick.rb
234
+ - test/spec_rackup.rb