actionpack 8.1.0.rc1 → 8.1.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/CHANGELOG.md +18 -3
- data/lib/abstract_controller/base.rb +0 -3
- data/lib/abstract_controller/callbacks.rb +6 -0
- data/lib/abstract_controller/helpers.rb +1 -1
- data/lib/action_controller/metal/redirecting.rb +1 -4
- data/lib/action_controller/structured_event_subscriber.rb +5 -0
- data/lib/action_dispatch/railtie.rb +1 -0
- data/lib/action_dispatch/routing/mapper.rb +4 -2
- data/lib/action_dispatch/testing/request_encoder.rb +9 -9
- data/lib/action_pack/gem_version.rb +2 -2
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c53f4cddcbfff66aa4ff4a9ffaafc317d3b08c72b31cff8197a4091275fa67ea
|
|
4
|
+
data.tar.gz: e76e733e0add77c1edc5f7cbcb919b6b5afa55da290de9f90e0fb42e7c55fe00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7b50973de12321c35604c52232fe9452257d7f613b3c59068d3a900042f3cfd22e0aa36507f7f31e86a7031060390136a6a36b2c76e10a602c8c4309a893e41
|
|
7
|
+
data.tar.gz: 4b67fa19b19074660c1ceae3ec08470408cf19a59f851da9bf8471ca3bb5bf50add910c7e904e7190e0cfc78bdffebaec04493c55fb4c2f0e3009d46ab83c8b4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
## Rails 8.1.
|
|
1
|
+
## Rails 8.1.1 (October 28, 2025) ##
|
|
2
|
+
|
|
3
|
+
* Allow methods starting with underscore to be action methods.
|
|
4
|
+
|
|
5
|
+
Disallowing methods starting with an underscore from being action methods
|
|
6
|
+
was an unintended side effect of the performance optimization in
|
|
7
|
+
207a254.
|
|
8
|
+
|
|
9
|
+
Fixes #55985.
|
|
10
|
+
|
|
11
|
+
*Rafael Mendonça França*
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Rails 8.1.0 (October 22, 2025) ##
|
|
15
|
+
|
|
16
|
+
* Submit test requests using `as: :html` with `Content-Type: x-www-form-urlencoded`
|
|
17
|
+
|
|
18
|
+
*Sean Doyle*
|
|
2
19
|
|
|
3
20
|
* Add link-local IP ranges to `ActionDispatch::RemoteIp` default proxies.
|
|
4
21
|
|
|
@@ -100,8 +117,6 @@
|
|
|
100
117
|
|
|
101
118
|
*Roberto Miranda*
|
|
102
119
|
|
|
103
|
-
## Rails 8.1.0.beta1 (September 04, 2025) ##
|
|
104
|
-
|
|
105
120
|
* Remove deprecated support to a route to multiple paths.
|
|
106
121
|
|
|
107
122
|
*Rafael Mendonça França*
|
|
@@ -95,9 +95,6 @@ module AbstractController
|
|
|
95
95
|
# All public instance methods of this class, including ancestors except for
|
|
96
96
|
# public instance methods of Base and its ancestors.
|
|
97
97
|
methods = public_instance_methods(true) - internal_methods
|
|
98
|
-
# Be sure to include shadowed public instance methods of this class.
|
|
99
|
-
methods.concat(public_instance_methods(false))
|
|
100
|
-
methods.reject! { |m| m.start_with?("_") }
|
|
101
98
|
methods.map!(&:name)
|
|
102
99
|
methods.to_set
|
|
103
100
|
end
|
|
@@ -29,6 +29,8 @@ module AbstractController
|
|
|
29
29
|
# ActiveSupport::Callbacks.
|
|
30
30
|
include ActiveSupport::Callbacks
|
|
31
31
|
|
|
32
|
+
DEFAULT_INTERNAL_METHODS = [:_run_process_action_callbacks].freeze # :nodoc:
|
|
33
|
+
|
|
32
34
|
included do
|
|
33
35
|
define_callbacks :process_action,
|
|
34
36
|
terminator: ->(controller, result_lambda) { result_lambda.call; controller.performed? },
|
|
@@ -251,6 +253,10 @@ module AbstractController
|
|
|
251
253
|
# *_action is the same as append_*_action
|
|
252
254
|
alias_method :"append_#{callback}_action", :"#{callback}_action"
|
|
253
255
|
end
|
|
256
|
+
|
|
257
|
+
def internal_methods # :nodoc:
|
|
258
|
+
super.concat(DEFAULT_INTERNAL_METHODS)
|
|
259
|
+
end
|
|
254
260
|
end
|
|
255
261
|
|
|
256
262
|
private
|
|
@@ -90,7 +90,7 @@ module AbstractController
|
|
|
90
90
|
#--
|
|
91
91
|
# Implemented by Resolution#modules_for_helpers.
|
|
92
92
|
|
|
93
|
-
# :method:
|
|
93
|
+
# :method: all_helpers_from_path
|
|
94
94
|
# :call-seq: all_helpers_from_path(path)
|
|
95
95
|
#
|
|
96
96
|
# Returns a list of helper names in a given path.
|
|
@@ -108,10 +108,7 @@ module ActionController
|
|
|
108
108
|
# ### Open Redirect protection
|
|
109
109
|
#
|
|
110
110
|
# By default, Rails protects against redirecting to external hosts for your
|
|
111
|
-
# app's safety, so called open redirects.
|
|
112
|
-
# 7.0, after upgrading opt-in by uncommenting the line with
|
|
113
|
-
# `raise_on_open_redirects` in
|
|
114
|
-
# `config/initializers/new_framework_defaults_7_0.rb`
|
|
111
|
+
# app's safety, so called open redirects.
|
|
115
112
|
#
|
|
116
113
|
# Here #redirect_to automatically validates the potentially-unsafe URL:
|
|
117
114
|
#
|
|
@@ -34,6 +34,7 @@ module ActionController
|
|
|
34
34
|
controller: payload[:controller],
|
|
35
35
|
action: payload[:action],
|
|
36
36
|
status: status,
|
|
37
|
+
**additions_for(payload),
|
|
37
38
|
duration_ms: event.duration.round(2),
|
|
38
39
|
gc_time_ms: event.gc_time.round(1),
|
|
39
40
|
}.compact)
|
|
@@ -101,6 +102,10 @@ module ActionController
|
|
|
101
102
|
duration_ms: event.duration.round(1)
|
|
102
103
|
)
|
|
103
104
|
end
|
|
105
|
+
|
|
106
|
+
def additions_for(payload)
|
|
107
|
+
payload.slice(:view_runtime, :db_runtime, :queries_count, :cached_queries_count)
|
|
108
|
+
end
|
|
104
109
|
end
|
|
105
110
|
end
|
|
106
111
|
|
|
@@ -6,6 +6,7 @@ require "action_dispatch"
|
|
|
6
6
|
require "action_dispatch/log_subscriber"
|
|
7
7
|
require "action_dispatch/structured_event_subscriber"
|
|
8
8
|
require "active_support/messages/rotation_configuration"
|
|
9
|
+
require "rails/railtie"
|
|
9
10
|
|
|
10
11
|
module ActionDispatch
|
|
11
12
|
class Railtie < Rails::Railtie # :nodoc:
|
|
@@ -1948,8 +1948,10 @@ module ActionDispatch
|
|
|
1948
1948
|
end
|
|
1949
1949
|
|
|
1950
1950
|
scope_options = options.slice!(*RESOURCE_OPTIONS)
|
|
1951
|
-
|
|
1952
|
-
|
|
1951
|
+
scope_options[:shallow] = shallow unless shallow.nil?
|
|
1952
|
+
|
|
1953
|
+
unless scope_options.empty?
|
|
1954
|
+
scope(**scope_options) do
|
|
1953
1955
|
public_send(method, resources.pop, **options, &block)
|
|
1954
1956
|
end
|
|
1955
1957
|
return true
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# :markup: markdown
|
|
4
4
|
|
|
5
5
|
require "nokogiri"
|
|
6
|
+
require "action_dispatch/http/mime_type"
|
|
6
7
|
|
|
7
8
|
module ActionDispatch
|
|
8
9
|
class RequestEncoder # :nodoc:
|
|
@@ -15,9 +16,9 @@ module ActionDispatch
|
|
|
15
16
|
|
|
16
17
|
@encoders = { identity: IdentityEncoder.new }
|
|
17
18
|
|
|
18
|
-
attr_reader :response_parser
|
|
19
|
+
attr_reader :response_parser, :content_type
|
|
19
20
|
|
|
20
|
-
def initialize(mime_name, param_encoder, response_parser)
|
|
21
|
+
def initialize(mime_name, param_encoder, response_parser, content_type)
|
|
21
22
|
@mime = Mime[mime_name]
|
|
22
23
|
|
|
23
24
|
unless @mime
|
|
@@ -27,10 +28,7 @@ module ActionDispatch
|
|
|
27
28
|
|
|
28
29
|
@response_parser = response_parser || -> body { body }
|
|
29
30
|
@param_encoder = param_encoder || :"to_#{@mime.symbol}".to_proc
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def content_type
|
|
33
|
-
@mime.to_s
|
|
31
|
+
@content_type = content_type || @mime.to_s
|
|
34
32
|
end
|
|
35
33
|
|
|
36
34
|
def accept_header
|
|
@@ -50,11 +48,13 @@ module ActionDispatch
|
|
|
50
48
|
@encoders[name] || @encoders[:identity]
|
|
51
49
|
end
|
|
52
50
|
|
|
53
|
-
def self.register_encoder(mime_name, param_encoder: nil, response_parser: nil)
|
|
54
|
-
@encoders[mime_name] = new(mime_name, param_encoder, response_parser)
|
|
51
|
+
def self.register_encoder(mime_name, param_encoder: nil, response_parser: nil, content_type: nil)
|
|
52
|
+
@encoders[mime_name] = new(mime_name, param_encoder, response_parser, content_type)
|
|
55
53
|
end
|
|
56
54
|
|
|
57
|
-
register_encoder :html, response_parser: -> body { Rails::Dom::Testing.html_document.parse(body) }
|
|
55
|
+
register_encoder :html, response_parser: -> body { Rails::Dom::Testing.html_document.parse(body) },
|
|
56
|
+
param_encoder: -> param { param },
|
|
57
|
+
content_type: Mime[:url_encoded_form].to_s
|
|
58
58
|
register_encoder :json, response_parser: -> body { JSON.parse(body, object_class: ActiveSupport::HashWithIndifferentAccess) }
|
|
59
59
|
end
|
|
60
60
|
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: 8.1.
|
|
4
|
+
version: 8.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 8.1.
|
|
18
|
+
version: 8.1.1
|
|
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: 8.1.
|
|
25
|
+
version: 8.1.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: nokogiri
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -127,28 +127,28 @@ dependencies:
|
|
|
127
127
|
requirements:
|
|
128
128
|
- - '='
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: 8.1.
|
|
130
|
+
version: 8.1.1
|
|
131
131
|
type: :runtime
|
|
132
132
|
prerelease: false
|
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
|
134
134
|
requirements:
|
|
135
135
|
- - '='
|
|
136
136
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: 8.1.
|
|
137
|
+
version: 8.1.1
|
|
138
138
|
- !ruby/object:Gem::Dependency
|
|
139
139
|
name: activemodel
|
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
|
141
141
|
requirements:
|
|
142
142
|
- - '='
|
|
143
143
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: 8.1.
|
|
144
|
+
version: 8.1.1
|
|
145
145
|
type: :development
|
|
146
146
|
prerelease: false
|
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
|
148
148
|
requirements:
|
|
149
149
|
- - '='
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: 8.1.
|
|
151
|
+
version: 8.1.1
|
|
152
152
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
|
153
153
|
testing MVC web applications. Works with any Rack-compatible server.
|
|
154
154
|
email: david@loudthinking.com
|
|
@@ -352,10 +352,10 @@ licenses:
|
|
|
352
352
|
- MIT
|
|
353
353
|
metadata:
|
|
354
354
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
355
|
-
changelog_uri: https://github.com/rails/rails/blob/v8.1.
|
|
356
|
-
documentation_uri: https://api.rubyonrails.org/v8.1.
|
|
355
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.1.1/actionpack/CHANGELOG.md
|
|
356
|
+
documentation_uri: https://api.rubyonrails.org/v8.1.1/
|
|
357
357
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
358
|
-
source_code_uri: https://github.com/rails/rails/tree/v8.1.
|
|
358
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.1.1/actionpack
|
|
359
359
|
rubygems_mfa_required: 'true'
|
|
360
360
|
rdoc_options: []
|
|
361
361
|
require_paths:
|