actionpack 5.2.2.1 → 5.2.3.rc1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9686bc2c9cf4b71579f2d649c8c81fec5707ee986c47d41aa2f14fc0622c984
4
- data.tar.gz: 3a534257c1572984d2cb204a13fa09036a06d84ad5e7d2d1a66400d89a184b30
3
+ metadata.gz: 771c9801723cb04594f902ec341db60241bbfe7f2cb307523418ec438ebf6331
4
+ data.tar.gz: 8bdf44fd40ae05d43c3a51643c64772fa2c8f006fe706d2fe475b598f5cfebfd
5
5
  SHA512:
6
- metadata.gz: 6fc58920ac68f8094f8046fa2196fd62396cb7171aac592372783d7a8dad3d6bc88702b156e4a28895974cd5c673325dddc798562b0f8d78d10e807a1f1b5d3c
7
- data.tar.gz: 0a0fabdba536836f9448c3733d4a05de8af463533df6f56d90100073b849ba640dc4794467fce6784296600151d94b28662efee15954dfbbeb1138821b4727c8
6
+ metadata.gz: 3541ef15ed87b1c56825149a181aa117109f55b5f327ef5ee6e029fba10d705cc39972e87e75cb5dda6d6053d830ca50eb6db52efb0ca916f3c5b8687256e676
7
+ data.tar.gz: 789c29c0bf2c133b98056e796a5c04d235c700227c573d9e73f396c26d24af3e40ad1abf48deb3221ddc82f50fbee39b48be0684ff552cce2e541d7708c68d05
@@ -1,3 +1,20 @@
1
+ ## Rails 5.2.3.rc1 (March 21, 2019) ##
2
+
3
+ * Allow using combine the Cache Control `public` and `no-cache` headers.
4
+
5
+ Before this change, even if `public` was specified for Cache Control header,
6
+ it was excluded when `no-cache` was included. This fixed to keep `public`
7
+ header as is.
8
+
9
+ Fixes #34780.
10
+
11
+ *Yuji Yaginuma*
12
+
13
+ * Allow `nil` params for `ActionController::TestCase`.
14
+
15
+ *Ryo Nakamura*
16
+
17
+
1
18
  ## Rails 5.2.2.1 (March 11, 2019) ##
2
19
 
3
20
  * No changes.
@@ -457,7 +457,7 @@ 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: {}, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil)
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
463
  http_method = method.to_s.upcase
@@ -485,7 +485,7 @@ module ActionController
485
485
  format ||= as
486
486
  end
487
487
 
488
- parameters = params.symbolize_keys
488
+ parameters = (params || {}).symbolize_keys
489
489
 
490
490
  if format
491
491
  parameters[:format] = format
@@ -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
- self._cache_control = NO_CACHE
201
- if control[:extras]
202
- self._cache_control = _cache_control + ", #{control[:extras].join(', ')}"
203
- end
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]
@@ -82,6 +82,7 @@ module ActionDispatch # :nodoc:
82
82
  SET_COOKIE = "Set-Cookie".freeze
83
83
  LOCATION = "Location".freeze
84
84
  NO_CONTENT_CODES = [100, 101, 102, 204, 205, 304]
85
+ CONTENT_TYPE_PARSER = /\A(?<type>[^;\s]+)?(?:.*;\s*charset=(?<quote>"?)(?<charset>[^;\s]+)\k<quote>)?/ # :nodoc:
85
86
 
86
87
  cattr_accessor :default_charset, default: "utf-8"
87
88
  cattr_accessor :default_headers
@@ -409,10 +410,8 @@ module ActionDispatch # :nodoc:
409
410
  NullContentTypeHeader = ContentTypeHeader.new nil, nil
410
411
 
411
412
  def parse_content_type(content_type)
412
- if content_type
413
- type, charset = content_type.split(/;\s*charset=/)
414
- type = nil if type && type.empty?
415
- ContentTypeHeader.new(type, charset)
413
+ if content_type && match = CONTENT_TYPE_PARSER.match(content_type)
414
+ ContentTypeHeader.new(match[:type], match[:charset])
416
415
  else
417
416
  NullContentTypeHeader
418
417
  end
@@ -119,7 +119,7 @@ module ActionDispatch
119
119
 
120
120
  class UnanchoredRegexp < AnchoredRegexp # :nodoc:
121
121
  def accept(node)
122
- %r{\A#{visit node}}
122
+ %r{\A#{visit node}(?:\b|\Z)}
123
123
  end
124
124
  end
125
125
 
@@ -9,8 +9,8 @@ module ActionPack
9
9
  module VERSION
10
10
  MAJOR = 5
11
11
  MINOR = 2
12
- TINY = 2
13
- PRE = "1"
12
+ TINY = 3
13
+ PRE = "rc1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
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.2.1
4
+ version: 5.2.3.rc1
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: 2019-03-13 00:00:00.000000000 Z
11
+ date: 2019-03-22 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.2.1
19
+ version: 5.2.3.rc1
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.2.1
26
+ version: 5.2.3.rc1
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.2.1
95
+ version: 5.2.3.rc1
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.2.1
102
+ version: 5.2.3.rc1
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.2.1
109
+ version: 5.2.3.rc1
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.2.1
116
+ version: 5.2.3.rc1
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.2.1/actionpack
297
- changelog_uri: https://github.com/rails/rails/blob/v5.2.2.1/actionpack/CHANGELOG.md
296
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.3.rc1/actionpack
297
+ changelog_uri: https://github.com/rails/rails/blob/v5.2.3.rc1/actionpack/CHANGELOG.md
298
298
  post_install_message:
299
299
  rdoc_options: []
300
300
  require_paths:
@@ -306,9 +306,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
306
306
  version: 2.2.2
307
307
  required_rubygems_version: !ruby/object:Gem::Requirement
308
308
  requirements:
309
- - - ">="
309
+ - - ">"
310
310
  - !ruby/object:Gem::Version
311
- version: '0'
311
+ version: 1.3.1
312
312
  requirements:
313
313
  - none
314
314
  rubygems_version: 3.0.1