actionpack 5.2.2 → 5.2.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of actionpack might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/lib/action_controller/metal.rb +2 -2
- data/lib/action_controller/metal/params_wrapper.rb +2 -2
- data/lib/action_controller/test_case.rb +5 -4
- data/lib/action_dispatch/http/cache.rb +6 -4
- data/lib/action_dispatch/http/mime_negotiation.rb +5 -0
- data/lib/action_dispatch/journey/path/pattern.rb +2 -1
- data/lib/action_dispatch/middleware/session/cookie_store.rb +4 -3
- data/lib/action_dispatch/middleware/stack.rb +2 -2
- data/lib/action_pack/gem_version.rb +1 -1
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25e837add393b54ba9ed9f7ce0c21d9173d904d84efdbf456bf9a9f27518667a
|
4
|
+
data.tar.gz: 3f0eece1b379ad87c1bc08105670aaa685257663ac83acf120c656a2fbab65e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d22c79a3ad011963d217889e8a69e6d738b04063475aaafc20fe7508fb4e5d1284ea45f4d2591448624e2fb90dbb54518ccc607a22b34eecd52e760975a9de6b
|
7
|
+
data.tar.gz: 990bb2932315ea11fbee175fb3913d1b7e490035129362fcc308edee5481bdbaa749dcb0301f478028f48d1dfc75ba3d5adeeb5136d6ace2723df1c708dd0332
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
## Rails 5.2.4 (November 27, 2019) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 5.2.3 (March 27, 2019) ##
|
7
|
+
|
8
|
+
* Allow using `public` and `no-cache` together in the the Cache Control header.
|
9
|
+
|
10
|
+
Before this change, even if `public` was specified in the Cache Control header,
|
11
|
+
it was excluded when `no-cache` was included. This change preserves the
|
12
|
+
`public` value as is.
|
13
|
+
|
14
|
+
Fixes #34780.
|
15
|
+
|
16
|
+
*Yuji Yaginuma*
|
17
|
+
|
18
|
+
* Allow `nil` params for `ActionController::TestCase`.
|
19
|
+
|
20
|
+
*Ryo Nakamura*
|
21
|
+
|
22
|
+
|
23
|
+
## Rails 5.2.2.1 (March 11, 2019) ##
|
24
|
+
|
25
|
+
* No changes.
|
26
|
+
|
27
|
+
|
1
28
|
## Rails 5.2.2 (December 04, 2018) ##
|
2
29
|
|
3
30
|
* Reset Capybara sessions if failed system test screenshot raising an exception.
|
@@ -164,6 +191,34 @@
|
|
164
191
|
|
165
192
|
* Matches behavior of `Hash#each` in `ActionController::Parameters#each`.
|
166
193
|
|
194
|
+
Rails 5.0 introduced a bug when looping through controller params using `each`. Only the keys of params hash were passed to the block, e.g.
|
195
|
+
|
196
|
+
# Parameters: {"param"=>"1", "param_two"=>"2"}
|
197
|
+
def index
|
198
|
+
params.each do |name|
|
199
|
+
puts name
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
# Prints
|
204
|
+
# param
|
205
|
+
# param_two
|
206
|
+
|
207
|
+
In Rails 5.2 the bug has been fixed and name will be an array (which was the behavior for all versions prior to 5.0), instead of a string.
|
208
|
+
|
209
|
+
To fix the code above simply change as per example below:
|
210
|
+
|
211
|
+
# Parameters: {"param"=>"1", "param_two"=>"2"}
|
212
|
+
def index
|
213
|
+
params.each do |name, value|
|
214
|
+
puts name
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# Prints
|
219
|
+
# param
|
220
|
+
# param_two
|
221
|
+
|
167
222
|
*Dominic Cleal*
|
168
223
|
|
169
224
|
* Add `Referrer-Policy` header to default headers set.
|
@@ -26,10 +26,10 @@ module ActionController
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def build(action, app =
|
29
|
+
def build(action, app = nil, &block)
|
30
30
|
action = action.to_s
|
31
31
|
|
32
|
-
middlewares.reverse.inject(app) do |a, middleware|
|
32
|
+
middlewares.reverse.inject(app || block) do |a, middleware|
|
33
33
|
middleware.valid?(action) ? middleware.build(a) : a
|
34
34
|
end
|
35
35
|
end
|
@@ -93,7 +93,7 @@ module ActionController
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def model
|
96
|
-
super ||
|
96
|
+
super || self.model = _default_wrap_model
|
97
97
|
end
|
98
98
|
|
99
99
|
def include
|
@@ -115,7 +115,7 @@ module ActionController
|
|
115
115
|
|
116
116
|
if m.respond_to?(:nested_attributes_options) && m.nested_attributes_options.keys.any?
|
117
117
|
self.include += m.nested_attributes_options.keys.map do |key|
|
118
|
-
key.to_s.concat("_attributes")
|
118
|
+
key.to_s.dup.concat("_attributes")
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
@@ -457,9 +457,10 @@ module ActionController
|
|
457
457
|
# respectively which will make tests more expressive.
|
458
458
|
#
|
459
459
|
# Note that the request method is not verified.
|
460
|
-
def process(action, method: "GET", params:
|
460
|
+
def process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil)
|
461
461
|
check_required_ivars
|
462
462
|
|
463
|
+
action = action.to_s.dup
|
463
464
|
http_method = method.to_s.upcase
|
464
465
|
|
465
466
|
@html_document = nil
|
@@ -485,17 +486,17 @@ module ActionController
|
|
485
486
|
format ||= as
|
486
487
|
end
|
487
488
|
|
488
|
-
parameters = params.symbolize_keys
|
489
|
+
parameters = (params || {}).symbolize_keys
|
489
490
|
|
490
491
|
if format
|
491
492
|
parameters[:format] = format
|
492
493
|
end
|
493
494
|
|
494
|
-
generated_extras = @routes.generate_extras(parameters.merge(controller: controller_class_name, action: action
|
495
|
+
generated_extras = @routes.generate_extras(parameters.merge(controller: controller_class_name, action: action))
|
495
496
|
generated_path = generated_path(generated_extras)
|
496
497
|
query_string_keys = query_parameter_names(generated_extras)
|
497
498
|
|
498
|
-
@request.assign_parameters(@routes, controller_class_name, action
|
499
|
+
@request.assign_parameters(@routes, controller_class_name, action, parameters, generated_path, query_string_keys)
|
499
500
|
|
500
501
|
@request.session.update(session) if session
|
501
502
|
@request.flash.update(flash || {})
|
@@ -197,10 +197,12 @@ module ActionDispatch
|
|
197
197
|
if control.empty?
|
198
198
|
# Let middleware handle default behavior
|
199
199
|
elsif control[:no_cache]
|
200
|
-
|
201
|
-
if control[:
|
202
|
-
|
203
|
-
|
200
|
+
options = []
|
201
|
+
options << PUBLIC if control[:public]
|
202
|
+
options << NO_CACHE
|
203
|
+
options.concat(control[:extras]) if control[:extras]
|
204
|
+
|
205
|
+
self._cache_control = options.join(", ")
|
204
206
|
else
|
205
207
|
extras = control[:extras]
|
206
208
|
max_age = control[:max_age]
|
@@ -29,9 +29,10 @@ module ActionDispatch
|
|
29
29
|
#
|
30
30
|
# Rails.application.config.session_store :cookie_store, key: '_your_app_session'
|
31
31
|
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# encrypted in the
|
32
|
+
# In the development and test environments your application's secret key base is
|
33
|
+
# generated by Rails and stored in a temporary file in <tt>tmp/development_secret.txt</tt>.
|
34
|
+
# In all other environments, it is stored encrypted in the
|
35
|
+
# <tt>config/credentials.yml.enc</tt> file.
|
35
36
|
#
|
36
37
|
# If your application was not updated to Rails 5.2 defaults, the secret_key_base
|
37
38
|
# will be found in the old <tt>config/secrets.yml</tt> file.
|
@@ -97,8 +97,8 @@ module ActionDispatch
|
|
97
97
|
middlewares.push(build_middleware(klass, args, block))
|
98
98
|
end
|
99
99
|
|
100
|
-
def build(app =
|
101
|
-
middlewares.freeze.reverse.inject(app) { |a, e| e.build(a) }
|
100
|
+
def build(app = nil, &block)
|
101
|
+
middlewares.freeze.reverse.inject(app || block) { |a, e| e.build(a) }
|
102
102
|
end
|
103
103
|
|
104
104
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.2.
|
19
|
+
version: 5.2.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.2.
|
26
|
+
version: 5.2.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.2.
|
95
|
+
version: 5.2.4
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - '='
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 5.2.
|
102
|
+
version: 5.2.4
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: activemodel
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 5.2.
|
109
|
+
version: 5.2.4
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 5.2.
|
116
|
+
version: 5.2.4
|
117
117
|
description: Web apps on Rails. Simple, battle-tested conventions for building and
|
118
118
|
testing MVC web applications. Works with any Rack-compatible server.
|
119
119
|
email: david@loudthinking.com
|
@@ -293,8 +293,8 @@ homepage: http://rubyonrails.org
|
|
293
293
|
licenses:
|
294
294
|
- MIT
|
295
295
|
metadata:
|
296
|
-
source_code_uri: https://github.com/rails/rails/tree/v5.2.
|
297
|
-
changelog_uri: https://github.com/rails/rails/blob/v5.2.
|
296
|
+
source_code_uri: https://github.com/rails/rails/tree/v5.2.4/actionpack
|
297
|
+
changelog_uri: https://github.com/rails/rails/blob/v5.2.4/actionpack/CHANGELOG.md
|
298
298
|
post_install_message:
|
299
299
|
rdoc_options: []
|
300
300
|
require_paths:
|
@@ -311,8 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
version: '0'
|
312
312
|
requirements:
|
313
313
|
- none
|
314
|
-
|
315
|
-
rubygems_version: 2.7.6
|
314
|
+
rubygems_version: 3.0.3
|
316
315
|
signing_key:
|
317
316
|
specification_version: 4
|
318
317
|
summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).
|