rackup 0.2.2 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2f461ce1898be20b5206f2e36164aed062a6ce123f283d84400ee8f70eff6af
4
- data.tar.gz: d4f73f7cb37cc02ac841f5e7ceb15abcde390de3cb099872735249878fdcf1e2
3
+ metadata.gz: a0b31e72267a0dc7a7cc3bbe41d06b49ea16ec3612edc7474fe5c99c97e568cf
4
+ data.tar.gz: 6b9b9f197c6929bed47b7bb3c81f13f956427e1d078ab2a4b12afc0c4400f881
5
5
  SHA512:
6
- metadata.gz: 75a3501c7a1bcbe1faf527c280259bc582651c6bb205ad5f37328ad22555ae3d8f51f7ef66ca80ba8b6d72c8c62bcea26878a7f284dc6738efe005f40001c039
7
- data.tar.gz: 887ad57cc40e6b4cc97b3476baed14276b37d07588018f874f807ea079d1c586decc5669760e18981e6d5d8497d05fc2d3cad28bdebb84dc4f7a4366b2b81d9e
6
+ metadata.gz: 21aba248befe16cd582ac7c867bc28cecd41155e2f8979e8cecba248e2f1623894c3f943484a85a189d3e2bdec45c836ad8f9f2995a2362809332b1b99dcd3d5
7
+ data.tar.gz: 258c30b02fc3d454df9dcd1d6285f0f3b6d592728f856c53e761c37db2a56925bc0a90bf0b3330441c754fddec280501abc13aa2032a120f3ce5917bd38c817f
data/lib/rack/handler.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  warn "Rack::Handler is deprecated and replaced by Rackup::Handler"
4
7
  require_relative '../rackup/handler'
5
8
  module Rack
data/lib/rack/server.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  warn "Rack::Server is deprecated and replaced by Rackup::Server"
4
7
  require_relative '../rackup/server'
5
8
  module Rack
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  module Rackup
4
7
  module Handler
5
8
  class CGI
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+ # Copyright, 2022, by Jeremy Evans.
6
+
3
7
  require 'webrick'
4
8
  require 'stringio'
5
9
 
@@ -7,28 +11,11 @@ require 'rack/constants'
7
11
  require_relative '../handler'
8
12
  require_relative '../version'
9
13
 
10
- # This monkey patch allows for applications to perform their own chunking
11
- # through WEBrick::HTTPResponse if rack is set to true.
12
- class WEBrick::HTTPResponse
13
- attr_accessor :rack
14
-
15
- alias _rack_setup_header setup_header
16
- def setup_header
17
- app_chunking = rack && @header['transfer-encoding'] == 'chunked'
18
-
19
- @chunked = app_chunking if app_chunking
20
-
21
- _rack_setup_header
22
-
23
- @chunked = false if app_chunking
24
- end
25
- end
14
+ require_relative '../stream'
26
15
 
27
16
  module Rackup
28
17
  module Handler
29
18
  class WEBrick < ::WEBrick::HTTPServlet::AbstractServlet
30
- include Rack
31
-
32
19
  def self.run(app, **options)
33
20
  environment = ENV['RACK_ENV'] || 'development'
34
21
  default_host = environment == 'development' ? 'localhost' : nil
@@ -69,58 +56,103 @@ module Rackup
69
56
  @app = app
70
57
  end
71
58
 
59
+ # This handles mapping the WEBrick request to a Rack input stream.
60
+ class Input
61
+ include Stream::Reader
62
+
63
+ def initialize(request)
64
+ @request = request
65
+
66
+ @reader = Fiber.new do
67
+ @request.body do |chunk|
68
+ Fiber.yield(chunk)
69
+ end
70
+
71
+ Fiber.yield(nil)
72
+
73
+ # End of stream:
74
+ @reader = nil
75
+ end
76
+ end
77
+
78
+ def close
79
+ @request = nil
80
+ @reader = nil
81
+ end
82
+
83
+ private
84
+
85
+ # Read one chunk from the request body.
86
+ def read_next
87
+ @reader&.resume
88
+ end
89
+ end
90
+
72
91
  def service(req, res)
