Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-actionpack-7.0 for 
openSUSE:Factory checked in at 2022-10-12 18:24:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-actionpack-7.0 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-actionpack-7.0.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-actionpack-7.0"

Wed Oct 12 18:24:48 2022 rev:6 rq:1010024 version:7.0.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-actionpack-7.0/rubygem-actionpack-7.0.changes
    2022-08-06 22:07:46.818590654 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-actionpack-7.0.new.2275/rubygem-actionpack-7.0.changes
  2022-10-12 18:26:28.797926068 +0200
@@ -1,0 +2,17 @@
+Mon Oct 10 12:51:58 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 7.0.4
+ see installed CHANGELOG.md
+
+  ## Rails 7.0.4 (September 09, 2022) ##
+  
+  *   Prevent `ActionDispatch::ServerTiming` from overwriting existing values 
in `Server-Timing`.
+  
+      Previously, if another middleware down the chain set `Server-Timing` 
header,
+      it would overwritten by `ActionDispatch::ServerTiming`.
+  
+      *Jakub Malinowski*
+  
+  
+
+-------------------------------------------------------------------

Old:
----
  actionpack-7.0.3.1.gem

New:
----
  actionpack-7.0.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-actionpack-7.0.spec ++++++
--- /var/tmp/diff_new_pack.FwdocY/_old  2022-10-12 18:26:29.213926983 +0200
+++ /var/tmp/diff_new_pack.FwdocY/_new  2022-10-12 18:26:29.217926992 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-actionpack-7.0
-Version:        7.0.3.1
+Version:        7.0.4
 Release:        0
 %define mod_name actionpack
 %define mod_full_name %{mod_name}-%{version}

++++++ actionpack-7.0.3.1.gem -> actionpack-7.0.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2022-07-12 19:30:27.000000000 +0200
+++ new/CHANGELOG.md    2022-09-09 20:42:19.000000000 +0200
@@ -1,3 +1,13 @@
+## Rails 7.0.4 (September 09, 2022) ##
+
+*   Prevent `ActionDispatch::ServerTiming` from overwriting existing values in 
`Server-Timing`.
+
+    Previously, if another middleware down the chain set `Server-Timing` 
header,
+    it would overwritten by `ActionDispatch::ServerTiming`.
+
+    *Jakub Malinowski*
+
+
 ## Rails 7.0.3.1 (July 12, 2022) ##
 
 *   No changes.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/abstract_controller/helpers.rb 
new/lib/abstract_controller/helpers.rb
--- old/lib/abstract_controller/helpers.rb      2022-07-12 19:30:27.000000000 
+0200
+++ new/lib/abstract_controller/helpers.rb      2022-09-09 20:42:19.000000000 
+0200
@@ -110,7 +110,7 @@
       # The last two assume that <tt>"foo".camelize</tt> returns "Foo".
       #
       # When strings or symbols are passed, the method finds the actual module
-      # object using +String#constantize+. Therefore, if the module has not 
been
+      # object using String#constantize. Therefore, if the module has not been
       # yet loaded, it has to be autoloadable, which is normally the case.
       #
       # Namespaces are supported. The following calls include +Foo::BarHelper+:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_controller/metal/redirecting.rb 
new/lib/action_controller/metal/redirecting.rb
--- old/lib/action_controller/metal/redirecting.rb      2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_controller/metal/redirecting.rb      2022-09-09 
20:42:19.000000000 +0200
@@ -117,7 +117,7 @@
     # * <tt>:allow_other_host</tt> - Allow or disallow redirection to the host 
that is different to the current host, defaults to true.
     #
     # All other options that can be passed to #redirect_to are accepted as
-    # options and the behavior is identical.
+    # options, and the behavior is identical.
     def redirect_back_or_to(fallback_location, allow_other_host: 
_allow_other_host, **options)
       if request.referer && (allow_other_host || 
_url_host_allowed?(request.referer))
         redirect_to request.referer, allow_other_host: allow_other_host, 
**options
@@ -195,7 +195,8 @@
       end
 
       def _url_host_allowed?(url)
-        [request.host, nil].include?(URI(url.to_s).host)
+        host = URI(url.to_s).host
+        host == request.host || host.nil? && url.to_s.start_with?("/")
       rescue ArgumentError, URI::Error
         false
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_controller/metal/rendering.rb 
new/lib/action_controller/metal/rendering.rb
--- old/lib/action_controller/metal/rendering.rb        2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_controller/metal/rendering.rb        2022-09-09 
20:42:19.000000000 +0200
@@ -78,8 +78,8 @@
       end
 
       def _set_vary_header
