sinatra 3.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sinatra might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/AUTHORS.md +14 -8
- data/CHANGELOG.md +24 -0
- data/Gemfile +16 -11
- data/README.md +5 -101
- data/Rakefile +17 -5
- data/SECURITY.md +1 -1
- data/VERSION +1 -1
- data/examples/stream.ru +0 -1
- data/lib/sinatra/base.rb +17 -5
- data/lib/sinatra/indifferent_hash.rb +10 -2
- data/lib/sinatra/version.rb +1 -1
- data/sinatra.gemspec +0 -2
- metadata +8 -24
- data/examples/rainbows.conf +0 -3
- data/examples/rainbows.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eddf8c0c677b8b8b7f15bb03834147034ead41bc6310bf773ac84712bb43a14
|
4
|
+
data.tar.gz: c35de3457f199d57a3c8a4419bd0ad113df38ba071cfffbcc79311db910bc1cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33e0785425af5a32c7e09d95e2d11e02d83cdda1d907b34197c63642bfec81cd04a40ffc2e25486fe45af66d9a681f57c41d083d7bc56f24b69f1cf4b3a478f6
|
7
|
+
data.tar.gz: 6aa65f3b65c819171bcadb61a3a43c3ff7af748d29a9177dbd02549229e3b9fa64b338d0404383b97615e74aa5381dd8a4c997edbf86ca0e8a2970e0213b2ece
|
data/AUTHORS.md
CHANGED
@@ -2,31 +2,37 @@ Sinatra was designed and developed by Blake Mizerany in California.
|
|
2
2
|
|
3
3
|
### Current Team
|
4
4
|
|
5
|
-
* **
|
5
|
+
* **Eloy Perez**
|
6
|
+
* **Jordan Owens**
|
7
|
+
* **Olle Jonsson**
|
8
|
+
* **Patrik Ragnarsson**
|
6
9
|
* **Zachary Scott**
|
7
|
-
* **Kashyap Kondamudi**
|
8
|
-
* **Ashley Williams**
|
9
|
-
* **Trevor Bramble**
|
10
|
-
* **Kunpei Sakai**
|
11
10
|
|
12
11
|
### Alumni
|
13
12
|
|
14
13
|
* **Blake Mizerany** (creator)
|
14
|
+
* **Konstantin Haase** (maintainer)
|
15
15
|
* **Ryan Tomayko**
|
16
16
|
* **Simon Rozet**
|
17
17
|
* **Katrina Owen**
|
18
|
+
* **Kashyap Kondamudi**
|
19
|
+
* **Ashley Williams**
|
20
|
+
* **Trevor Bramble**
|
21
|
+
* **Kunpei Sakai**
|
18
22
|
|
19
23
|
### Thanks
|
20
24
|
|
21
25
|
Sinatra would not have been possible without strong company backing.
|
22
26
|
In the past, financial and emotional support have been provided mainly by
|
23
|
-
[Heroku](
|
24
|
-
[Engine Yard](http://www.engineyard.com/)
|
25
|
-
[
|
27
|
+
[Heroku](https://heroku.com), [GitHub](https://github.com),
|
28
|
+
[Engine Yard](http://www.engineyard.com/) and [Travis CI](https://travis-ci.com/),
|
29
|
+
and is now taken care of by [84codes](https://www.84codes.com/).
|
26
30
|
|
27
31
|
Special thanks to the following extraordinary individuals, without whom
|
28
32
|
Sinatra would not be possible:
|
29
33
|
|
34
|
+
* [Benoit Daloze](https://eregon.me/blog/) (eregon) for help around TruffleRuby
|
35
|
+
and keyword arguments use in mustermann.
|
30
36
|
* [Ryan Tomayko](http://tomayko.com/) (rtomayko) for constantly fixing
|
31
37
|
whitespace errors __60d5006__
|
32
38
|
* [Ezra Zygmuntowicz](http://brainspl.at/) (ezmobius) for initial help and
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,29 @@
|
|
2
2
|
|
3
3
|
* _Your new feature here._
|
4
4
|
|
5
|
+
## 3.2.0 / 2023-12-29
|
6
|
+
|
7
|
+
* New: Add `#except` method to `Sinatra::IndifferentHash` ([#1940])
|
8
|
+
|
9
|
+
* New: Use `Exception#detailed_message` to show backtrace ([#1952])
|
10
|
+
|
11
|
+
* New: Add `Sinatra::HamlHelpers` to sinatra-contrib ([#1960])
|
12
|
+
|
13
|
+
* Fix: Add `base64` to rack-protection runtime dependencies ([#1946])
|
14
|
+
|
15
|
+
* Fix: Avoid open-ended dependencies for sinatra-contrib and rack-protection ([#1949])
|
16
|
+
|
17
|
+
* Fix: Helpful message when `Sinatra::Runner` times out ([#1975])
|
18
|
+
|
19
|
+
* Fix: Ruby 3.3 + Bundler 2.5 compatibility ([#1975])
|
20
|
+
|
21
|
+
[#1940]: https://github.com/sinatra/sinatra/pull/1940
|
22
|
+
[#1946]: https://github.com/sinatra/sinatra/pull/1946
|
23
|
+
[#1949]: https://github.com/sinatra/sinatra/pull/1949
|
24
|
+
[#1952]: https://github.com/sinatra/sinatra/pull/1952
|
25
|
+
[#1960]: https://github.com/sinatra/sinatra/pull/1960
|
26
|
+
[#1975]: https://github.com/sinatra/sinatra/pull/1960
|
27
|
+
|
5
28
|
## 3.1.0 / 2023-08-07
|
6
29
|
|
7
30
|
* New: Add sass support via sass-embedded [#1911] by なつき
|
@@ -16,6 +39,7 @@
|
|
16
39
|
|
17
40
|
* Fix: rack-protection: specify rack version requirement [#1932] by Patrik Ragnarsson
|
18
41
|
|
42
|
+
[#1911]: https://github.com/sinatra/sinatra/pull/1911
|
19
43
|
[#1913]: https://github.com/sinatra/sinatra/pull/1913
|
20
44
|
[#1900]: https://github.com/sinatra/sinatra/pull/1900
|
21
45
|
[#1924]: https://github.com/sinatra/sinatra/pull/1924
|
data/Gemfile
CHANGED
@@ -24,9 +24,9 @@ puma_version = { github: 'puma/puma' } if puma_version == 'head'
|
|
24
24
|
gem 'puma', puma_version
|
25
25
|
|
26
26
|
gem 'minitest', '~> 5.0'
|
27
|
-
gem 'rack-test'
|
27
|
+
gem 'rack-test'
|
28
28
|
gem 'rubocop', '~> 1.32.0', require: false
|
29
|
-
gem 'yard'
|
29
|
+
gem 'yard' # used by rake doc
|
30
30
|
|
31
31
|
gem 'rack-protection', path: 'rack-protection'
|
32
32
|
gem 'sinatra-contrib', path: 'sinatra-contrib'
|
@@ -37,10 +37,9 @@ gem 'sinatra-contrib', path: 'sinatra-contrib'
|
|
37
37
|
# https://github.com/socketry/async-http/pull/124/files#r1237988899
|
38
38
|
gem 'traces', '< 0.10.0' if RUBY_VERSION >= '2.6.0' && RUBY_VERSION < '2.7.0'
|
39
39
|
|
40
|
-
gem 'activesupport', '~> 6.1'
|
41
|
-
|
42
40
|
gem 'asciidoctor'
|
43
41
|
gem 'builder'
|
42
|
+
gem 'childprocess'
|
44
43
|
gem 'commonmarker', '~> 0.23.4', platforms: [:ruby]
|
45
44
|
gem 'erubi'
|
46
45
|
gem 'eventmachine'
|
@@ -48,19 +47,25 @@ gem 'falcon', '~> 0.40', platforms: [:ruby]
|
|
48
47
|
gem 'haml', '~> 6'
|
49
48
|
gem 'kramdown'
|
50
49
|
gem 'liquid'
|
51
|
-
|
50
|
+
# markaby 0.9.1 introduced Ruby 2.7 syntax in https://github.com/markaby/markaby/pull/44
|
51
|
+
# and does not specify required_ruby_version
|
52
|
+
if RUBY_VERSION >= '2.6.0' && RUBY_VERSION < '2.7.0'
|
53
|
+
gem 'markaby', '< 0.9.1'
|
54
|
+
else
|
55
|
+
gem 'markaby'
|
56
|
+
end
|
52
57
|
gem 'nokogiri', '> 1.5.0'
|
53
58
|
gem 'pandoc-ruby', '~> 2.0.2'
|
54
59
|
gem 'rabl'
|
55
|
-
|
56
|
-
gem 'rdiscount',
|
60
|
+
if RUBY_ENGINE == 'truffleruby'
|
61
|
+
gem 'rdiscount', '< 2.2.7.2' # https://github.com/oracle/truffleruby/issues/3362
|
62
|
+
else
|
63
|
+
gem 'rdiscount', platforms: [:ruby]
|
64
|
+
end
|
57
65
|
gem 'rdoc'
|
58
66
|
gem 'redcarpet', platforms: [:ruby]
|
59
67
|
gem 'sass-embedded', '~> 1.54'
|
60
68
|
gem 'simplecov', require: false
|
61
69
|
gem 'slim', '~> 4'
|
62
70
|
gem 'yajl-ruby', platforms: [:ruby]
|
63
|
-
|
64
|
-
gem 'json', platforms: %i[jruby mri]
|
65
|
-
|
66
|
-
gem 'jar-dependencies', '= 0.4.1', platforms: [:jruby] # Gem::LoadError with jar-dependencies 0.4.2
|
71
|
+
gem 'zeitwerk'
|
data/README.md
CHANGED
@@ -846,7 +846,7 @@ It also takes a block for inline templates (see [example](#inline-templates)).
|
|
846
846
|
<table>
|
847
847
|
<tr>
|
848
848
|
<td>Dependency</td>
|
849
|
-
<td><a href="
|
849
|
+
<td><a href="https://slim-template.github.io/" title="Slim Lang">Slim Lang</a></td>
|
850
850
|
</tr>
|
851
851
|
<tr>
|
852
852
|
<td>File Extension</td>
|
@@ -1199,22 +1199,6 @@ $ ruby -e "require 'securerandom'; puts SecureRandom.hex(64)"
|
|
1199
1199
|
99ae8af...snip...ec0f262ac
|
1200
1200
|
```
|
1201
1201
|
|
1202
|
-
**Session Secret Generation (Bonus Points)**
|
1203
|
-
|
1204
|
-
Use the [sysrandom gem](https://github.com/cryptosphere/sysrandom#readme) to
|
1205
|
-
use the system RNG facilities to generate random values instead of
|
1206
|
-
userspace `OpenSSL` which MRI Ruby currently defaults to:
|
1207
|
-
|
1208
|
-
```text
|
1209
|
-
$ gem install sysrandom
|
1210
|
-
Building native extensions. This could take a while...
|
1211
|
-
Successfully installed sysrandom-1.x
|
1212
|
-
1 gem installed
|
1213
|
-
|
1214
|
-
$ ruby -e "require 'sysrandom/securerandom'; puts SecureRandom.hex(64)"
|
1215
|
-
99ae8af...snip...ec0f262ac
|
1216
|
-
```
|
1217
|
-
|
1218
1202
|
**Session Secret Environment Variable**
|
1219
1203
|
|
1220
1204
|
Set a `SESSION_SECRET` environment variable for Sinatra to the value you
|
@@ -1229,14 +1213,10 @@ purposes only:
|
|
1229
1213
|
**Session Secret App Config**
|
1230
1214
|
|
1231
1215
|
Set up your app config to fail-safe to a secure random secret
|
1232
|
-
if the `SESSION_SECRET` environment variable is not available
|
1233
|
-
|
1234
|
-
For bonus points use the [sysrandom
|
1235
|
-
gem](https://github.com/cryptosphere/sysrandom#readme) here as well:
|
1216
|
+
if the `SESSION_SECRET` environment variable is not available:
|
1236
1217
|
|
1237
1218
|
```ruby
|
1238
1219
|
require 'securerandom'
|
1239
|
-
# -or- require 'sysrandom/securerandom'
|
1240
1220
|
set :session_secret, ENV.fetch('SESSION_SECRET') { SecureRandom.hex(64) }
|
1241
1221
|
```
|
1242
1222
|
|
@@ -1441,53 +1421,9 @@ to `stream` finishes executing. Streaming does not work at all with Shotgun.
|
|
1441
1421
|
|
1442
1422
|
If the optional parameter is set to `keep_open`, it will not call `close` on
|
1443
1423
|
the stream object, allowing you to close it at any later point in the
|
1444
|
-
execution flow.
|
1445
|
-
Other servers will still close the stream:
|
1446
|
-
|
1447
|
-
```ruby
|
1448
|
-
# config.ru
|
1449
|
-
require 'sinatra/base'
|
1450
|
-
|
1451
|
-
class App < Sinatra::Base
|
1452
|
-
connections = []
|
1424
|
+
execution flow.
|
1453
1425
|
|
1454
|
-
|
1455
|
-
# register a client's interest in server events
|
1456
|
-
stream(:keep_open) do |out|
|
1457
|
-
connections << out
|
1458
|
-
# purge dead connections
|
1459
|
-
connections.reject!(&:closed?)
|
1460
|
-
end
|
1461
|
-
end
|
1462
|
-
|
1463
|
-
post '/' do
|
1464
|
-
connections.each do |out|
|
1465
|
-
# notify client that a new message has arrived
|
1466
|
-
out << "data: #{params[:msg]}\n\n"
|
1467
|
-
|
1468
|
-
# indicate client to connect again
|
1469
|
-
out.close
|
1470
|
-
end
|
1471
|
-
|
1472
|
-
204 # response without entity body
|
1473
|
-
end
|
1474
|
-
end
|
1475
|
-
|
1476
|
-
run App
|
1477
|
-
```
|
1478
|
-
|
1479
|
-
```ruby
|
1480
|
-
# rainbows.conf
|
1481
|
-
Rainbows! do
|
1482
|
-
use :EventMachine
|
1483
|
-
end
|
1484
|
-
````
|
1485
|
-
|
1486
|
-
Run:
|
1487
|
-
|
1488
|
-
```shell
|
1489
|
-
rainbows -c rainbows.conf
|
1490
|
-
```
|
1426
|
+
You can have a look at the [chat example](https://github.com/sinatra/sinatra/blob/main/examples/chat.rb)
|
1491
1427
|
|
1492
1428
|
It's also possible for the client to close the connection when trying to
|
1493
1429
|
write to the socket. Because of this, it's recommended to check
|
@@ -2878,39 +2814,7 @@ by Konstantin_
|
|
2878
2814
|
Sinatra doesn't impose any concurrency model but leaves that to the
|
2879
2815
|
underlying Rack handler (server) like Puma or WEBrick. Sinatra
|
2880
2816
|
itself is thread-safe, so there won't be any problem if the Rack handler
|
2881
|
-
uses a threaded model of concurrency.
|
2882
|
-
the server, you'd have to specify the correct invocation method for the
|
2883
|
-
specific Rack handler. The following example is a demonstration of how
|
2884
|
-
to start a multi-threaded Rainbows server:
|
2885
|
-
|
2886
|
-
```ruby
|
2887
|
-
# config.ru
|
2888
|
-
|
2889
|
-
require 'sinatra/base'
|
2890
|
-
|
2891
|
-
class App < Sinatra::Base
|
2892
|
-
get '/' do
|
2893
|
-
"Hello, World"
|
2894
|
-
end
|
2895
|
-
end
|
2896
|
-
|
2897
|
-
run App
|
2898
|
-
```
|
2899
|
-
|
2900
|
-
```ruby
|
2901
|
-
# rainbows.conf
|
2902
|
-
|
2903
|
-
# Rainbows configurator is based on Unicorn.
|
2904
|
-
Rainbows! do
|
2905
|
-
use :ThreadSpawn
|
2906
|
-
end
|
2907
|
-
```
|
2908
|
-
|
2909
|
-
To start the server, the command would be:
|
2910
|
-
|
2911
|
-
```shell
|
2912
|
-
rainbows -c rainbows.conf
|
2913
|
-
```
|
2817
|
+
uses a threaded model of concurrency.
|
2914
2818
|
|
2915
2819
|
## Requirement
|
2916
2820
|
|
data/Rakefile
CHANGED
@@ -191,7 +191,7 @@ if defined?(Gem)
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
|
-
desc 'Commits the version to
|
194
|
+
desc 'Commits the version to git (no push)'
|
195
195
|
task :commit_version do
|
196
196
|
%w[
|
197
197
|
lib/sinatra
|
@@ -203,10 +203,22 @@ if defined?(Gem)
|
|
203
203
|
end
|
204
204
|
|
205
205
|
sh <<-SH
|
206
|
-
git commit --allow-empty
|
207
|
-
|
208
|
-
|
209
|
-
|
206
|
+
git commit --allow-empty --all --message '#{source_version} release'
|
207
|
+
SH
|
208
|
+
end
|
209
|
+
|
210
|
+
desc 'Tags the version in git (no push)'
|
211
|
+
task :tag_version do
|
212
|
+
sh <<-SH
|
213
|
+
git tag --sign v#{source_version} --message '#{source_version} release'
|
214
|
+
SH
|
215
|
+
end
|
216
|
+
|
217
|
+
desc 'Watch the release workflow run'
|
218
|
+
task :watch do
|
219
|
+
sh <<-SH
|
220
|
+
runId=$(gh run list --workflow=release.yml --limit 1 --json databaseId --jq '.[].databaseId')
|
221
|
+
gh run watch --interval 1 --exit-status $runId
|
210
222
|
SH
|
211
223
|
end
|
212
224
|
|
data/SECURITY.md
CHANGED
@@ -6,7 +6,7 @@ After the initial reply to your report the security team will endeavor to keep y
|
|
6
6
|
|
7
7
|
If you have not received a reply to your email within 48 hours, or have not heard from the security team for the past five days there are a few steps you can take:
|
8
8
|
|
9
|
-
*
|
9
|
+
* Reach out to us on [discord](https://discord.gg/ncjsfsNHh7)
|
10
10
|
|
11
11
|
## Disclosure Policy
|
12
12
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.2.0
|
data/examples/stream.ru
CHANGED
data/lib/sinatra/base.rb
CHANGED
@@ -209,7 +209,7 @@ module Sinatra
|
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
-
# Some Rack handlers
|
212
|
+
# Some Rack handlers implement an extended body object protocol, however,
|
213
213
|
# some middleware (namely Rack::Lint) will break it by not mirroring the methods in question.
|
214
214
|
# This middleware will detect an extended body object and will make sure it reaches the
|
215
215
|
# handler directly. We do this here, so our middleware and middleware set up by the app will
|
@@ -502,8 +502,7 @@ module Sinatra
|
|
502
502
|
# the response body have not yet been generated.
|
503
503
|
#
|
504
504
|
# The close parameter specifies whether Stream#close should be called
|
505
|
-
# after the block has been executed.
|
506
|
-
# servers like Rainbows.
|
505
|
+
# after the block has been executed.
|
507
506
|
def stream(keep_open = false)
|
508
507
|
scheduler = env['async.callback'] ? EventMachine : Stream
|
509
508
|
current = @params.dup
|
@@ -1261,7 +1260,19 @@ module Sinatra
|
|
1261
1260
|
end
|
1262
1261
|
|
1263
1262
|
def dump_errors!(boom)
|
1264
|
-
|
1263
|
+
if boom.respond_to?(:detailed_message)
|
1264
|
+
msg = boom.detailed_message(highlight: false)
|
1265
|
+
if msg =~ /\A(.*?)(?: \(#{ Regexp.quote(boom.class.to_s) }\))?\n/
|
1266
|
+
msg = $1
|
1267
|
+
additional_msg = $'.lines(chomp: true)
|
1268
|
+
else
|
1269
|
+
additional_msg = []
|
1270
|
+
end
|
1271
|
+
else
|
1272
|
+
msg = boom.message
|
1273
|
+
additional_msg = []
|
1274
|
+
end
|
1275
|
+
msg = ["#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} - #{boom.class} - #{msg}:", *additional_msg, *boom.backtrace].join("\n\t")
|
1265
1276
|
@env['rack.errors'].puts(msg)
|
1266
1277
|
end
|
1267
1278
|
|
@@ -1270,6 +1281,7 @@ module Sinatra
|
|
1270
1281
|
%r{/sinatra(/(base|main|show_exceptions))?\.rb$}, # all sinatra code
|
1271
1282
|
%r{lib/tilt.*\.rb$}, # all tilt code
|
1272
1283
|
/^\(.*\)$/, # generated code
|
1284
|
+
/\/bundled_gems.rb$/, # ruby >= 3.3 with bundler >= 2.5
|
1273
1285
|
%r{rubygems/(custom|core_ext/kernel)_require\.rb$}, # rubygems require hacks
|
1274
1286
|
/active_support/, # active_support require hacks
|
1275
1287
|
%r{bundler(/(?:runtime|inline))?\.rb}, # bundler require hacks
|
@@ -1995,7 +2007,7 @@ module Sinatra
|
|
1995
2007
|
</head>
|
1996
2008
|
<body>
|
1997
2009
|
<h2>Sinatra doesn’t know this ditty.</h2>
|
1998
|
-
<img src='#{
|
2010
|
+
<img src='#{request.script_name}/__sinatra__/404.png'>
|
1999
2011
|
<div id="c">
|
2000
2012
|
Try this:
|
2001
2013
|
<pre>#{Rack::Utils.escape_html(code)}</pre>
|
@@ -21,7 +21,8 @@ module Sinatra
|
|
21
21
|
# writing interface (calling e.g. <tt>[]=</tt>, <tt>merge</tt>). This mapping
|
22
22
|
# belongs to the public interface. For example, given:
|
23
23
|
#
|
24
|
-
# hash = Sinatra::IndifferentHash.new
|
24
|
+
# hash = Sinatra::IndifferentHash.new
|
25
|
+
# hash[:a] = 1
|
25
26
|
#
|
26
27
|
# You are guaranteed that the key is returned as a string:
|
27
28
|
#
|
@@ -29,7 +30,8 @@ module Sinatra
|
|
29
30
|
#
|
30
31
|
# Technically other types of keys are accepted:
|
31
32
|
#
|
32
|
-
# hash = Sinatra::IndifferentHash
|
33
|
+
# hash = Sinatra::IndifferentHash
|
34
|
+
# hash[:a] = 1
|
33
35
|
# hash[0] = 0
|
34
36
|
# hash # => { "a"=>1, 0=>0 }
|
35
37
|
#
|
@@ -186,6 +188,12 @@ module Sinatra
|
|
186
188
|
dup.tap(&:compact!)
|
187
189
|
end
|
188
190
|
|
191
|
+
def except(*keys)
|
192
|
+
keys.map!(&method(:convert_key))
|
193
|
+
|
194
|
+
super(*keys)
|
195
|
+
end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0")
|
196
|
+
|
189
197
|
private
|
190
198
|
|
191
199
|
def convert_key(key)
|
data/lib/sinatra/version.rb
CHANGED
data/sinatra.gemspec
CHANGED
@@ -49,6 +49,4 @@ RubyGems 2.0 or newer is required to protect against public gem pushes. You can
|
|
49
49
|
s.add_dependency 'rack', '~> 2.2', '>= 2.2.4'
|
50
50
|
s.add_dependency 'rack-protection', version
|
51
51
|
s.add_dependency 'tilt', '~> 2.0'
|
52
|
-
|
53
|
-
s.add_development_dependency 'rack-test', '~> 2'
|
54
52
|
end
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
8
8
|
- Ryan Tomayko
|
9
9
|
- Simon Rozet
|
10
10
|
- Konstantin Haase
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-12-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: mustermann
|
@@ -53,14 +53,14 @@ dependencies:
|
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 3.
|
56
|
+
version: 3.2.0
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 3.
|
63
|
+
version: 3.2.0
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: tilt
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,20 +75,6 @@ dependencies:
|
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '2.0'
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: rack-test
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- - "~>"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: '2'
|
85
|
-
type: :development
|
86
|
-
prerelease: false
|
87
|
-
version_requirements: !ruby/object:Gem::Requirement
|
88
|
-
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '2'
|
92
78
|
description: Sinatra is a DSL for quickly creating web applications in Ruby with minimal
|
93
79
|
effort.
|
94
80
|
email: sinatrarb@googlegroups.com
|
@@ -111,8 +97,6 @@ files:
|
|
111
97
|
- VERSION
|
112
98
|
- examples/chat.rb
|
113
99
|
- examples/lifecycle_events.rb
|
114
|
-
- examples/rainbows.conf
|
115
|
-
- examples/rainbows.rb
|
116
100
|
- examples/simple.rb
|
117
101
|
- examples/stream.ru
|
118
102
|
- lib/sinatra.rb
|
@@ -134,7 +118,7 @@ metadata:
|
|
134
118
|
bug_tracker_uri: https://github.com/sinatra/sinatra/issues
|
135
119
|
mailing_list_uri: http://groups.google.com/group/sinatrarb
|
136
120
|
documentation_uri: https://www.rubydoc.info/gems/sinatra
|
137
|
-
post_install_message:
|
121
|
+
post_install_message:
|
138
122
|
rdoc_options:
|
139
123
|
- "--line-numbers"
|
140
124
|
- "--title"
|
@@ -155,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
139
|
- !ruby/object:Gem::Version
|
156
140
|
version: '0'
|
157
141
|
requirements: []
|
158
|
-
rubygems_version: 3.
|
159
|
-
signing_key:
|
142
|
+
rubygems_version: 3.5.3
|
143
|
+
signing_key:
|
160
144
|
specification_version: 4
|
161
145
|
summary: Classy web-development dressed in a DSL
|
162
146
|
test_files: []
|
data/examples/rainbows.conf
DELETED
data/examples/rainbows.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rainbows'
|
4
|
-
|
5
|
-
module Rack
|
6
|
-
module Handler
|
7
|
-
class Rainbows
|
8
|
-
def self.run(app, **options)
|
9
|
-
rainbows_options = {
|
10
|
-
listeners: ["#{options[:Host]}:#{options[:Port]}"],
|
11
|
-
worker_processes: 1,
|
12
|
-
timeout: 30,
|
13
|
-
config_file: ::File.expand_path('rainbows.conf', __dir__)
|
14
|
-
}
|
15
|
-
|
16
|
-
::Rainbows::HttpServer.new(app, rainbows_options).start.join
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
register :rainbows, ::Rack::Handler::Rainbows
|
21
|
-
end
|
22
|
-
end
|