73
- res.rack = true
74
92
  env = req.meta_vars
75
93
  env.delete_if { |k, v| v.nil? }
76
94
 
77
- rack_input = StringIO.new(req.body.to_s)
78
- rack_input.set_encoding(Encoding::BINARY)
95
+ input = Input.new(req)
79
96
 
80
97
  env.update(
81
- RACK_INPUT => rack_input,
82
- RACK_ERRORS => $stderr,
83
- RACK_URL_SCHEME => ["yes", "on", "1"].include?(env[HTTPS]) ? "https" : "http",
84
- RACK_IS_HIJACK => true,
98
+ ::Rack::RACK_INPUT => input,
99
+ ::Rack::RACK_ERRORS => $stderr,
100
+ ::Rack::RACK_URL_SCHEME => ["yes", "on", "1"].include?(env[::Rack::HTTPS]) ? "https" : "http",
101
+ ::Rack::RACK_IS_HIJACK => true,
85
102
  )
86
103
 
87
- env[QUERY_STRING] ||= ""
88
- unless env[PATH_INFO] == ""
89
- path, n = req.request_uri.path, env[SCRIPT_NAME].length
90
- env[PATH_INFO] = path[n, path.length - n]
104
+ env[::Rack::QUERY_STRING] ||= ""
105
+ unless env[::Rack::PATH_INFO] == ""
106
+ path, n = req.request_uri.path, env[::Rack::SCRIPT_NAME].length
107
+ env[::Rack::PATH_INFO] = path[n, path.length - n]
91
108
  end
92
- env[REQUEST_PATH] ||= [env[SCRIPT_NAME], env[PATH_INFO]].join
109
+ env[::Rack::REQUEST_PATH] ||= [env[::Rack::SCRIPT_NAME], env[::Rack::PATH_INFO]].join
93
110
 
94
111
  status, headers, body = @app.call(env)
95
112
  begin
96
- res.status = status.to_i
97
- io_lambda = nil
98
- headers.each { |key, value|
99
- if key == RACK_HIJACK
100
- io_lambda = value
101
- elsif key == "set-cookie"
102
- res.cookies.concat(Array(value))
103
- else
104
- # Since WEBrick won't accept repeated headers,
105
- # merge the values per RFC 1945 section 4.2.
106
- res[key] = Array(value).join(", ")
107
- end
108
- }
113
+ res.status = status
114
+
115
+ if value = headers[::Rack::RACK_HIJACK]
116
+ io_lambda = value
117
+ body = nil
118
+ elsif !body.respond_to?(:to_path) && !body.respond_to?(:each)
119
+ io_lambda = body
120
+ body = nil
121
+ end
122
+
123
+ if value = headers.delete('set-cookie')
124
+ res.cookies.concat(Array(value))
125
+ end
126
+
127
+ headers.each do |key, value|
128
+ # Skip keys starting with rack., per Rack SPEC
129
+ next if key.start_with?('rack.')
130
+
131
+ # Since WEBrick won't accept repeated headers,
132
+ # merge the values per RFC 1945 section 4.2.
133
+ value = value.join(", ") if Array === value
134
+ res[key] = value
135
+ end
109
136
 
110
137
  if io_lambda
111
- rd, wr = IO.pipe
112
- res.body = rd
113
- res.chunked = true
114
- io_lambda.call wr
138
+ protocol = headers['rack.protocol'] || headers['upgrade']
139
+
140
+ if protocol
141
+ # Set all the headers correctly for an upgrade response:
142
+ res.upgrade!(protocol)
143
+ end
144
+ res.body = io_lambda
115
145
  elsif body.respond_to?(:to_path)
116
146
  res.body = ::File.open(body.to_path, 'rb')