-        if self.headers["Vary"].blank? && request.should_apply_vary_header?
-          self.headers["Vary"] = "Accept"
+        if response.headers["Vary"].blank? && request.should_apply_vary_header?
+          response.headers["Vary"] = "Accept"
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_controller/metal/strong_parameters.rb 
new/lib/action_controller/metal/strong_parameters.rb
--- old/lib/action_controller/metal/strong_parameters.rb        2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_controller/metal/strong_parameters.rb        2022-09-09 
20:42:19.000000000 +0200
@@ -279,10 +279,15 @@
         @parameters == other
       end
     end
-    alias eql? ==
+
+    def eql?(other)
+      self.class == other.class &&
+        permitted? == other.permitted? &&
+        parameters.eql?(other.parameters)
+    end
 
     def hash
-      [@parameters.hash, @permitted].hash
+      [self.class, @parameters, @permitted].hash
     end
 
     # Returns a safe <tt>ActiveSupport::HashWithIndifferentAccess</tt>
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    2022-07-12 19:30:27.000000000 
+0200
+++ new/lib/action_dispatch/http/response.rb    2022-09-09 20:42:19.000000000 
+0200
@@ -21,9 +21,8 @@
   # Nevertheless, integration tests may want to inspect controller responses in
   # more detail, and that's when \Response can be useful for application
   # developers. Integration test methods such as
-  # ActionDispatch::Integration::Session#get and
-  # ActionDispatch::Integration::Session#post return objects of type
-  # TestResponse (which are of course also of type \Response).
+  # Integration::RequestHelpers#get and Integration::RequestHelpers#post return
+  # objects of type TestResponse (which are of course also of type \Response).
   #
   # For example, the following demo integration test prints the body of the
   # controller response to the console:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_dispatch/middleware/cookies.rb 
new/lib/action_dispatch/middleware/cookies.rb
--- old/lib/action_dispatch/middleware/cookies.rb       2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_dispatch/middleware/cookies.rb       2022-09-09 
20:42:19.000000000 +0200
@@ -92,7 +92,7 @@
     include RequestCookieMethods
   end
 
-  # Read and write data to cookies through ActionController#cookies.
+  # Read and write data to cookies through ActionController::Base#cookies.
   #
   # When reading cookie data, the data is read from the HTTP request header, 
Cookie.
   # When writing cookie data, the data is sent out in the HTTP response 
header, Set-Cookie.
@@ -178,8 +178,7 @@
   #   only HTTP. Defaults to +false+.
   # * <tt>:same_site</tt> - The value of the +SameSite+ cookie attribute, which
   #   determines how this cookie should be restricted in cross-site contexts.
-  #   Possible values are +nil+, +:none+, +:lax+, and +:strict+. Defaults to
-  #   +:lax+.
+  #   Possible values are +:none+, +:lax+, and +:strict+. Defaults to +:lax+.
   class Cookies
     HTTP_HEADER   = "Set-Cookie"
     GENERATOR_KEY = "action_dispatch.key_generator"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_dispatch/middleware/server_timing.rb 
new/lib/action_dispatch/middleware/server_timing.rb
--- old/lib/action_dispatch/middleware/server_timing.rb 2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_dispatch/middleware/server_timing.rb 2022-09-09 
20:42:19.000000000 +0200
@@ -6,28 +6,71 @@
   class ServerTiming
     SERVER_TIMING_HEADER = "Server-Timing"
 
+    class Subscriber # :nodoc:
+      include Singleton
+      KEY = :action_dispatch_server_timing_events
+
+      def initialize
+        @mutex = Mutex.new
+      end
+
+      def call(event)
+        if events = ActiveSupport::IsolatedExecutionState[KEY]
+          events << event
+        end
+      end
+
+      def collect_events
+        events = []
+        ActiveSupport::IsolatedExecutionState[KEY] = events
+        yield
+        events
+      ensure
+        ActiveSupport::IsolatedExecutionState.delete(KEY)
+      end
+
+      def ensure_subscribed
+        @mutex.synchronize do
+          # Subscribe to all events, except those beginning with "!"
+          # Ideally we would be more selective of what is being measured
+          @subscriber ||= ActiveSupport::Notifications.subscribe(/\A[^!]/, 
self)
+        end
+      end
+
+      def unsubscribe
+        @mutex.synchronize do
+          ActiveSupport::Notifications.unsubscribe @subscriber
+          @subscriber = nil
+        end
+      end
+    end
+
+    def self.unsubscribe # :nodoc:
+      Subscriber.instance.unsubscribe
+    end
+
     def initialize(app)
       @app = app
