roda 3.54.0 → 3.57.0
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/CHANGELOG +32 -0
- data/doc/conventions.rdoc +14 -11
- data/doc/release_notes/3.55.0.txt +12 -0
- data/doc/release_notes/3.56.0.txt +33 -0
- data/doc/release_notes/3.57.0.txt +34 -0
- data/lib/roda/plugins/chunked.rb +2 -2
- data/lib/roda/plugins/common_logger.rb +12 -1
- data/lib/roda/plugins/cookies.rb +2 -0
- data/lib/roda/plugins/hash_branch_view_subdir.rb +76 -0
- data/lib/roda/plugins/hash_branches.rb +145 -0
- data/lib/roda/plugins/hash_paths.rb +128 -0
- data/lib/roda/plugins/hash_routes.rb +13 -176
- data/lib/roda/plugins/json_parser.rb +6 -2
- data/lib/roda/plugins/middleware.rb +17 -2
- data/lib/roda/plugins/multi_public.rb +8 -0
- data/lib/roda/plugins/multi_route.rb +1 -1
- data/lib/roda/plugins/multi_view.rb +0 -4
- data/lib/roda/plugins/named_routes.rb +1 -2
- data/lib/roda/plugins/not_allowed.rb +13 -0
- data/lib/roda/plugins/public.rb +8 -0
- data/lib/roda/plugins/render.rb +5 -3
- data/lib/roda/plugins/route_csrf.rb +1 -0
- data/lib/roda/plugins/run_append_slash.rb +1 -1
- data/lib/roda/plugins/run_require_slash.rb +46 -0
- data/lib/roda/plugins/sessions.rb +1 -0
- data/lib/roda/plugins/sinatra_helpers.rb +10 -0
- data/lib/roda/plugins/static.rb +2 -0
- data/lib/roda/plugins/static_routing.rb +1 -1
- data/lib/roda/plugins/status_303.rb +6 -3
- data/lib/roda/plugins/status_handler.rb +35 -9
- data/lib/roda/plugins/symbol_status.rb +2 -0
- data/lib/roda/plugins/unescape_path.rb +2 -0
- data/lib/roda/request.rb +35 -1
- data/lib/roda/response.rb +5 -0
- data/lib/roda/version.rb +1 -1
- metadata +30 -6
data/lib/roda/request.rb
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# frozen-string-literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# :nocov:
|
|
4
|
+
begin
|
|
5
|
+
require "rack/version"
|
|
6
|
+
rescue LoadError
|
|
7
|
+
require "rack"
|
|
8
|
+
else
|
|
9
|
+
if Rack.release >= '2.3'
|
|
10
|
+
require "rack/request"
|
|
11
|
+
else
|
|
12
|
+
require "rack"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
# :nocov:
|
|
16
|
+
|
|
4
17
|
require_relative "cache"
|
|
5
18
|
|
|
6
19
|
class Roda
|
|
@@ -116,6 +129,27 @@ class Roda
|
|
|
116
129
|
"#<#{self.class.inspect} #{@env["REQUEST_METHOD"]} #{path}>"
|
|
117
130
|
end
|
|
118
131
|
|
|
132
|
+
# :nocov:
|
|
133
|
+
if Rack.release >= '2.3'
|
|
134
|
+
def http_version
|
|
135
|
+
# Prefer SERVER_PROTOCOL as it is required in Rack 3.
|
|
136
|
+
# Still fall back to HTTP_VERSION if SERVER_PROTOCOL
|
|
137
|
+
# is not set, in case the server in use is not Rack 3
|
|
138
|
+
# compliant.
|
|
139
|
+
@env['SERVER_PROTOCOL'] || @env['HTTP_VERSION']
|
|
140
|
+
end
|
|
141
|
+
else
|
|
142
|
+
# :nocov:
|
|
143
|
+
# What HTTP version the request was submitted with.
|
|
144
|
+
def http_version
|
|
145
|
+
# Prefer HTTP_VERSION as it is backwards compatible
|
|
146
|
+
# with previous Roda versions. Fallback to
|
|
147
|
+
# SERVER_PROTOCOL for servers that do not set
|
|
148
|
+
# HTTP_VERSION.
|
|
149
|
+
@env['HTTP_VERSION'] || @env['SERVER_PROTOCOL']
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
119
153
|
# Does a terminal match on the current path, matching only if the arguments
|
|
120
154
|
# have fully matched the path. If it matches, the match block is
|
|
121
155
|
# executed, and when the match block returns, the rack response is
|
data/lib/roda/response.rb
CHANGED
data/lib/roda/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.57.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremy Evans
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rack
|
|
@@ -52,6 +52,20 @@ dependencies:
|
|
|
52
52
|
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: 5.7.0
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: minitest-hooks
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
55
69
|
- !ruby/object:Gem::Dependency
|
|
56
70
|
name: minitest-global_expectations
|
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -109,7 +123,7 @@ dependencies:
|
|
|
109
123
|
- !ruby/object:Gem::Version
|
|
110
124
|
version: '0'
|
|
111
125
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
126
|
+
name: sassc
|
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
|
114
128
|
requirements:
|
|
115
129
|
- - ">="
|
|
@@ -212,6 +226,9 @@ extra_rdoc_files:
|
|
|
212
226
|
- doc/release_notes/3.52.0.txt
|
|
213
227
|
- doc/release_notes/3.53.0.txt
|
|
214
228
|
- doc/release_notes/3.54.0.txt
|
|
229
|
+
- doc/release_notes/3.55.0.txt
|
|
230
|
+
- doc/release_notes/3.56.0.txt
|
|
231
|
+
- doc/release_notes/3.57.0.txt
|
|
215
232
|
- doc/release_notes/3.6.0.txt
|
|
216
233
|
- doc/release_notes/3.7.0.txt
|
|
217
234
|
- doc/release_notes/3.8.0.txt
|
|
@@ -273,6 +290,9 @@ files:
|
|
|
273
290
|
- doc/release_notes/3.52.0.txt
|
|
274
291
|
- doc/release_notes/3.53.0.txt
|
|
275
292
|
- doc/release_notes/3.54.0.txt
|
|
293
|
+
- doc/release_notes/3.55.0.txt
|
|
294
|
+
- doc/release_notes/3.56.0.txt
|
|
295
|
+
- doc/release_notes/3.57.0.txt
|
|
276
296
|
- doc/release_notes/3.6.0.txt
|
|
277
297
|
- doc/release_notes/3.7.0.txt
|
|
278
298
|
- doc/release_notes/3.8.0.txt
|
|
@@ -319,7 +339,10 @@ files:
|
|
|
319
339
|
- lib/roda/plugins/flash.rb
|
|
320
340
|
- lib/roda/plugins/h.rb
|
|
321
341
|
- lib/roda/plugins/halt.rb
|
|
342
|
+
- lib/roda/plugins/hash_branch_view_subdir.rb
|
|
343
|
+
- lib/roda/plugins/hash_branches.rb
|
|
322
344
|
- lib/roda/plugins/hash_matcher.rb
|
|
345
|
+
- lib/roda/plugins/hash_paths.rb
|
|
323
346
|
- lib/roda/plugins/hash_routes.rb
|
|
324
347
|
- lib/roda/plugins/head.rb
|
|
325
348
|
- lib/roda/plugins/header_matchers.rb
|
|
@@ -372,6 +395,7 @@ files:
|
|
|
372
395
|
- lib/roda/plugins/route_csrf.rb
|
|
373
396
|
- lib/roda/plugins/run_append_slash.rb
|
|
374
397
|
- lib/roda/plugins/run_handler.rb
|
|
398
|
+
- lib/roda/plugins/run_require_slash.rb
|
|
375
399
|
- lib/roda/plugins/sessions.rb
|
|
376
400
|
- lib/roda/plugins/shared_vars.rb
|
|
377
401
|
- lib/roda/plugins/sinatra_helpers.rb
|
|
@@ -394,13 +418,13 @@ files:
|
|
|
394
418
|
- lib/roda/response.rb
|
|
395
419
|
- lib/roda/session_middleware.rb
|
|
396
420
|
- lib/roda/version.rb
|
|
397
|
-
homepage:
|
|
421
|
+
homepage: https://roda.jeremyevans.net
|
|
398
422
|
licenses:
|
|
399
423
|
- MIT
|
|
400
424
|
metadata:
|
|
401
425
|
bug_tracker_uri: https://github.com/jeremyevans/roda/issues
|
|
402
|
-
changelog_uri:
|
|
403
|
-
documentation_uri:
|
|
426
|
+
changelog_uri: https://roda.jeremyevans.net/rdoc/files/CHANGELOG.html
|
|
427
|
+
documentation_uri: https://roda.jeremyevans.net/documentation.html
|
|
404
428
|
mailing_list_uri: https://github.com/jeremyevans/roda/discussions
|
|
405
429
|
source_code_uri: https://github.com/jeremyevans/roda
|
|
406
430
|
post_install_message:
|