117
147
  else
118
- body.each { |part|
119
- res.body << part
120
- }
148
+ buffer = String.new
149
+ body.each do |part|
150
+ buffer << part
151
+ end
152
+ res.body = buffer
121
153
  end
122
154
  ensure
123
- body.close if body.respond_to? :close
155
+ body.close if body.respond_to?(:close)
124
156
  end
125
157
  end
126
158
  end
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  module Rackup
4
7
  # *Handlers* connect web servers with Rack.
5
8
  #
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  require 'zlib'
4
7
 
5
8
  require 'rack/constants'
data/lib/rackup/server.rb CHANGED
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  require 'optparse'
4
7
  require 'fileutils'
5
8
 
@@ -0,0 +1,199 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2019-2022, by Samuel Williams.
5
+
6
+ module Rackup
7
+ # The input stream is an IO-like object which contains the raw HTTP POST data. When applicable, its external encoding must be “ASCII-8BIT” and it must be opened in binary mode, for Ruby 1.9 compatibility. The input stream must respond to gets, each, read and rewind.
8
+ class Stream
9
+ def initialize(input = nil, output = Buffered.new)
10
+ @input = input
11
+ @output = output
12
+
13
+ raise ArgumentError, "Non-writable output!" unless output.respond_to?(:write)
14
+
15
+ # Will hold remaining data in `#read`.
16
+ @buffer = nil
17
+ @closed = false
18
+ end
19
+
20
+ attr :input
21
+ attr :output
22
+
23
+ # This provides a read-only interface for data, which is surprisingly tricky to implement correctly.
24
+ module Reader
25
+ # rack.hijack_io must respond to:
26
+ # read, write, read_nonblock, write_nonblock, flush, close, close_read, close_write, closed?
27
+
28
+ # read behaves like IO#read. Its signature is read([length, [buffer]]). If given, length must be a non-negative Integer (>= 0) or nil, and buffer must be a String and may not be nil. If length is given and not nil, then this method reads at most length bytes from the input stream. If length is not given or nil, then this method reads all data until EOF. When EOF is reached, this method returns nil if length is given and not nil, or “” if length is not given or is nil. If buffer is given, then the read data will be placed into buffer instead of a newly created String object.
29
+ # @param length [Integer] the amount of data to read
30
+ # @param buffer [String] the buffer which will receive the data
31
+ # @return a buffer containing the data
32
+ def read(length = nil, buffer = nil)
33
+ return '' if length == 0
34
+
35
+ buffer ||= String.new.force_encoding(Encoding::BINARY)
36
+
37
+ # Take any previously buffered data and replace it into the given buffer.
38
+ if @buffer
39
+ buffer.replace(@buffer)
40
+ @buffer = nil
41
+ else
42
+ buffer.clear
43
+ end
44
+
45
+ if length
46
+ while buffer.bytesize < length and chunk = read_next
47
+ buffer << chunk
48
+ end
49
+
50
+ # This ensures the subsequent `slice!` works correctly.
51
+ buffer.force_encoding(Encoding::BINARY)
52
+
53
+ # This will be at least one copy:
54
+ @buffer = buffer.byteslice(length, buffer.bytesize)
55
+
56
+ # This should be zero-copy:
57
+ buffer.slice!(length, buffer.bytesize)
58
+
59
+ if buffer.empty?
60
+ return nil
61
+ else
62
+ return buffer
63
+ end
64
+ else
65
+ while chunk = read_next
66
+ buffer << chunk
67
+ end
68
+
69
+ return buffer
70
+ end
71
+ end
72
+
73
+ # Read at most `length` bytes from the stream. Will avoid reading from the underlying stream if possible.
74
+ def read_partial(length = nil)
75
+ if @buffer
76
+ buffer = @buffer
77
+ @buffer = nil
78
+ else
79
+ buffer = read_next
80
+ end
81
+
82
+ if buffer and length
83
+ if buffer.bytesize > length
84
+ # This ensures the subsequent `slice!` works correctly.
85
+ buffer.force_encoding(Encoding::BINARY)
86
+
87
+ @buffer = buffer.byteslice(length, buffer.bytesize)
88
+ buffer.slice!(length, buffer.bytesize)
89
+ end
90
+ end
91
+
92
+ return buffer
93
+ end
94
+
95
+ def gets
96
+ read_partial
97
+ end
98
+
99
+ def each
100
+ while chunk = read_partial
101
+ yield chunk
102
+ end
103
+ end
104
+
105
+ def read_nonblock(length, buffer = nil)
106
+ @buffer ||= read_next
107
+ chunk = nil
108
+
109
+ unless @buffer
110
+ buffer&.clear
111
+ return
112
+ end
113
+
114
+ if @buffer.bytesize > length
115
+ chunk = @buffer.byteslice(0, length)
116
+ @buffer = @buffer.byteslice(length, @buffer.bytesize)
117
+ else
118
+ chunk = @buffer
119
+ @buffer = nil
120
+ end
121
+
122
+ if buffer
123
+ buffer.replace(chunk)
124
+ else
125
+ buffer = chunk
126
+ end
127
+
128
+ return buffer
129
+ end
130
+ end
131
+
132
+ include Reader
133
+
134
+ def write(buffer)
135
+ if @output
136
+ @output.write(buffer)
137
+ return buffer.bytesize
138
+ else
139
+ raise IOError, "Stream is not writable, output has been closed!"
140
+ end
141
+ end
142
+
143
+ def write_nonblock(buffer)
144
+ write(buffer)
145
+ end
146
+
147
+ def <<(buffer)
148
+ write(buffer)
149
+ end
150
+
151
+ def flush
152
+ end
153
+
154
+ def close_read
155
+ @input&.close
156
+ @input = nil
157
+ end
158
+
159
+ # close must never be called on the input stream. huh?
160
+ def close_write
161
+ if @output.respond_to?(:close)
162
+ @output&.close
163
+ end
164
+
165
+ @output = nil
166
+ end
167
+
168
+ # Close the input and output bodies.
169
+ def close(error = nil)
170
+ self.close_read
171
+ self.close_write
172
+
173
+ return nil
174
+ ensure
175
+ @closed = true
176
+ end
177
+
178
+ # Whether the stream has been closed.
179
+ def closed?
180
+ @closed
181
+ end
182
+
183
+ # Whether there are any output chunks remaining?
184
+ def empty?
185
+ @output.empty?
186
+ end
187
+
188
+ private
189
+
190
+ def read_next
191
+ if @input
192
+ return @input.read
193
+ else
194
+ @input = nil
195
+ raise IOError, "Stream is not readable, input has been closed!"
196
+ end
197
+ end
198
+ end
199
+ end
@@ -1,25 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2022, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
22
5
 
