sinatra 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/sinatra/base.rb +7 -2
- data/lib/sinatra/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253794a685657aa33414a6384abfa99f0c4b0a8aa97a9f15aa6d5ae88bcd747e
|
4
|
+
data.tar.gz: 455faa2397e06210cdeeb6e90eb5b8ec56908695585c869bb9241afc1e480cca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8ca8d0630ca6a5b420a6066ac6bb0375092e92a549bf623974a8780b576b859a227eccf32402ffb4628a04523c107420cda5982bcc69a14dbb3779ff299b255
|
7
|
+
data.tar.gz: 85352987ea63bcbdfa6a80af67a59e5e3e4e812f1aaf4f28016ebd085805934ffa2787278b3034cef623ee5ed278bb5b66eeb02f390b6b8fea5326f7f039c4d7
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
* _Your new feature here._
|
4
4
|
|
5
|
+
## 3.0.5 / 2022-12-16
|
6
|
+
|
7
|
+
* Fix: Add Zeitwerk compatibility. [#1831](https://github.com/sinatra/sinatra/pull/1831) by Dawid Janczak
|
8
|
+
|
9
|
+
* Fix: Allow CALLERS_TO_IGNORE to be overridden
|
10
|
+
|
5
11
|
## 3.0.4 / 2022-11-25
|
6
12
|
|
7
13
|
* Fix: Escape filename in the Content-Disposition header. [#1841](https://github.com/sinatra/sinatra/pull/1841) by Kunpei Sakai
|
@@ -66,6 +72,12 @@
|
|
66
72
|
|
67
73
|
* Docs: Japanese documentation: Make Session section reflect changes done to README.md. [#1731](https://github.com/sinatra/sinatra/pull/1731) by @shu-i-chi
|
68
74
|
|
75
|
+
## 2.2.3 / 2022-11-25
|
76
|
+
|
77
|
+
* Fix: Escape filename in the Content-Disposition header. [#1841](https://github.com/sinatra/sinatra/pull/1841) by Kunpei Sakai
|
78
|
+
|
79
|
+
* Fix: fixed ReDoS for Rack::Protection::IPSpoofing. [#1823](https://github.com/sinatra/sinatra/pull/1823) by @ooooooo-q
|
80
|
+
|
69
81
|
## 2.2.2 / 2022-07-23
|
70
82
|
|
71
83
|
* Update mustermann dependency to version 2.
|
data/README.md
CHANGED
@@ -984,7 +984,7 @@ To associate a file extension with a template engine, use
|
|
984
984
|
`tt` for Haml templates, you can do the following:
|
985
985
|
|
986
986
|
```ruby
|
987
|
-
Tilt.register
|
987
|
+
Tilt.register Tilt[:haml], :tt
|
988
988
|
```
|
989
989
|
|
990
990
|
### Adding Your Own Template Engine
|
@@ -992,7 +992,7 @@ Tilt.register :tt, Tilt[:haml]
|
|
992
992
|
First, register your engine with Tilt, then create a rendering method:
|
993
993
|
|
994
994
|
```ruby
|
995
|
-
Tilt.register :myat
|
995
|
+
Tilt.register MyAwesomeTemplateEngine, :myat
|
996
996
|
|
997
997
|
helpers do
|
998
998
|
def myat(*args) render(:myat, *args) end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.5
|
data/lib/sinatra/base.rb
CHANGED
@@ -1216,11 +1216,16 @@ module Sinatra
|
|
1216
1216
|
%r{rubygems/(custom|core_ext/kernel)_require\.rb$}, # rubygems require hacks
|
1217
1217
|
/active_support/, # active_support require hacks
|
1218
1218
|
%r{bundler(/(?:runtime|inline))?\.rb}, # bundler require hacks
|
1219
|
-
/<internal
|
1219
|
+
/<internal:/, # internal in ruby >= 1.9.2
|
1220
|
+
%r{zeitwerk/kernel\.rb} # Zeitwerk kernel#require decorator
|
1220
1221
|
].freeze
|
1221
1222
|
|
1222
1223
|
attr_reader :routes, :filters, :templates, :errors
|
1223
1224
|
|
1225
|
+
def callers_to_ignore
|
1226
|
+
CALLERS_TO_IGNORE
|
1227
|
+
end
|
1228
|
+
|
1224
1229
|
# Removes all routes, filters, middleware and extension hooks from the
|
1225
1230
|
# current class (not routes/filters/... defined by its superclass).
|
1226
1231
|
def reset!
|
@@ -1787,7 +1792,7 @@ module Sinatra
|
|
1787
1792
|
def cleaned_caller(keep = 3)
|
1788
1793
|
caller(1)
|
1789
1794
|
.map! { |line| line.split(/:(?=\d|in )/, 3)[0, keep] }
|
1790
|
-
.reject { |file, *_|
|
1795
|
+
.reject { |file, *_| callers_to_ignore.any? { |pattern| file =~ pattern } }
|
1791
1796
|
end
|
1792
1797
|
end
|
1793
1798
|
|
data/lib/sinatra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-
|
14
|
+
date: 2022-12-16 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.0.
|
56
|
+
version: 3.0.5
|
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.0.
|
63
|
+
version: 3.0.5
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: tilt
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|