+      @subscriber = Subscriber.instance
+      @subscriber.ensure_subscribed
     end
 
     def call(env)
-      events = []
-      subscriber = ActiveSupport::Notifications.subscribe(/.*/) do |*args|
-        events << ActiveSupport::Notifications::Event.new(*args)
+      response = nil
+      events = @subscriber.collect_events do
+        response = @app.call(env)
       end
 
-      status, headers, body = begin
-        @app.call(env)
-      ensure
-        ActiveSupport::Notifications.unsubscribe(subscriber)
-      end
+      headers = response[1]
 
       header_info = events.group_by(&:name).map do |event_name, 
events_collection|
-        "#{event_name};dur=#{events_collection.sum(&:duration)}"
+        "%s;dur=%.2f" % [event_name, events_collection.sum(&:duration)]
       end
+
+      header_info.prepend(headers[SERVER_TIMING_HEADER]) if 
headers[SERVER_TIMING_HEADER].present?
       headers[SERVER_TIMING_HEADER] = header_info.join(", ")
 
-      [ status, headers, body ]
+      response
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/action_dispatch/middleware/session/cookie_store.rb 
new/lib/action_dispatch/middleware/session/cookie_store.rb
--- old/lib/action_dispatch/middleware/session/cookie_store.rb  2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_dispatch/middleware/session/cookie_store.rb  2022-09-09 
20:42:19.000000000 +0200
@@ -9,14 +9,14 @@
     # This cookie-based session store is the Rails default. It is
     # dramatically faster than the alternatives.
     #
-    # Sessions typically contain at most a user_id and flash message; both fit
-    # within the 4096 bytes cookie size limit. A CookieOverflow exception is 
raised if
+    # Sessions typically contain at most a user ID and flash message; both fit
+    # within the 4096 bytes cookie size limit. A +CookieOverflow+ exception is 
raised if
     # you attempt to store more than 4096 bytes of data.
     #
     # The cookie jar used for storage is automatically configured to be the
     # best possible option given your application's configuration.
     #
-    # Your cookies will be encrypted using your apps secret_key_base. This
+    # Your cookies will be encrypted using your application's 
+secret_key_base+. This
     # goes a step further than signed cookies in that encrypted cookies cannot
     # be altered or read by users. This is the default starting in Rails 4.
     #
@@ -24,20 +24,20 @@
     #
     #   Rails.application.config.session_store :cookie_store, key: 
'_your_app_session'
     #
-    # In the development and test environments your application's secret key 
base is
+    # In the development and test environments your application's 
+secret_key_base+ is
     # generated by Rails and stored in a temporary file in 
<tt>tmp/development_secret.txt</tt>.
     # In all other environments, it is stored encrypted in the
     # <tt>config/credentials.yml.enc</tt> file.
     #
-    # If your application was not updated to Rails 5.2 defaults, the 
secret_key_base
+    # If your application was not updated to Rails 5.2 defaults, the 
+secret_key_base+
     # will be found in the old <tt>config/secrets.yml</tt> file.
     #
-    # Note that changing your secret_key_base will invalidate all existing 
session.
+    # Note that changing your +secret_key_base+ will invalidate all existing 
session.
     # Additionally, you should take care to make sure you are not relying on 
the
     # ability to decode signed cookies generated by your app in external
     # applications or JavaScript before changing it.
     #
-    # Because CookieStore extends Rack::Session::Abstract::Persisted, many of 
the
+    # Because CookieStore extends +Rack::Session::Abstract::Persisted+, many 
of the
     # options described there can be used to customize the session cookie that
     # is generated. For example:
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_dispatch/routing/mapper.rb 
new/lib/action_dispatch/routing/mapper.rb
--- old/lib/action_dispatch/routing/mapper.rb   2022-07-12 19:30:27.000000000 
+0200
+++ new/lib/action_dispatch/routing/mapper.rb   2022-09-09 20:42:19.000000000 
+0200
@@ -609,7 +609,7 @@
           target_as       = name_for_action(options[:as], path)
           options[:via] ||= :all
 