23
6
  module Rackup
24
- VERSION = "0.2.2"
7
+ VERSION = "2.1.0"
25
8
  end
data/lib/rackup.rb CHANGED
@@ -1,8 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Released under the MIT License.
4
+ # Copyright, 2022-2023, by Samuel Williams.
5
+
3
6
  require_relative 'rackup/handler'
4
7
  require_relative 'rackup/server'
5
8
  require_relative 'rackup/version'
6
9
 
7
10
  require_relative 'rackup/handler/webrick'
8
- require_relative 'rackup/handler/cgi'
11
+ require_relative 'rackup/handler/cgi'
data/license.md ADDED
@@ -0,0 +1,78 @@
1
+ # MIT License
2
+
3
+ Copyright, 2007-2009, by Leah Neukirchen.
4
+ Copyright, 2008, by Marc-André Cournoyer.
5
+ Copyright, 2009, by Aaron Pfeifer.
6
+ Copyright, 2009-2010, by Megan Batty.
7
+ Copyright, 2009-2010, by Michael Fellinger.
8
+ Copyright, 2009, by Genki Takiuchi.
9
+ Copyright, 2009, by Joshua Peek.
10
+ Copyright, 2009, by Yehuda Katz + Carl Lerche.
11
+ Copyright, 2009, by Carl Lerche.
12
+ Copyright, 2010, by Julik Tarkhanov.
13
+ Copyright, 2010-2016, by James Tucker.
14
+ Copyright, 2010, by Timur Batyrshin.
15
+ Copyright, 2010, by Loren Segal.
16
+ Copyright, 2010, by Andrew Bortz.
17
+ Copyright, 2010, by John Barnette.
18
+ Copyright, 2010, by John Sumsion.
19
+ Copyright, 2011-2018, by Aaron Patterson.
20
+ Copyright, 2011, by Konstantin Haase.
21
+ Copyright, 2011, by Blake Mizerany.
22
+ Copyright, 2011, by Tsutomu Kuroda.
23
+ Copyright, 2012, by Jean Boussier.
24
+ Copyright, 2012, by Trevor Wennblom.
25
+ Copyright, 2012, by Anurag Priyam.
26
+ Copyright, 2012, by Hrvoje Šimić.
27
+ Copyright, 2013, by Uchio KONDO.
28
+ Copyright, 2013, by Tim Moore.
29
+ Copyright, 2013, by Postmodern.
30
+ Copyright, 2013, by Bas Vodde.
31
+ Copyright, 2013, by Joe Fiorini.
32
+ Copyright, 2014, by Wyatt Pan.
33
+ Copyright, 2014, by Lenny Marks.
34
+ Copyright, 2014, by Igor Bochkariov.
35
+ Copyright, 2014, by Max Cantor.
36
+ Copyright, 2014, by David Celis.
37
+ Copyright, 2014, by Rafael Mendonça França.
38
+ Copyright, 2014, by Jeremy Kemper.
39
+ Copyright, 2014, by Richard Schneeman.
40
+ Copyright, 2015, by Peter Wilmott.
41
+ Copyright, 2015, by Sean McGivern.
42
+ Copyright, 2015, by Tadashi Saito.
43
+ Copyright, 2015, by deepj.
44
+ Copyright, 2015, by Zachary Scott.
45
+ Copyright, 2016, by Sophie Deziel.
46
+ Copyright, 2016, by Kazuya Hotta.
47
+ Copyright, 2017, by Ryunosuke Sato.
48
+ Copyright, 2017-2023, by Samuel Williams.
49
+ Copyright, 2018, by Dillon Welch.
50
+ Copyright, 2018, by Yoshiyuki Hirano.
51
+ Copyright, 2018, by Nick LaMuro.
52
+ Copyright, 2019, by Rafael França.
53
+ Copyright, 2019, by Krzysztof Rybka.
54
+ Copyright, 2019, by Misaki Shioi.
55
+ Copyright, 2020-2022, by Jeremy Evans.
56
+ Copyright, 2021, by Katsuhiko YOSHIDA.
57
+ Copyright, 2021, by KS.
58
+ Copyright, 2021, by Stephen Paul Weber.
59
+ Copyright, 2022, by Akira Matsuda.
60
+ Copyright, 2022, by Andrew Hoglund.
61
+
62
+ Permission is hereby granted, free of charge, to any person obtaining a copy
63
+ of this software and associated documentation files (the "Software"), to deal
64
+ in the Software without restriction, including without limitation the rights
65
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
66
+ copies of the Software, and to permit persons to whom the Software is
67
+ furnished to do so, subject to the following conditions:
68
+
69
+ The above copyright notice and this permission notice shall be included in all
70
+ copies or substantial portions of the Software.
71
+
72
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
73
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
74
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
75
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
76
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
77
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
78
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,31 @@
1
+ # Rackup
2
+
3
+ `rackup` provides a command line interface for running a Rack-compatible application.
4
+
5
+ [![Development Status](https://github.com/rack/rackup/workflows/Test/badge.svg)](https://github.com/rack/rackup/actions?workflow=Test)
6
+
7
+ ## Installation
8
+
9
+ ``` bash
10
+ $ gem install rackup
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ In a directory with your `config.ru` simply run the command:
16
+
17
+ ``` bash
18
+ $ rackup
19
+ ```
20
+
21
+ Your application should now be available locally, typically `http://localhost:9292`.
22
+
23
+ ## Contributing
24
+
25
+ We welcome contributions to this project.
26
+
27
+ 1. Fork it.
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
30
+ 4. Push to the branch (`git push origin my-new-feature`).
31
+ 5. Create new Pull Request.
data/security.md ADDED
@@ -0,0 +1,3 @@
1
+ # Security Policy
2
+
3
+ Please see our main security policy: https://github.com/rack/rack/security/policy
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rackup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
- - Rack Contributors
7
+ - Samuel Williams
8
+ - Jeremy Evans
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2022-08-10 00:00:00.000000000 Z
12
+ date: 2023-01-27 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rack
@@ -16,56 +17,56 @@ dependencies:
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 3.0.0.beta1
20
+ version: '3'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 3.0.0.beta1
27
+ version: '3'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: webrick
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - ">="
32
+ - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '0'
34
+ version: '1.8'
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - ">="
39
+ - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: '0'
41
+ version: '1.8'
41
42
  - !ruby/object:Gem::Dependency
42
- name: minitest
43
+ name: bundler
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
- - - "~>"
46
+ - - ">="
46
47
  - !ruby/object:Gem::Version
47
- version: '5.0'
48
+ version: '0'
48
49
  type: :development
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
- - - "~>"
53
+ - - ">="
53
54
  - !ruby/object:Gem::Version
54
- version: '5.0'
55
+ version: '0'
55
56
  - !ruby/object:Gem::Dependency
56
- name: minitest-sprint
57
+ name: minitest
57
58
  requirement: !ruby/object:Gem::Requirement
58
59
  requirements:
59
- - - ">="
60
+ - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '0'
62
+ version: '5.0'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
- - - ">="
67
+ - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '0'
69
+ version: '5.0'
69
70
  - !ruby/object:Gem::Dependency
70
71
  name: minitest-global_expectations
71
72
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +82,7 @@ dependencies:
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  - !ruby/object:Gem::Dependency
84
- name: bundler
85
+ name: minitest-sprint
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - ">="
@@ -115,7 +116,6 @@ executables:
115
116
  extensions: []
116
117
  extra_rdoc_files: []
117
118
  files:
118
- - LICENSE.md
119
119
  - bin/rackup
120
120
  - lib/rack/handler.rb
121
121
  - lib/rack/server.rb
@@ -125,7 +125,11 @@ files:
125
125
  - lib/rackup/handler/webrick.rb
126
126
  - lib/rackup/lobster.rb
127
127
  - lib/rackup/server.rb
128
+ - lib/rackup/stream.rb
128
129
  - lib/rackup/version.rb
130
+ - license.md
131
+ - readme.md
132
+ - security.md
129
133
  homepage: https://github.com/rack/rackup
130
134
  licenses:
131
135
  - MIT
@@ -145,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
149
  - !ruby/object:Gem::Version
146
150
  version: '0'
147
151
  requirements: []
148
- rubygems_version: 3.3.7
152
+ rubygems_version: 3.4.1
149
153
  signing_key:
150
154
  specification_version: 4
151
155
  summary: A general server command for Rack applications.
data/LICENSE.md DELETED
@@ -1,22 +0,0 @@
1
- Released under the MIT license.
2
-
3
- Copyright, 2007-2021, by [Leah Neukirchen](https://leahneukirchen.org).
4
- Copyright, 2022, by [Samuel G. D. Williams](https://www.codeotaku.com).
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.