actionpack 7.2.3 → 8.0.4
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.md +172 -119
- data/lib/abstract_controller/rendering.rb +0 -1
- data/lib/action_controller/base.rb +1 -1
- data/lib/action_controller/form_builder.rb +3 -3
- data/lib/action_controller/metal/allow_browser.rb +11 -1
- data/lib/action_controller/metal/conditional_get.rb +5 -1
- data/lib/action_controller/metal/data_streaming.rb +4 -2
- data/lib/action_controller/metal/instrumentation.rb +1 -2
- data/lib/action_controller/metal/live.rb +16 -9
- data/lib/action_controller/metal/rate_limiting.rb +13 -4
- data/lib/action_controller/metal/renderers.rb +2 -3
- data/lib/action_controller/metal/streaming.rb +5 -84
- data/lib/action_controller/metal/strong_parameters.rb +277 -89
- data/lib/action_controller/railtie.rb +1 -7
- data/lib/action_controller/test_case.rb +12 -2
- data/lib/action_dispatch/http/cache.rb +27 -10
- data/lib/action_dispatch/http/content_security_policy.rb +14 -1
- data/lib/action_dispatch/http/param_builder.rb +186 -0
- data/lib/action_dispatch/http/param_error.rb +26 -0
- data/lib/action_dispatch/http/permissions_policy.rb +2 -0
- data/lib/action_dispatch/http/query_parser.rb +53 -0
- data/lib/action_dispatch/http/request.rb +60 -16
- data/lib/action_dispatch/http/response.rb +34 -13
- data/lib/action_dispatch/journey/parser.rb +99 -196
- data/lib/action_dispatch/journey/scanner.rb +44 -42
- data/lib/action_dispatch/middleware/cookies.rb +4 -2
- data/lib/action_dispatch/middleware/debug_exceptions.rb +16 -3
- data/lib/action_dispatch/middleware/debug_view.rb +0 -5
- data/lib/action_dispatch/middleware/exception_wrapper.rb +0 -6
- data/lib/action_dispatch/middleware/request_id.rb +2 -1
- data/lib/action_dispatch/middleware/ssl.rb +13 -3
- data/lib/action_dispatch/middleware/templates/rescues/_source.html.erb +0 -3
- data/lib/action_dispatch/railtie.rb +8 -0
- data/lib/action_dispatch/request/session.rb +1 -0
- data/lib/action_dispatch/request/utils.rb +9 -3
- data/lib/action_dispatch/routing/inspector.rb +1 -1
- data/lib/action_dispatch/routing/mapper.rb +91 -62
- data/lib/action_dispatch/routing/polymorphic_routes.rb +2 -2
- data/lib/action_dispatch/routing/route_set.rb +21 -10
- data/lib/action_dispatch/routing/routes_proxy.rb +1 -0
- data/lib/action_dispatch/system_testing/browser.rb +12 -21
- data/lib/action_dispatch/testing/assertions/response.rb +12 -2
- data/lib/action_dispatch/testing/assertions/routing.rb +16 -12
- data/lib/action_dispatch/testing/integration.rb +14 -4
- data/lib/action_dispatch.rb +6 -4
- data/lib/action_pack/gem_version.rb +3 -3
- metadata +14 -47
- data/lib/action_dispatch/journey/parser.y +0 -50
- data/lib/action_dispatch/journey/parser_extras.rb +0 -33
data/lib/action_dispatch.rb
CHANGED
|
@@ -30,7 +30,6 @@ require "active_support/core_ext/module/attribute_accessors"
|
|
|
30
30
|
|
|
31
31
|
require "action_pack"
|
|
32
32
|
require "rack"
|
|
33
|
-
require "uri"
|
|
34
33
|
require "action_dispatch/deprecator"
|
|
35
34
|
|
|
36
35
|
module Rack # :nodoc:
|
|
@@ -48,16 +47,19 @@ end
|
|
|
48
47
|
module ActionDispatch
|
|
49
48
|
extend ActiveSupport::Autoload
|
|
50
49
|
|
|
51
|
-
RFC2396_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new
|
|
52
|
-
private_constant :RFC2396_PARSER
|
|
53
|
-
|
|
54
50
|
class MissingController < NameError
|
|
55
51
|
end
|
|
56
52
|
|
|
57
53
|
eager_autoload do
|
|
58
54
|
autoload_under "http" do
|
|
59
55
|
autoload :ContentSecurityPolicy
|
|
56
|
+
autoload :InvalidParameterError, "action_dispatch/http/param_error"
|
|
57
|
+
autoload :ParamBuilder
|
|
58
|
+
autoload :ParamError
|
|
59
|
+
autoload :ParameterTypeError, "action_dispatch/http/param_error"
|
|
60
|
+
autoload :ParamsTooDeepError, "action_dispatch/http/param_error"
|
|
60
61
|
autoload :PermissionsPolicy
|
|
62
|
+
autoload :QueryParser
|
|
61
63
|
autoload :Request
|
|
62
64
|
autoload :Response
|
|
63
65
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: actionpack
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -15,28 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
18
|
+
version: 8.0.4
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: cgi
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - ">="
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: '0'
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0'
|
|
25
|
+
version: 8.0.4
|
|
40
26
|
- !ruby/object:Gem::Dependency
|
|
41
27
|
name: nokogiri
|
|
42
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -51,20 +37,6 @@ dependencies:
|
|
|
51
37
|
- - ">="
|
|
52
38
|
- !ruby/object:Gem::Version
|
|
53
39
|
version: 1.8.5
|
|
54
|
-
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: racc
|
|
56
|
-
requirement: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - ">="
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
61
|
-
type: :runtime
|
|
62
|
-
prerelease: false
|
|
63
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - ">="
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
68
40
|
- !ruby/object:Gem::Dependency
|
|
69
41
|
name: rack
|
|
70
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -72,9 +44,6 @@ dependencies:
|
|
|
72
44
|
- - ">="
|
|
73
45
|
- !ruby/object:Gem::Version
|
|
74
46
|
version: 2.2.4
|
|
75
|
-
- - "<"
|
|
76
|
-
- !ruby/object:Gem::Version
|
|
77
|
-
version: '3.3'
|
|
78
47
|
type: :runtime
|
|
79
48
|
prerelease: false
|
|
80
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -82,9 +51,6 @@ dependencies:
|
|
|
82
51
|
- - ">="
|
|
83
52
|
- !ruby/object:Gem::Version
|
|
84
53
|
version: 2.2.4
|
|
85
|
-
- - "<"
|
|
86
|
-
- !ruby/object:Gem::Version
|
|
87
|
-
version: '3.3'
|
|
88
54
|
- !ruby/object:Gem::Dependency
|
|
89
55
|
name: rack-session
|
|
90
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -161,28 +127,28 @@ dependencies:
|
|
|
161
127
|
requirements:
|
|
162
128
|
- - '='
|
|
163
129
|
- !ruby/object:Gem::Version
|
|
164
|
-
version:
|
|
130
|
+
version: 8.0.4
|
|
165
131
|
type: :runtime
|
|
166
132
|
prerelease: false
|
|
167
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
168
134
|
requirements:
|
|
169
135
|
- - '='
|
|
170
136
|
- !ruby/object:Gem::Version
|
|
171
|
-
version:
|
|
137
|
+
version: 8.0.4
|
|
172
138
|
- !ruby/object:Gem::Dependency
|
|
173
139
|
name: activemodel
|
|
174
140
|
requirement: !ruby/object:Gem::Requirement
|
|
175
141
|
requirements:
|
|
176
142
|
- - '='
|
|
177
143
|
- !ruby/object:Gem::Version
|
|
178
|
-
version:
|
|
144
|
+
version: 8.0.4
|
|
179
145
|
type: :development
|
|
180
146
|
prerelease: false
|
|
181
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
182
148
|
requirements:
|
|
183
149
|
- - '='
|
|
184
150
|
- !ruby/object:Gem::Version
|
|
185
|
-
version:
|
|
151
|
+
version: 8.0.4
|
|
186
152
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
|
187
153
|
testing MVC web applications. Works with any Rack-compatible server.
|
|
188
154
|
email: david@loudthinking.com
|
|
@@ -266,8 +232,11 @@ files:
|
|
|
266
232
|
- lib/action_dispatch/http/mime_negotiation.rb
|
|
267
233
|
- lib/action_dispatch/http/mime_type.rb
|
|
268
234
|
- lib/action_dispatch/http/mime_types.rb
|
|
235
|
+
- lib/action_dispatch/http/param_builder.rb
|
|
236
|
+
- lib/action_dispatch/http/param_error.rb
|
|
269
237
|
- lib/action_dispatch/http/parameters.rb
|
|
270
238
|
- lib/action_dispatch/http/permissions_policy.rb
|
|
239
|
+
- lib/action_dispatch/http/query_parser.rb
|
|
271
240
|
- lib/action_dispatch/http/rack_cache.rb
|
|
272
241
|
- lib/action_dispatch/http/request.rb
|
|
273
242
|
- lib/action_dispatch/http/response.rb
|
|
@@ -281,8 +250,6 @@ files:
|
|
|
281
250
|
- lib/action_dispatch/journey/nfa/dot.rb
|
|
282
251
|
- lib/action_dispatch/journey/nodes/node.rb
|
|
283
252
|
- lib/action_dispatch/journey/parser.rb
|
|
284
|
-
- lib/action_dispatch/journey/parser.y
|
|
285
|
-
- lib/action_dispatch/journey/parser_extras.rb
|
|
286
253
|
- lib/action_dispatch/journey/path/pattern.rb
|
|
287
254
|
- lib/action_dispatch/journey/route.rb
|
|
288
255
|
- lib/action_dispatch/journey/router.rb
|
|
@@ -382,10 +349,10 @@ licenses:
|
|
|
382
349
|
- MIT
|
|
383
350
|
metadata:
|
|
384
351
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
385
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
|
386
|
-
documentation_uri: https://api.rubyonrails.org/
|
|
352
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.0.4/actionpack/CHANGELOG.md
|
|
353
|
+
documentation_uri: https://api.rubyonrails.org/v8.0.4/
|
|
387
354
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
388
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
|
355
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.0.4/actionpack
|
|
389
356
|
rubygems_mfa_required: 'true'
|
|
390
357
|
rdoc_options: []
|
|
391
358
|
require_paths:
|
|
@@ -394,7 +361,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
394
361
|
requirements:
|
|
395
362
|
- - ">="
|
|
396
363
|
- !ruby/object:Gem::Version
|
|
397
|
-
version: 3.
|
|
364
|
+
version: 3.2.0
|
|
398
365
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
399
366
|
requirements:
|
|
400
367
|
- - ">="
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
class ActionDispatch::Journey::Parser
|
|
2
|
-
options no_result_var
|
|
3
|
-
token SLASH LITERAL SYMBOL LPAREN RPAREN DOT STAR OR
|
|
4
|
-
|
|
5
|
-
rule
|
|
6
|
-
expressions
|
|
7
|
-
: expression expressions { Cat.new(val.first, val.last) }
|
|
8
|
-
| expression { val.first }
|
|
9
|
-
| or
|
|
10
|
-
;
|
|
11
|
-
expression
|
|
12
|
-
: terminal
|
|
13
|
-
| group
|
|
14
|
-
| star
|
|
15
|
-
;
|
|
16
|
-
group
|
|
17
|
-
: LPAREN expressions RPAREN { Group.new(val[1]) }
|
|
18
|
-
;
|
|
19
|
-
or
|
|
20
|
-
: expression OR expression { Or.new([val.first, val.last]) }
|
|
21
|
-
| expression OR or { Or.new([val.first, val.last]) }
|
|
22
|
-
;
|
|
23
|
-
star
|
|
24
|
-
: STAR { Star.new(Symbol.new(val.last, Symbol::GREEDY_EXP)) }
|
|
25
|
-
;
|
|
26
|
-
terminal
|
|
27
|
-
: symbol
|
|
28
|
-
| literal
|
|
29
|
-
| slash
|
|
30
|
-
| dot
|
|
31
|
-
;
|
|
32
|
-
slash
|
|
33
|
-
: SLASH { Slash.new(val.first) }
|
|
34
|
-
;
|
|
35
|
-
symbol
|
|
36
|
-
: SYMBOL { Symbol.new(val.first) }
|
|
37
|
-
;
|
|
38
|
-
literal
|
|
39
|
-
: LITERAL { Literal.new(val.first) }
|
|
40
|
-
;
|
|
41
|
-
dot
|
|
42
|
-
: DOT { Dot.new(val.first) }
|
|
43
|
-
;
|
|
44
|
-
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
---- header
|
|
48
|
-
# :stopdoc:
|
|
49
|
-
|
|
50
|
-
require "action_dispatch/journey/parser_extras"
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
# :markup: markdown
|
|
4
|
-
|
|
5
|
-
require "action_dispatch/journey/scanner"
|
|
6
|
-
require "action_dispatch/journey/nodes/node"
|
|
7
|
-
|
|
8
|
-
module ActionDispatch
|
|
9
|
-
# :stopdoc:
|
|
10
|
-
module Journey
|
|
11
|
-
class Parser < Racc::Parser
|
|
12
|
-
include Journey::Nodes
|
|
13
|
-
|
|
14
|
-
def self.parse(string)
|
|
15
|
-
new.parse string
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def initialize
|
|
19
|
-
@scanner = Scanner.new
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def parse(string)
|
|
23
|
-
@scanner.scan_setup(string)
|
|
24
|
-
do_parse
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def next_token
|
|
28
|
-
@scanner.next_token
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
# :startdoc:
|
|
33
|
-
end
|