Hello community, here is the log from the commit of package rubygem-actionpack-5.2 for openSUSE:Factory checked in at 2019-11-30 10:39:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-actionpack-5.2 (Old) and /work/SRC/openSUSE:Factory/.rubygem-actionpack-5.2.new.26869 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-actionpack-5.2" Sat Nov 30 10:39:12 2019 rev:7 rq:751752 version:5.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-actionpack-5.2/rubygem-actionpack-5.2.changes 2019-04-01 12:35:47.609839570 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-actionpack-5.2.new.26869/rubygem-actionpack-5.2.changes 2019-11-30 10:40:40.904148404 +0100 @@ -1,0 +2,7 @@ +Thu Nov 28 12:52:16 UTC 2019 - Manuel Schnitzer <mschnitzer@suse.com> + +- updated to version 5.2.4 + + * no changes + +------------------------------------------------------------------- Old: ---- actionpack-5.2.3.gem New: ---- actionpack-5.2.4.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-actionpack-5.2.spec ++++++ --- /var/tmp/diff_new_pack.ZjoacJ/_old 2019-11-30 10:40:41.924148281 +0100 +++ /var/tmp/diff_new_pack.ZjoacJ/_new 2019-11-30 10:40:41.928148281 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-actionpack-5.2 -Version: 5.2.3 +Version: 5.2.4 Release: 0 %define mod_name actionpack %define mod_full_name %{mod_name}-%{version} ++++++ actionpack-5.2.3.gem -> actionpack-5.2.4.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2019-03-28 04:02:01.000000000 +0100 +++ new/CHANGELOG.md 2019-11-27 16:40:09.000000000 +0100 @@ -1,10 +1,15 @@ +## Rails 5.2.4 (November 27, 2019) ## + +* No changes. + + ## Rails 5.2.3 (March 27, 2019) ## -* Allow using combine the Cache Control `public` and `no-cache` headers. +* Allow using `public` and `no-cache` together in the the Cache Control header. - Before this change, even if `public` was specified for Cache Control header, - it was excluded when `no-cache` was included. This fixed to keep `public` - header as is. + Before this change, even if `public` was specified in the Cache Control header, + it was excluded when `no-cache` was included. This change preserves the + `public` value as is. Fixes #34780. @@ -186,6 +191,34 @@ * Matches behavior of `Hash#each` in `ActionController::Parameters#each`. + 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. + + # Parameters: {"param"=>"1", "param_two"=>"2"} + def index + params.each do |name| + puts name + end + end + + # Prints + # param + # param_two + + 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. + + To fix the code above simply change as per example below: + + # Parameters: {"param"=>"1", "param_two"=>"2"} + def index + params.each do |name, value| + puts name + end + end + + # Prints + # param + # param_two + *Dominic Cleal* * Add `Referrer-Policy` header to default headers set. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_controller/metal/params_wrapper.rb new/lib/action_controller/metal/params_wrapper.rb --- old/lib/action_controller/metal/params_wrapper.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_controller/metal/params_wrapper.rb 2019-11-27 16:40:09.000000000 +0100 @@ -93,7 +93,7 @@ end def model - super || synchronize { super || self.model = _default_wrap_model } + super || self.model = _default_wrap_model end def include @@ -115,7 +115,7 @@ if m.respond_to?(:nested_attributes_options) && m.nested_attributes_options.keys.any? self.include += m.nested_attributes_options.keys.map do |key| - key.to_s.concat("_attributes") + key.to_s.dup.concat("_attributes") end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_controller/metal.rb new/lib/action_controller/metal.rb --- old/lib/action_controller/metal.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_controller/metal.rb 2019-11-27 16:40:09.000000000 +0100 @@ -26,10 +26,10 @@ end end - def build(action, app = Proc.new) + def build(action, app = nil, &block) action = action.to_s - middlewares.reverse.inject(app) do |a, middleware| + middlewares.reverse.inject(app || block) do |a, middleware| middleware.valid?(action) ? middleware.build(a) : a end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_controller/test_case.rb new/lib/action_controller/test_case.rb --- old/lib/action_controller/test_case.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_controller/test_case.rb 2019-11-27 16:40:09.000000000 +0100 @@ -460,6 +460,7 @@ def process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil) check_required_ivars + action = action.to_s.dup http_method = method.to_s.upcase @html_document = nil @@ -491,11 +492,11 @@ parameters[:format] = format end - generated_extras = @routes.generate_extras(parameters.merge(controller: controller_class_name, action: action.to_s)) + generated_extras = @routes.generate_extras(parameters.merge(controller: controller_class_name, action: action)) generated_path = generated_path(generated_extras) query_string_keys = query_parameter_names(generated_extras) - @request.assign_parameters(@routes, controller_class_name, action.to_s, parameters, generated_path, query_string_keys) + @request.assign_parameters(@routes, controller_class_name, action, parameters, generated_path, query_string_keys) @request.session.update(session) if session @request.flash.update(flash || {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_dispatch/http/response.rb new/lib/action_dispatch/http/response.rb --- old/lib/action_dispatch/http/response.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_dispatch/http/response.rb 2019-11-27 16:40:09.000000000 +0100 @@ -82,7 +82,6 @@ SET_COOKIE = "Set-Cookie".freeze LOCATION = "Location".freeze NO_CONTENT_CODES = [100, 101, 102, 204, 205, 304] - CONTENT_TYPE_PARSER = /\A(?<type>[^;\s]+)?(?:.*;\s*charset=(?<quote>"?)(?<charset>[^;\s]+)\k<quote>)?/ # :nodoc: cattr_accessor :default_charset, default: "utf-8" cattr_accessor :default_headers @@ -410,8 +409,10 @@ NullContentTypeHeader = ContentTypeHeader.new nil, nil def parse_content_type(content_type) - if content_type && match = CONTENT_TYPE_PARSER.match(content_type) - ContentTypeHeader.new(match[:type], match[:charset]) + if content_type + type, charset = content_type.split(/;\s*charset=/) + type = nil if type && type.empty? + ContentTypeHeader.new(type, charset) else NullContentTypeHeader end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_dispatch/journey/path/pattern.rb new/lib/action_dispatch/journey/path/pattern.rb --- old/lib/action_dispatch/journey/path/pattern.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_dispatch/journey/path/pattern.rb 2019-11-27 16:40:09.000000000 +0100 @@ -119,7 +119,8 @@ class UnanchoredRegexp < AnchoredRegexp # :nodoc: def accept(node) - %r{\A#{visit node}(?:\b|\Z)} + path = visit node + path == "/" ? %r{\A/} : %r{\A#{path}(?:\b|\Z|/)} end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_dispatch/middleware/stack.rb new/lib/action_dispatch/middleware/stack.rb --- old/lib/action_dispatch/middleware/stack.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_dispatch/middleware/stack.rb 2019-11-27 16:40:09.000000000 +0100 @@ -97,8 +97,8 @@ middlewares.push(build_middleware(klass, args, block)) end - def build(app = Proc.new) - middlewares.freeze.reverse.inject(app) { |a, e| e.build(a) } + def build(app = nil, &block) + middlewares.freeze.reverse.inject(app || block) { |a, e| e.build(a) } end private diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_pack/gem_version.rb new/lib/action_pack/gem_version.rb --- old/lib/action_pack/gem_version.rb 2019-03-28 04:02:01.000000000 +0100 +++ new/lib/action_pack/gem_version.rb 2019-11-27 16:40:09.000000000 +0100 @@ -9,7 +9,7 @@ module VERSION MAJOR = 5 MINOR = 2 - TINY = 3 + TINY = 4 PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-03-28 04:02:01.000000000 +0100 +++ new/metadata 2019-11-27 16:40:09.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: actionpack version: !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: bin cert_chain: [] -date: 2019-03-28 00:00:00.000000000 Z +date: 2019-11-27 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: activesupport @@ -16,14 +16,14 @@ requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 - !ruby/object:Gem::Dependency name: rack requirement: !ruby/object:Gem::Requirement @@ -92,28 +92,28 @@ requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 - !ruby/object:Gem::Dependency name: activemodel requirement: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 5.2.3 + version: 5.2.4 description: Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server. email: david@loudthinking.com @@ -293,8 +293,8 @@ licenses: - MIT metadata: - source_code_uri: https://github.com/rails/rails/tree/v5.2.3/actionpack - changelog_uri: https://github.com/rails/rails/blob/v5.2.3/actionpack/CHANGELOG.md + source_code_uri: https://github.com/rails/rails/tree/v5.2.4/actionpack + changelog_uri: https://github.com/rails/rails/blob/v5.2.4/actionpack/CHANGELOG.md post_install_message: rdoc_options: [] require_paths: @@ -311,7 +311,7 @@ version: '0' requirements: - none -rubygems_version: 3.0.1 +rubygems_version: 3.0.3 signing_key: specification_version: 4 summary: Web-flow and rendering framework putting the VC in MVC (part of Rails).