rackup 1.0.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/rackup +5 -0
- data/lib/rackup/handler/cgi.rb +61 -0
- data/lib/rackup/handler/webrick.rb +196 -0
- data/lib/rackup/handler.rb +113 -0
- data/lib/rackup/lobster.rb +81 -0
- data/lib/rackup/server.rb +462 -0
- data/lib/rackup/stream.rb +199 -0
- data/lib/rackup/version.rb +2 -2
- data/lib/rackup.rb +15 -0
- data/license.md +60 -2
- data/readme.md +53 -2
- data/releases.md +28 -0
- metadata +78 -97
data/license.md
CHANGED
|
@@ -1,7 +1,65 @@
|
|
|
1
1
|
# MIT License
|
|
2
2
|
|
|
3
|
-
Copyright,
|
|
4
|
-
Copyright,
|
|
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.
|
|
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 Hal Brodigan.
|
|
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-2019, by Rafael 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 Martin Hrdlicka.
|
|
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-2024, 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 Krzysztof Rybka.
|
|
53
|
+
Copyright, 2019, by Misaki Shioi.
|
|
54
|
+
Copyright, 2020-2022, by Jeremy Evans.
|
|
55
|
+
Copyright, 2021, by Katsuhiko Yoshida.
|
|
56
|
+
Copyright, 2021, by Kang Sheng.
|
|
57
|
+
Copyright, 2021, by Stephen Paul Weber.
|
|
58
|
+
Copyright, 2022, by Akira Matsuda.
|
|
59
|
+
Copyright, 2022, by Andrew Hoglund.
|
|
60
|
+
Copyright, 2024, by Olle Jonsson.
|
|
61
|
+
Copyright, 2024, by Geremia Taglialatela.
|
|
62
|
+
Copyright, 2024, by Petrik de Heus.
|
|
5
63
|
|
|
6
64
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
65
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# Rackup
|
|
2
2
|
|
|
3
|
-
`rackup` provides a command line interface for running a Rack-compatible application.
|
|
3
|
+
`rackup` provides a command line interface for running a Rack-compatible application. It also provides a generic interface for starting a `rack`-compatible server: `Rackup::Handler`. It is not designed for production use.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/rack/rackup/actions?workflow=Test)
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
``` bash
|
|
10
|
-
|
|
10
|
+
-- For Puma
|
|
11
|
+
$ gem install rackup puma
|
|
12
|
+
|
|
13
|
+
-- For Falcon
|
|
14
|
+
$ gem install rackup falcon
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
## Usage
|
|
@@ -20,6 +24,53 @@ $ rackup
|
|
|
20
24
|
|
|
21
25
|
Your application should now be available locally, typically `http://localhost:9292`.
|
|
22
26
|
|
|
27
|
+
### Server Handler
|
|
28
|
+
|
|
29
|
+
You can also use `Rackup::Handler` to start a server programmatically:
|
|
30
|
+
|
|
31
|
+
``` ruby
|
|
32
|
+
require 'rackup'
|
|
33
|
+
|
|
34
|
+
# Use the default server:
|
|
35
|
+
handler = Rackup::Handler.default
|
|
36
|
+
handler.run(app, **options)
|
|
37
|
+
|
|
38
|
+
# Use a specific server:
|
|
39
|
+
handler = Rackup::Handler.get('puma')
|
|
40
|
+
handler.run(app, **options)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Do not require specific handlers or assume they will exist/work. Instead, use the `default` method to get the best available handler.
|
|
44
|
+
|
|
45
|
+
## (Soft) Deprecation
|
|
46
|
+
|
|
47
|
+
For a long time, `rackup` (the executable and implementation) was part of `rack`, and `webrick` was the default server, included with Ruby. It made it easy to run a Rack application without having to worry about the details of the server - great for documentation and demos.
|
|
48
|
+
|
|
49
|
+
When `webrick` was removed from the Ruby standard library, `rack` started depending on `webrick` as a default server. Every web application and server would pull in `webrick` as a dependency, even if it was not used. To avoid this, the `rackup` component of `rack` was moved to this gem, which depended on `webrick`.
|
|
50
|
+
|
|
51
|
+
However, many libraries (e.g. `rails`) still depend on `rackup` and end up pulling in `webrick` as a dependency. To avoid this, the decision was made to cut `webrick` as a dependency of `rackup`. This means that `rackup` no longer depends on `webrick`, and you need to install it separately if you want to use it.
|
|
52
|
+
|
|
53
|
+
As a consequence of this, the value of the `rackup` gem is further diminished. In other words, why would you do this:
|
|
54
|
+
|
|
55
|
+
``` bash
|
|
56
|
+
$ gem install rackup puma
|
|
57
|
+
$ rackup ...
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
when you can do this:
|
|
61
|
+
|
|
62
|
+
``` bash
|
|
63
|
+
$ gem install puma
|
|
64
|
+
$ puma ...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
In summary, the maintainers of `rack` recommend the following:
|
|
68
|
+
|
|
69
|
+
- Libraries should not depend on `rackup` if possible. `rackup` as an executable made sense when webrick shipped with Ruby, so there was always a fallback. But that hasn't been true since Ruby 3.0.
|
|
70
|
+
- Frameworks and applications should focus on providing `config.ru` files, so that users can use the webserver program of their choice directly (e.g. puma, falcon).
|
|
71
|
+
- There is still some value in the generic `rackup` and `Rackup::Handler` interfaces, but we encourage users to invoke the server command directly if possible.
|
|
72
|
+
- Webrick should be avoided if possible.
|
|
73
|
+
|
|
23
74
|
## Contributing
|
|
24
75
|
|
|
25
76
|
We welcome contributions to this project.
|
data/releases.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Releases
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
|
+
|
|
5
|
+
## v2.2.1
|
|
6
|
+
|
|
7
|
+
- Try to require `webrick` and `rackup/handler/webrick` by default, for compatibility with code that expects them to be available.
|
|
8
|
+
|
|
9
|
+
## v2.2.0
|
|
10
|
+
|
|
11
|
+
- Remove old rack shims.
|
|
12
|
+
- Remove `webrick` dependency.
|
|
13
|
+
|
|
14
|
+
## v2.1.0
|
|
15
|
+
|
|
16
|
+
- Correctly support streaming responses with `webrick`.
|
|
17
|
+
|
|
18
|
+
## v2.0.0
|
|
19
|
+
|
|
20
|
+
- Initial release and migration of code from `rack`.
|
|
21
|
+
|
|
22
|
+
## v1.0.1
|
|
23
|
+
|
|
24
|
+
- Fix `rackup.rb` invalid requires.
|
|
25
|
+
|
|
26
|
+
## v1.0.0
|
|
27
|
+
|
|
28
|
+
- Initial release of empty shim for Rack v2.
|
metadata
CHANGED
|
@@ -1,130 +1,112 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rackup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
8
|
+
- James Tucker
|
|
9
|
+
- Leah Neukirchen
|
|
8
10
|
- Jeremy Evans
|
|
9
|
-
|
|
11
|
+
- Joshua Peek
|
|
12
|
+
- Megan Batty
|
|
13
|
+
- Rafael França
|
|
14
|
+
- Anurag Priyam
|
|
15
|
+
- Max Cantor
|
|
16
|
+
- Michael Fellinger
|
|
17
|
+
- Sophie Deziel
|
|
18
|
+
- Yoshiyuki Hirano
|
|
19
|
+
- Aaron Patterson
|
|
20
|
+
- Jean Boussier
|
|
21
|
+
- Katsuhiko Yoshida
|
|
22
|
+
- Konstantin Haase
|
|
23
|
+
- Krzysztof Rybka
|
|
24
|
+
- Martin Hrdlicka
|
|
25
|
+
- Nick LaMuro
|
|
26
|
+
- Aaron Pfeifer
|
|
27
|
+
- Akira Matsuda
|
|
28
|
+
- Andrew Bortz
|
|
29
|
+
- Andrew Hoglund
|
|
30
|
+
- Bas Vodde
|
|
31
|
+
- Blake Mizerany
|
|
32
|
+
- Carl Lerche
|
|
33
|
+
- David Celis
|
|
34
|
+
- Dillon Welch
|
|
35
|
+
- Genki Takiuchi
|
|
36
|
+
- Geremia Taglialatela
|
|
37
|
+
- Hal Brodigan
|
|
38
|
+
- Hrvoje Šimić
|
|
39
|
+
- Igor Bochkariov
|
|
40
|
+
- Jeremy Kemper
|
|
41
|
+
- Joe Fiorini
|
|
42
|
+
- John Barnette
|
|
43
|
+
- John Sumsion
|
|
44
|
+
- Julik Tarkhanov
|
|
45
|
+
- Kang Sheng
|
|
46
|
+
- Kazuya Hotta
|
|
47
|
+
- Lenny Marks
|
|
48
|
+
- Loren Segal
|
|
49
|
+
- Marc-André Cournoyer
|
|
50
|
+
- Misaki Shioi
|
|
51
|
+
- Olle Jonsson
|
|
52
|
+
- Peter Wilmott
|
|
53
|
+
- Petrik de Heus
|
|
54
|
+
- Richard Schneeman
|
|
55
|
+
- Ryunosuke Sato
|
|
56
|
+
- Sean McGivern
|
|
57
|
+
- Stephen Paul Weber
|
|
58
|
+
- Tadashi Saito
|
|
59
|
+
- Tim Moore
|
|
60
|
+
- Timur Batyrshin
|
|
61
|
+
- Trevor Wennblom
|
|
62
|
+
- Tsutomu Kuroda
|
|
63
|
+
- Uchio Kondo
|
|
64
|
+
- Wyatt Pan
|
|
65
|
+
- Yehuda Katz
|
|
66
|
+
- Zachary Scott
|
|
10
67
|
bindir: bin
|
|
11
68
|
cert_chain: []
|
|
12
|
-
date:
|
|
69
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
70
|
dependencies:
|
|
14
71
|
- !ruby/object:Gem::Dependency
|
|
15
72
|
name: rack
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - "<"
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '3'
|
|
21
|
-
type: :runtime
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - "<"
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: '3'
|
|
28
|
-
- !ruby/object:Gem::Dependency
|
|
29
|
-
name: webrick
|
|
30
73
|
requirement: !ruby/object:Gem::Requirement
|
|
31
74
|
requirements:
|
|
32
75
|
- - ">="
|
|
33
76
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
77
|
+
version: '3'
|
|
35
78
|
type: :runtime
|
|
36
79
|
prerelease: false
|
|
37
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
81
|
requirements:
|
|
39
82
|
- - ">="
|
|
40
83
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
|
45
|
-
requirements:
|
|
46
|
-
- - ">="
|
|
47
|
-
- !ruby/object:Gem::Version
|
|
48
|
-
version: '0'
|
|
49
|
-
type: :development
|
|
50
|
-
prerelease: false
|
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
-
requirements:
|
|
53
|
-
- - ">="
|
|
54
|
-
- !ruby/object:Gem::Version
|
|
55
|
-
version: '0'
|
|
56
|
-
- !ruby/object:Gem::Dependency
|
|
57
|
-
name: minitest
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - "~>"
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '5.0'
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - "~>"
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '5.0'
|
|
70
|
-
- !ruby/object:Gem::Dependency
|
|
71
|
-
name: minitest-global_expectations
|
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
74
|
-
- - ">="
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: '0'
|
|
77
|
-
type: :development
|
|
78
|
-
prerelease: false
|
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
-
requirements:
|
|
81
|
-
- - ">="
|
|
82
|
-
- !ruby/object:Gem::Version
|
|
83
|
-
version: '0'
|
|
84
|
-
- !ruby/object:Gem::Dependency
|
|
85
|
-
name: minitest-sprint
|
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - ">="
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: '0'
|
|
91
|
-
type: :development
|
|
92
|
-
prerelease: false
|
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
requirements:
|
|
95
|
-
- - ">="
|
|
96
|
-
- !ruby/object:Gem::Version
|
|
97
|
-
version: '0'
|
|
98
|
-
- !ruby/object:Gem::Dependency
|
|
99
|
-
name: rake
|
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
|
101
|
-
requirements:
|
|
102
|
-
- - ">="
|
|
103
|
-
- !ruby/object:Gem::Version
|
|
104
|
-
version: '0'
|
|
105
|
-
type: :development
|
|
106
|
-
prerelease: false
|
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
-
requirements:
|
|
109
|
-
- - ">="
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '0'
|
|
112
|
-
description:
|
|
113
|
-
email:
|
|
114
|
-
executables: []
|
|
84
|
+
version: '3'
|
|
85
|
+
executables:
|
|
86
|
+
- rackup
|
|
115
87
|
extensions: []
|
|
116
88
|
extra_rdoc_files: []
|
|
117
89
|
files:
|
|
90
|
+
- bin/rackup
|
|
118
91
|
- lib/rackup.rb
|
|
92
|
+
- lib/rackup/handler.rb
|
|
93
|
+
- lib/rackup/handler/cgi.rb
|
|
94
|
+
- lib/rackup/handler/webrick.rb
|
|
95
|
+
- lib/rackup/lobster.rb
|
|
96
|
+
- lib/rackup/server.rb
|
|
97
|
+
- lib/rackup/stream.rb
|
|
119
98
|
- lib/rackup/version.rb
|
|
120
99
|
- license.md
|
|
121
100
|
- readme.md
|
|
101
|
+
- releases.md
|
|
122
102
|
- security.md
|
|
123
103
|
homepage: https://github.com/rack/rackup
|
|
124
104
|
licenses:
|
|
125
105
|
- MIT
|
|
126
|
-
metadata:
|
|
127
|
-
|
|
106
|
+
metadata:
|
|
107
|
+
changelog_uri: https://github.com/rack/rackup/blob/main/releases.md
|
|
108
|
+
rubygems_mfa_required: 'true'
|
|
109
|
+
source_code_uri: https://github.com/rack/rackup.git
|
|
128
110
|
rdoc_options: []
|
|
129
111
|
require_paths:
|
|
130
112
|
- lib
|
|
@@ -132,15 +114,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
132
114
|
requirements:
|
|
133
115
|
- - ">="
|
|
134
116
|
- !ruby/object:Gem::Version
|
|
135
|
-
version: 2.
|
|
117
|
+
version: '2.5'
|
|
136
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
119
|
requirements:
|
|
138
120
|
- - ">="
|
|
139
121
|
- !ruby/object:Gem::Version
|
|
140
122
|
version: '0'
|
|
141
123
|
requirements: []
|
|
142
|
-
rubygems_version: 3.
|
|
143
|
-
signing_key:
|
|
124
|
+
rubygems_version: 3.6.9
|
|
144
125
|
specification_version: 4
|
|
145
126
|
summary: A general server command for Rack applications.
|
|
146
127
|
test_files: []
|