-          match(path, options.merge(to: app, anchor: false, format: false))
+          match(path, { to: app, anchor: false, format: false }.merge(options))
 
           define_generate_prefix(app, target_as) if rails_app
           self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/action_dispatch/testing/test_response.rb 
new/lib/action_dispatch/testing/test_response.rb
--- old/lib/action_dispatch/testing/test_response.rb    2022-07-12 
19:30:27.000000000 +0200
+++ new/lib/action_dispatch/testing/test_response.rb    2022-09-09 
20:42:19.000000000 +0200
@@ -3,8 +3,8 @@
 require "action_dispatch/testing/request_encoder"
 
 module ActionDispatch
-  # Integration test methods such as ActionDispatch::Integration::Session#get
-  # and ActionDispatch::Integration::Session#post return objects of class
+  # Integration test methods such as Integration::RequestHelpers#get
+  # and Integration::RequestHelpers#post return objects of class
   # TestResponse, which represent the HTTP response results of the requested
   # controller actions.
   #
@@ -14,6 +14,24 @@
       new response.status, response.headers, response.body
     end
 
+    # Returns a parsed body depending on the response MIME type. When a parser
+    # corresponding to the MIME type is not found, it returns the raw body.
+    #
+    # ==== Examples
+    #   get "/posts"
+    #   response.content_type      # => "text/html; charset=utf-8"
+    #   response.parsed_body.class # => String
+    #   response.parsed_body       # => "<!DOCTYPE html>\n<html>\n..."
+    #
+    #   get "/posts.json"
+    #   response.content_type      # => "application/json; charset=utf-8"
+    #   response.parsed_body.class # => Array
+    #   response.parsed_body       # => [{"id"=>42, "title"=>"Title"},...
+    #
+    #   get "/posts/42.json"
+    #   response.content_type      # => "application/json; charset=utf-8"
+    #   response.parsed_body.class # => Hash
+    #   response.parsed_body       # => {"id"=>42, "title"=>"Title"}
     def parsed_body
       @parsed_body ||= response_parser.call(body)
     end
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  2022-07-12 19:30:27.000000000 +0200
+++ new/lib/action_pack/gem_version.rb  2022-09-09 20:42:19.000000000 +0200
@@ -9,8 +9,8 @@
   module VERSION
     MAJOR = 7
     MINOR = 0
-    TINY  = 3
-    PRE   = "1"
+    TINY  = 4
+    PRE   = nil
 
     STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-07-12 19:30:27.000000000 +0200
+++ new/metadata        2022-09-09 20:42:19.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: actionpack
 version: !ruby/object:Gem::Version
-  version: 7.0.3.1
+  version: 7.0.4
 platform: ruby
 authors:
 - David Heinemeier Hansson
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2022-07-12 00:00:00.000000000 Z
+date: 2022-09-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -16,14 +16,14 @@
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
 - !ruby/object:Gem::Dependency
   name: rack
   requirement: !ruby/object:Gem::Requirement
@@ -98,28 +98,28 @@
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
 - !ruby/object:Gem::Dependency
   name: activemodel
   requirement: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - '='
       - !ruby/object:Gem::Version
-        version: 7.0.3.1
+        version: 7.0.4
 description: Web apps on Rails. Simple, battle-tested conventions for building 
and
   testing MVC web applications. Works with any Rack-compatible server.
 email: [email protected]
@@ -310,10 +310,10 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/rails/rails/issues
-  changelog_uri: 
https://github.com/rails/rails/blob/v7.0.3.1/actionpack/CHANGELOG.md
-  documentation_uri: https://api.rubyonrails.org/v7.0.3.1/
+  changelog_uri: 
https://github.com/rails/rails/blob/v7.0.4/actionpack/CHANGELOG.md
+  documentation_uri: https://api.rubyonrails.org/v7.0.4/
   mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
-  source_code_uri: https://github.com/rails/rails/tree/v7.0.3.1/actionpack
+  source_code_uri: https://github.com/rails/rails/tree/v7.0.4/actionpack
   rubygems_mfa_required: 'true'
 post_install_message:
 rdoc_options: []

Reply via email to