Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-activesupport-7.0 for openSUSE:Factory checked in at 2023-07-03 17:43:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-7.0 (Old) and /work/SRC/openSUSE:Factory/.rubygem-activesupport-7.0.new.13546 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activesupport-7.0" Mon Jul 3 17:43:13 2023 rev:10 rq:1096445 version:7.0.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-activesupport-7.0/rubygem-activesupport-7.0.changes 2023-04-21 18:47:53.072207264 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-activesupport-7.0.new.13546/rubygem-activesupport-7.0.changes 2023-07-03 17:43:18.268901935 +0200 @@ -1,0 +2,12 @@ +Tue Jun 27 19:31:15 UTC 2023 - Mykola Krachkovsky <w01dn...@gmail.com> + +- updated to version 7.0.5.1 + * https://rubyonrails.org/2023/6/26/Rails-Versions-7-0-5-1-6-1-7-4-have-been-released + +------------------------------------------------------------------- +Mon Jun 26 19:13:16 UTC 2023 - Mykola Krachkovsky <w01dn...@gmail.com> + +- updated to version 7.0.5 + * https://rubyonrails.org/2023/5/24/Rails-7-0-5-has-been-released + +------------------------------------------------------------------- Old: ---- activesupport-7.0.4.3.gem New: ---- activesupport-7.0.5.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-activesupport-7.0.spec ++++++ --- /var/tmp/diff_new_pack.p86sv0/_old 2023-07-03 17:43:18.868905467 +0200 +++ /var/tmp/diff_new_pack.p86sv0/_new 2023-07-03 17:43:18.876905514 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-activesupport-7.0 -Version: 7.0.4.3 +Version: 7.0.5.1 Release: 0 %define mod_name activesupport %define mod_full_name %{mod_name}-%{version} ++++++ activesupport-7.0.4.3.gem -> activesupport-7.0.5.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2023-03-13 19:52:45.000000000 +0100 +++ new/CHANGELOG.md 2023-06-26 23:35:09.000000000 +0200 @@ -1,3 +1,15 @@ +## Rails 7.0.5.1 (June 26, 2023) ## + +* No changes. + + +## Rails 7.0.5 (May 24, 2023) ## + +* Fixes TimeWithZone ArgumentError. + + *Niklas Häusele* + + ## Rails 7.0.4.3 (March 13, 2023) ## * Implement SafeBuffer#bytesplice @@ -19,6 +31,19 @@ ## Rails 7.0.4 (September 09, 2022) ## +* Ensure `ActiveSupport::Testing::Isolation::Forking` closes pipes + + Previously, `Forking.run_in_isolation` opened two ends of a pipe. The fork + process closed the read end, wrote to it, and then terminated (which + presumably closed the file descriptors on its end). The parent process + closed the write end, read from it, and returned, never closing the read + end. + + This resulted in an accumulation of open file descriptors, which could + cause errors if the limit is reached. + + *Sam Bostock* + * Redis cache store is now compatible with redis-rb 5.0. *Jean Boussier* Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/date/calculations.rb new/lib/active_support/core_ext/date/calculations.rb --- old/lib/active_support/core_ext/date/calculations.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/date/calculations.rb 2023-06-26 23:35:09.000000000 +0200 @@ -109,6 +109,21 @@ # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with # any of these keys: <tt>:years</tt>, <tt>:months</tt>, <tt>:weeks</tt>, <tt>:days</tt>. + # + # The increments are applied in order of time units from largest to smallest. + # In other words, the date is incremented first by +:years+, then by + # +:months+, then by +:weeks+, then by +:days+. This order can affect the + # result around the end of a month. For example, incrementing first by months + # then by days: + # + # Date.new(2004, 9, 30).advance(months: 1, days: 1) + # # => Sun, 31 Oct 2004 + # + # Whereas incrementing first by days then by months yields a different result: + # + # Date.new(2004, 9, 30).advance(days: 1).advance(months: 1) + # # => Mon, 01 Nov 2004 + # def advance(options) d = self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/date_time/calculations.rb new/lib/active_support/core_ext/date_time/calculations.rb --- old/lib/active_support/core_ext/date_time/calculations.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/date_time/calculations.rb 2023-06-26 23:35:09.000000000 +0200 @@ -75,6 +75,10 @@ # The +options+ parameter takes a hash with any of these keys: <tt>:years</tt>, # <tt>:months</tt>, <tt>:weeks</tt>, <tt>:days</tt>, <tt>:hours</tt>, # <tt>:minutes</tt>, <tt>:seconds</tt>. + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. def advance(options) unless options[:weeks].nil? options[:weeks], partial_weeks = options[:weeks].divmod(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/enumerable.rb new/lib/active_support/core_ext/enumerable.rb --- old/lib/active_support/core_ext/enumerable.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/enumerable.rb 2023-06-26 23:35:09.000000000 +0200 @@ -55,12 +55,12 @@ # Calculates a sum from the elements. # - # payments.sum { |p| p.price * p.tax_rate } - # payments.sum(&:price) + # payments.sum { |p| p.price * p.tax_rate } + # payments.sum(&:price) # # The latter is a shortcut for: # - # payments.inject(0) { |sum, p| sum + p.price } + # payments.inject(0) { |sum, p| sum + p.price } # # It can also calculate the sum without the use of a block. # @@ -80,7 +80,7 @@ # empty Enumerable; checking `empty?` would return # true for `[nil]`, which we want to deprecate to # keep consistent with Ruby - elsif first.is_a?(Numeric) || first(1) == [] + elsif first.is_a?(Numeric) || first(1) == [] || first.respond_to?(:coerce) identity ||= 0 _original_sum_with_required_identity(identity, &block) else @@ -144,8 +144,8 @@ def many? cnt = 0 if block_given? - any? do |element| - cnt += 1 if yield element + any? do |element, *args| + cnt += 1 if yield element, *args cnt > 1 end else @@ -225,8 +225,8 @@ # [1, "", nil, 2, " ", [], {}, false, true].compact_blank # # => [1, 2, true] # - # Set.new([nil, "", 1, 2]) - # # => [2, 1] (or [1, 2]) + # Set.new([nil, "", 1, false]).compact_blank + # # => [1] # # When called on a +Hash+, returns a new +Hash+ without the blank values. # @@ -245,7 +245,7 @@ # If the +series+ include keys that have no corresponding element in the Enumerable, these are ignored. # If the Enumerable has additional elements that aren't named in the +series+, these are not included in the result. def in_order_of(key, series) - index_by(&key).values_at(*series).compact + group_by(&key).values_at(*series).flatten.compact end # Returns the sole item in the enumerable. If there are no items, or more diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/hash/deep_transform_values.rb new/lib/active_support/core_ext/hash/deep_transform_values.rb --- old/lib/active_support/core_ext/hash/deep_transform_values.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/hash/deep_transform_values.rb 2023-06-26 23:35:09.000000000 +0200 @@ -5,10 +5,10 @@ # This includes the values from the root hash and from all # nested hashes and arrays. # - # hash = { person: { name: 'Rob', age: '28' } } + # hash = { person: { name: 'Rob', age: '28' } } # - # hash.deep_transform_values{ |value| value.to_s.upcase } - # # => {person: {name: "ROB", age: "28"}} + # hash.deep_transform_values{ |value| value.to_s.upcase } + # # => {person: {name: "ROB", age: "28"}} def deep_transform_values(&block) _deep_transform_values_in_object(self, &block) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/hash/keys.rb new/lib/active_support/core_ext/hash/keys.rb --- old/lib/active_support/core_ext/hash/keys.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/hash/keys.rb 2023-06-26 23:35:09.000000000 +0200 @@ -58,10 +58,10 @@ # This includes the keys from the root hash and from all # nested hashes and arrays. # - # hash = { person: { name: 'Rob', age: '28' } } + # hash = { person: { name: 'Rob', age: '28' } } # - # hash.deep_transform_keys{ |key| key.to_s.upcase } - # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} + # hash.deep_transform_keys{ |key| key.to_s.upcase } + # # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}} def deep_transform_keys(&block) _deep_transform_keys_in_object(self, &block) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/integer/inflections.rb new/lib/active_support/core_ext/integer/inflections.rb --- old/lib/active_support/core_ext/integer/inflections.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/integer/inflections.rb 2023-06-26 23:35:09.000000000 +0200 @@ -6,12 +6,12 @@ # Ordinalize turns a number into an ordinal string used to denote the # position in an ordered sequence such as 1st, 2nd, 3rd, 4th. # - # 1.ordinalize # => "1st" - # 2.ordinalize # => "2nd" - # 1002.ordinalize # => "1002nd" - # 1003.ordinalize # => "1003rd" - # -11.ordinalize # => "-11th" - # -1001.ordinalize # => "-1001st" + # 1.ordinalize # => "1st" + # 2.ordinalize # => "2nd" + # 1002.ordinalize # => "1002nd" + # 1003.ordinalize # => "1003rd" + # -11.ordinalize # => "-11th" + # -1001.ordinalize # => "-1001st" def ordinalize ActiveSupport::Inflector.ordinalize(self) end @@ -19,12 +19,12 @@ # Ordinal returns the suffix used to denote the position # in an ordered sequence such as 1st, 2nd, 3rd, 4th. # - # 1.ordinal # => "st" - # 2.ordinal # => "nd" - # 1002.ordinal # => "nd" - # 1003.ordinal # => "rd" - # -11.ordinal # => "th" - # -1001.ordinal # => "st" + # 1.ordinal # => "st" + # 2.ordinal # => "nd" + # 1002.ordinal # => "nd" + # 1003.ordinal # => "rd" + # -11.ordinal # => "th" + # -1001.ordinal # => "st" def ordinal ActiveSupport::Inflector.ordinal(self) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/object/duplicable.rb new/lib/active_support/core_ext/object/duplicable.rb --- old/lib/active_support/core_ext/object/duplicable.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/object/duplicable.rb 2023-06-26 23:35:09.000000000 +0200 @@ -31,8 +31,8 @@ class Method # Methods are not duplicable: # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method def duplicable? false end @@ -41,8 +41,8 @@ class UnboundMethod # Unbound methods are not duplicable: # - # method(:puts).unbind.duplicable? # => false - # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod + # method(:puts).unbind.duplicable? # => false + # method(:puts).unbind.dup # => TypeError: allocator undefined for UnboundMethod def duplicable? false end @@ -53,7 +53,7 @@ module Singleton # Singleton instances are not duplicable: # - # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton + # Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton def duplicable? false end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/object/with_options.rb new/lib/active_support/core_ext/object/with_options.rb --- old/lib/active_support/core_ext/object/with_options.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/object/with_options.rb 2023-06-26 23:35:09.000000000 +0200 @@ -64,7 +64,7 @@ # # Hence the inherited default for +if+ key is ignored. # - # NOTE: You cannot call class methods implicitly inside of with_options. + # NOTE: You cannot call class methods implicitly inside of +with_options+. # You can access these methods using the class name instead: # # class Phone < ActiveRecord::Base @@ -83,11 +83,11 @@ # end # end # - # # styled.link_to "I'm red", "/" - # # #=> <a href="/" style="color: red;">I'm red</a> + # styled.link_to "I'm red", "/" + # # => <a href="/" style="color: red;">I'm red</a> # - # # styled.button_tag "I'm red too!" - # # #=> <button style="color: red;">I'm red too!</button> + # styled.button_tag "I'm red too!" + # # => <button style="color: red;">I'm red too!</button> # def with_options(options, &block) option_merger = ActiveSupport::OptionMerger.new(self, options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/range/include_time_with_zone.rb new/lib/active_support/core_ext/range/include_time_with_zone.rb --- old/lib/active_support/core_ext/range/include_time_with_zone.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/range/include_time_with_zone.rb 2023-06-26 23:35:09.000000000 +0200 @@ -1,7 +1,5 @@ # frozen_string_literal: true -# frozen_string_literal: true - ActiveSupport::Deprecation.warn(<<-MSG.squish) `active_support/core_ext/range/include_time_with_zone` is deprecated and will be removed in Rails 7.1. MSG diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/time/calculations.rb new/lib/active_support/core_ext/time/calculations.rb --- old/lib/active_support/core_ext/time/calculations.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/time/calculations.rb 2023-06-26 23:35:09.000000000 +0200 @@ -179,6 +179,10 @@ # Time.new(2015, 8, 1, 14, 35, 0).advance(hours: 1) # => 2015-08-01 15:35:00 -0700 # Time.new(2015, 8, 1, 14, 35, 0).advance(days: 1) # => 2015-08-02 14:35:00 -0700 # Time.new(2015, 8, 1, 14, 35, 0).advance(weeks: 1) # => 2015-08-08 14:35:00 -0700 + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. def advance(options) unless options[:weeks].nil? options[:weeks], partial_weeks = options[:weeks].divmod(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/core_ext/time/zones.rb new/lib/active_support/core_ext/time/zones.rb --- old/lib/active_support/core_ext/time/zones.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/core_ext/time/zones.rb 2023-06-26 23:35:09.000000000 +0200 @@ -49,10 +49,9 @@ # around_action :set_time_zone # # private - # - # def set_time_zone - # Time.use_zone(current_user.timezone) { yield } - # end + # def set_time_zone + # Time.use_zone(current_user.timezone) { yield } + # end # end # # NOTE: This won't affect any ActiveSupport::TimeWithZone diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/deprecation/disallowed.rb new/lib/active_support/deprecation/disallowed.rb --- old/lib/active_support/deprecation/disallowed.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/deprecation/disallowed.rb 2023-06-26 23:35:09.000000000 +0200 @@ -5,15 +5,15 @@ module Disallowed # Sets the criteria used to identify deprecation messages which should be # disallowed. Can be an array containing strings, symbols, or regular - # expressions. (Symbols are treated as strings). These are compared against + # expressions. (Symbols are treated as strings.) These are compared against # the text of the generated deprecation warning. # # Additionally the scalar symbol +:all+ may be used to treat all # deprecations as disallowed. # # Deprecations matching a substring or regular expression will be handled - # using the configured +ActiveSupport::Deprecation.disallowed_behavior+ - # rather than +ActiveSupport::Deprecation.behavior+ + # using the configured Behavior#disallowed_behavior rather than + # Behavior#behavior. attr_writer :disallowed_warnings # Returns the configured criteria used to identify deprecation messages diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/encrypted_configuration.rb new/lib/active_support/encrypted_configuration.rb --- old/lib/active_support/encrypted_configuration.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/encrypted_configuration.rb 2023-06-26 23:35:09.000000000 +0200 @@ -7,6 +7,28 @@ require "active_support/core_ext/module/delegation" module ActiveSupport + # Provides convenience methods on top of EncryptedFile to access values stored + # as encrypted YAML. + # + # Values can be accessed via +Hash+ methods, such as +fetch+ and +dig+, or via + # dynamic accessor methods, similar to OrderedOptions. + # + # my_config = ActiveSupport::EncryptedConfiguration.new(...) + # my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" + # + # my_config[:some_secret] + # # => 123 + # my_config.some_secret + # # => 123 + # my_config.dig(:some_namespace, :another_secret) + # # => 456 + # my_config.some_namespace.another_secret + # # => 456 + # my_config.fetch(:foo) + # # => KeyError + # my_config.foo! + # # => KeyError + # class EncryptedConfiguration < EncryptedFile delegate :[], :fetch, to: :config delegate_missing_to :options @@ -16,10 +38,11 @@ env_key: env_key, raise_if_missing_key: raise_if_missing_key end - # Allow a config to be started without a file present + # Reads the file and returns the decrypted content. See EncryptedFile#read. def read super rescue ActiveSupport::EncryptedFile::MissingContentError + # Allow a config to be started without a file present "" end @@ -29,6 +52,14 @@ super end + # Returns the decrypted content as a Hash with symbolized keys. + # + # my_config = ActiveSupport::EncryptedConfiguration.new(...) + # my_config.read # => "some_secret: 123\nsome_namespace:\n another_secret: 456" + # + # my_config.config + # # => { some_secret: 123, some_namespace: { another_secret: 789 } } + # def config @config ||= deserialize(read).deep_symbolize_keys end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/gem_version.rb new/lib/active_support/gem_version.rb --- old/lib/active_support/gem_version.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/gem_version.rb 2023-06-26 23:35:09.000000000 +0200 @@ -9,8 +9,8 @@ module VERSION MAJOR = 7 MINOR = 0 - TINY = 4 - PRE = "3" + TINY = 5 + PRE = "1" STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/inflector/methods.rb new/lib/active_support/inflector/methods.rb --- old/lib/active_support/inflector/methods.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/inflector/methods.rb 2023-06-26 23:35:09.000000000 +0200 @@ -196,8 +196,8 @@ end # Creates a class name from a plural table name like Rails does for table - # names to models. Note that this returns a string and not a Class (To - # convert to an actual class follow +classify+ with #constantize). + # names to models. Note that this returns a string and not a Class. (To + # convert to an actual class follow +classify+ with #constantize.) # # classify('ham_and_eggs') # => "HamAndEgg" # classify('posts') # => "Post" @@ -361,8 +361,8 @@ # If passed an optional +locale+ parameter, the uncountables will be # found for that locale. # - # apply_inflections('post', inflections.plurals, :en) # => "posts" - # apply_inflections('posts', inflections.singulars, :en) # => "post" + # apply_inflections('post', inflections.plurals, :en) # => "posts" + # apply_inflections('posts', inflections.singulars, :en) # => "post" def apply_inflections(word, rules, locale = :en) result = word.to_s.dup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/lazy_load_hooks.rb new/lib/active_support/lazy_load_hooks.rb --- old/lib/active_support/lazy_load_hooks.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/lazy_load_hooks.rb 2023-06-26 23:35:09.000000000 +0200 @@ -66,7 +66,7 @@ # Executes all blocks registered to +name+ via on_load, using +base+ as the # evaluation context. # - # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) + # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) # # In the case of the above example, it will execute all hooks registered # for +:active_record+ within the class +ActiveRecord::Base+. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/notifications.rb new/lib/active_support/notifications.rb --- old/lib/active_support/notifications.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/notifications.rb 2023-06-26 23:35:09.000000000 +0200 @@ -237,8 +237,8 @@ # # Raises an error if invalid event name type is passed: # - # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} - # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) + # ActiveSupport::Notifications.subscribe(:render) {|*args| ...} + # #=> ArgumentError (pattern must be specified as a String, Regexp or empty) # def subscribe(pattern = nil, callback = nil, &block) notifier.subscribe(pattern, callback, monotonic: false, &block) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/number_helper.rb new/lib/active_support/number_helper.rb --- old/lib/active_support/number_helper.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/number_helper.rb 2023-06-26 23:35:09.000000000 +0200 @@ -358,13 +358,14 @@ # out by default (set <tt>:strip_insignificant_zeros</tt> to # +false+ to change that): # - # number_to_human(12.00001) # => "12" - # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" + # number_to_human(12.00001) # => "12" + # number_to_human(12.00001, strip_insignificant_zeros: false) # => "12.0" # # ==== Custom Unit Quantifiers # # You can also use your own custom unit quantifiers: - # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" + # + # number_to_human(500000, units: { unit: 'ml', thousand: 'lt' }) # => "500 lt" # # If in your I18n locale you have: # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/parameter_filter.rb new/lib/active_support/parameter_filter.rb --- old/lib/active_support/parameter_filter.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/parameter_filter.rb 2023-06-26 23:35:09.000000000 +0200 @@ -3,32 +3,36 @@ require "active_support/core_ext/object/duplicable" module ActiveSupport - # +ParameterFilter+ allows you to specify keys for sensitive data from - # hash-like object and replace corresponding value. Filtering only certain - # sub-keys from a hash is possible by using the dot notation: - # 'credit_card.number'. If a proc is given, each key and value of a hash and - # all sub-hashes are passed to it, where the value or the key can be replaced - # using String#replace or similar methods. + # +ParameterFilter+ replaces values in a <tt>Hash</tt>-like object if their + # keys match one of the specified filters. # + # Matching based on nested keys is possible by using dot notation, e.g. + # <tt>"credit_card.number"</tt>. + # + # If a proc is given as a filter, each key and value of the <tt>Hash</tt>-like + # and of any nested <tt>Hash</tt>es will be passed to it. The value or key can + # then be mutated as desired using methods such as <tt>String#replace</tt>. + # + # # Replaces values with "[FILTERED]" for keys that match /password/i. # ActiveSupport::ParameterFilter.new([:password]) - # => replaces the value to all keys matching /password/i with "[FILTERED]" # + # # Replaces values with "[FILTERED]" for keys that match /foo|bar/i. # ActiveSupport::ParameterFilter.new([:foo, "bar"]) - # => replaces the value to all keys matching /foo|bar/i with "[FILTERED]" # - # ActiveSupport::ParameterFilter.new([/\Apin\z/i, /\Apin_/i]) - # => replaces the value for the exact (case-insensitive) key 'pin' and all - # (case-insensitive) keys beginning with 'pin_', with "[FILTERED]". - # Does not match keys with 'pin' as a substring, such as 'shipping_id'. + # # Replaces values for the exact key "pin" and for keys that begin with + # # "pin_". Does not match keys that otherwise include "pin" as a + # # substring, such as "shipping_id". + # ActiveSupport::ParameterFilter.new([/\Apin\z/, /\Apin_/]) # + # # Replaces the value for :code in `{ credit_card: { code: "xxxx" } }`. + # # Does not change `{ file: { code: "xxxx" } }`. # ActiveSupport::ParameterFilter.new(["credit_card.code"]) - # => replaces { credit_card: {code: "xxxx"} } with "[FILTERED]", does not - # change { file: { code: "xxxx"} } # + # # Reverses values for keys that match /secret/i. # ActiveSupport::ParameterFilter.new([-> (k, v) do # v.reverse! if /secret/i.match?(k) # end]) - # => reverses the value to all keys matching /secret/i + # class ParameterFilter FILTERED = "[FILTERED]" # :nodoc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/testing/isolation.rb new/lib/active_support/testing/isolation.rb --- old/lib/active_support/testing/isolation.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/testing/isolation.rb 2023-06-26 23:35:09.000000000 +0200 @@ -25,38 +25,39 @@ module Forking def run_in_isolation(&blk) - read, write = IO.pipe - read.binmode - write.binmode + IO.pipe do |read, write| + read.binmode + write.binmode - pid = fork do - read.close - yield - begin - if error? - failures.map! { |e| - begin - Marshal.dump e - e - rescue TypeError - ex = Exception.new e.message - ex.set_backtrace e.backtrace - Minitest::UnexpectedError.new ex - end - } + pid = fork do + read.close + yield + begin + if error? + failures.map! { |e| + begin + Marshal.dump e + e + rescue TypeError + ex = Exception.new e.message + ex.set_backtrace e.backtrace + Minitest::UnexpectedError.new ex + end + } + end + test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup + result = Marshal.dump(test_result) end - test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup - result = Marshal.dump(test_result) + + write.puts [result].pack("m") + exit! end - write.puts [result].pack("m") - exit! + write.close + result = read.read + Process.wait2(pid) + result.unpack1("m") end - - write.close - result = read.read - Process.wait2(pid) - result.unpack1("m") end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/active_support/time_with_zone.rb new/lib/active_support/time_with_zone.rb --- old/lib/active_support/time_with_zone.rb 2023-03-13 19:52:45.000000000 +0100 +++ new/lib/active_support/time_with_zone.rb 2023-06-26 23:35:09.000000000 +0200 @@ -566,8 +566,8 @@ # Send the missing method to +time+ instance, and wrap result in a new # TimeWithZone with the existing +time_zone+. - def method_missing(sym, *args, &block) - wrap_with_time_zone time.__send__(sym, *args, &block) + def method_missing(...) + wrap_with_time_zone time.__send__(...) rescue NoMethodError => e raise e, e.message.sub(time.inspect, inspect).sub("Time", "ActiveSupport::TimeWithZone"), e.backtrace end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2023-03-13 19:52:45.000000000 +0100 +++ new/metadata 2023-06-26 23:35:09.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: activesupport version: !ruby/object:Gem::Version - version: 7.0.4.3 + version: 7.0.5.1 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: bin cert_chain: [] -date: 2023-03-13 00:00:00.000000000 Z +date: 2023-06-26 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: i18n @@ -359,10 +359,10 @@ - MIT metadata: bug_tracker_uri: https://github.com/rails/rails/issues - changelog_uri: https://github.com/rails/rails/blob/v7.0.4.3/activesupport/CHANGELOG.md - documentation_uri: https://api.rubyonrails.org/v7.0.4.3/ + changelog_uri: https://github.com/rails/rails/blob/v7.0.5.1/activesupport/CHANGELOG.md + documentation_uri: https://api.rubyonrails.org/v7.0.5.1/ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk - source_code_uri: https://github.com/rails/rails/tree/v7.0.4.3/activesupport + source_code_uri: https://github.com/rails/rails/tree/v7.0.5.1/activesupport rubygems_mfa_required: 'true' post_install_message: rdoc_options: @@ -381,7 +381,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.4.3 +rubygems_version: 3.3.3 signing_key: specification_version: 4 summary: A toolkit of support libraries and Ruby core extensions extracted from the