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 2022-10-12 18:25:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-activesupport-7.0 (Old)
and /work/SRC/openSUSE:Factory/.rubygem-activesupport-7.0.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-activesupport-7.0"
Wed Oct 12 18:25:02 2022 rev:6 rq:1010047 version:7.0.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-activesupport-7.0/rubygem-activesupport-7.0.changes
2022-08-06 22:07:54.734613669 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-activesupport-7.0.new.2275/rubygem-activesupport-7.0.changes
2022-10-12 18:26:46.437964903 +0200
@@ -1,0 +2,24 @@
+Mon Oct 10 12:55:23 UTC 2022 - Stephan Kulow <[email protected]>
+
+updated to version 7.0.4
+ see installed CHANGELOG.md
+
+ ## Rails 7.0.4 (September 09, 2022) ##
+
+ * Redis cache store is now compatible with redis-rb 5.0.
+
+ *Jean Boussier*
+
+ * Fix `NoMethodError` on custom `ActiveSupport::Deprecation` behavior.
+
+ `ActiveSupport::Deprecation.behavior=` was supposed to accept any object
+ that responds to `call`, but in fact its internal implementation assumed
that
+ this object could respond to `arity`, so it was restricted to only
`Proc` objects.
+
+ This change removes this `arity` restriction of custom behaviors.
+
+ *Ryo Nakamura*
+
+
+
+-------------------------------------------------------------------
Old:
----
activesupport-7.0.3.1.gem
New:
----
activesupport-7.0.4.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-activesupport-7.0.spec ++++++
--- /var/tmp/diff_new_pack.vQdZXG/_old 2022-10-12 18:26:47.941968215 +0200
+++ /var/tmp/diff_new_pack.vQdZXG/_new 2022-10-12 18:26:47.949968232 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-activesupport-7.0
-Version: 7.0.3.1
+Version: 7.0.4
Release: 0
%define mod_name activesupport
%define mod_full_name %{mod_name}-%{version}
++++++ activesupport-7.0.3.1.gem -> activesupport-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:21.000000000 +0200
+++ new/CHANGELOG.md 2022-09-09 20:42:15.000000000 +0200
@@ -1,3 +1,20 @@
+## Rails 7.0.4 (September 09, 2022) ##
+
+* Redis cache store is now compatible with redis-rb 5.0.
+
+ *Jean Boussier*
+
+* Fix `NoMethodError` on custom `ActiveSupport::Deprecation` behavior.
+
+ `ActiveSupport::Deprecation.behavior=` was supposed to accept any object
+ that responds to `call`, but in fact its internal implementation assumed
that
+ this object could respond to `arity`, so it was restricted to only `Proc`
objects.
+
+ This change removes this `arity` restriction of custom behaviors.
+
+ *Ryo Nakamura*
+
+
## 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/active_support/cache/mem_cache_store.rb
new/lib/active_support/cache/mem_cache_store.rb
--- old/lib/active_support/cache/mem_cache_store.rb 2022-07-12
19:30:21.000000000 +0200
+++ new/lib/active_support/cache/mem_cache_store.rb 2022-09-09
20:42:15.000000000 +0200
@@ -128,6 +128,22 @@
end
end
+ ##
+ # :method: write
+ # :call-seq: write(name, value, options = nil)
+ #
+ # Behaves the same as ActiveSupport::Cache::Store#write, but supports
+ # additional options specific to memcached.
+ #
+ # ==== Additional Options
+ #
+ # * <tt>raw: true</tt> - Sends the value directly to the server as raw
+ # bytes. The value must be a string or number. You can use memcached
+ # direct operations like +increment+ and +decrement+ only on raw
values.
+ #
+ # * <tt>unless_exist: true</tt> - Prevents overwriting an existing cache
+ # entry.
+
# Increment a cached value. This method uses the memcached incr atomic
# operator and can only be used on values written with the +:raw+ option.
# Calling it on a value not stored with +:raw+ will initialize that value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache/redis_cache_store.rb
new/lib/active_support/cache/redis_cache_store.rb
--- old/lib/active_support/cache/redis_cache_store.rb 2022-07-12
19:30:21.000000000 +0200
+++ new/lib/active_support/cache/redis_cache_store.rb 2022-09-09
20:42:15.000000000 +0200
@@ -5,13 +5,17 @@
require "redis"
require "redis/distributed"
rescue LoadError
- warn "The Redis cache store requires the redis gem, version 4.0.1 or later.
Please add it to your Gemfile: `gem \"redis\", \"~> 4.0\"`"
+ warn "The Redis cache store requires the redis gem, version 4.0.1 or later.
Please add it to your Gemfile: `gem \"redis\", \">= 4.0.1\"`"
raise
end
# Prefer the hiredis driver but don't require it.
begin
- require "redis/connection/hiredis"
+ if ::Redis::VERSION < "5"
+ require "redis/connection/hiredis"
+ else
+ require "hiredis-client"
+ end
rescue LoadError
end
@@ -92,9 +96,11 @@
elsif redis
redis
elsif urls.size > 1
- build_redis_distributed_client urls: urls, **redis_options
+ build_redis_distributed_client(urls: urls, **redis_options)
+ elsif urls.empty?
+ build_redis_client(**redis_options)
else
- build_redis_client url: urls.first, **redis_options
+ build_redis_client(url: urls.first, **redis_options)
end
end
@@ -105,8 +111,8 @@
end
end
- def build_redis_client(url:, **redis_options)
- ::Redis.new DEFAULT_REDIS_OPTIONS.merge(redis_options.merge(url:
url))
+ def build_redis_client(**redis_options)
+ ::Redis.new(DEFAULT_REDIS_OPTIONS.merge(redis_options))
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/cache.rb
new/lib/active_support/cache.rb
--- old/lib/active_support/cache.rb 2022-07-12 19:30:21.000000000 +0200
+++ new/lib/active_support/cache.rb 2022-09-09 20:42:15.000000000 +0200
@@ -139,7 +139,7 @@
# popular cache store for large production websites.
#
# Some implementations may not support all methods beyond the basic cache
- # methods of +fetch+, +write+, +read+, +exist?+, and +delete+.
+ # methods of #fetch, #write, #read, #exist?, and #delete.
#
# ActiveSupport::Cache::Store can store any Ruby object that is supported
by
# its +coder+'s +dump+ and +load+ methods.
@@ -172,11 +172,6 @@
# cache.namespace = -> { @last_mod_time } # Set the namespace to a
variable
# @last_mod_time = Time.now # Invalidate the entire cache by changing
namespace
#
- # Cached data larger than 1kB are compressed by default. To turn off
- # compression, pass <tt>compress: false</tt> to the initializer or to
- # individual +fetch+ or +write+ method calls. The 1kB compression
- # threshold is configurable with the <tt>:compress_threshold</tt> option,
- # specified in bytes.
class Store
cattr_accessor :logger, instance_writer: true
@@ -200,9 +195,19 @@
end
end
- # Creates a new cache. The options will be passed to any write method
calls
- # except for <tt>:namespace</tt> which can be used to set the global
- # namespace for the cache.
+ # Creates a new cache.
+ #
+ # ==== Options
+ #
+ # * +:namespace+ - Sets the namespace for the cache. This option is
+ # especially useful if your application shares a cache with other
+ # applications.
+ # * +:coder+ - Replaces the default cache entry serialization mechanism
+ # with a custom one. The +coder+ must respond to +dump+ and +load+.
+ # Using a custom coder disables automatic compression.
+ #
+ # Any other specified options are treated as default options for the
+ # relevant cache operations, such as #read, #write, and #fetch.
def initialize(options = nil)
@options = options ? normalize_options(options) : {}
@options[:compress] = true unless @options.key?(:compress)
@@ -244,111 +249,75 @@
# end
# cache.fetch('city') # => "Duckburgh"
#
- # You may also specify additional options via the +options+ argument.
- # Setting <tt>force: true</tt> forces a cache "miss," meaning we treat
- # the cache value as missing even if it's present. Passing a block is
- # required when +force+ is true so this always results in a cache write.
+ # ==== Options
#
- # cache.write('today', 'Monday')
- # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday'
- # cache.fetch('today', force: true) # => ArgumentError
- #
- # The +:force+ option is useful when you're calling some other method to
- # ask whether you should force a cache write. Otherwise, it's clearer to
- # just call <tt>Cache#write</tt>.
- #
- # Setting <tt>skip_nil: true</tt> will not cache nil result:
- #
- # cache.fetch('foo') { nil }
- # cache.fetch('bar', skip_nil: true) { nil }
- # cache.exist?('foo') # => true
- # cache.exist?('bar') # => false
- #
- #
- # Setting <tt>compress: false</tt> disables compression of the cache
entry.
- #
- # Setting <tt>:expires_in</tt> will set an expiration time on the cache.
- # All caches support auto-expiring content after a specified number of
- # seconds. This value can be specified as an option to the constructor
- # (in which case all entries will be affected), or it can be supplied to
- # the +fetch+ or +write+ method to affect just one entry.
- # <tt>:expire_in</tt> and <tt>:expired_in</tt> are aliases for
- # <tt>:expires_in</tt>.
- #
- # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes)
- # cache.write(key, value, expires_in: 1.minute) # Set a lower value
for one entry
- #
- # Setting <tt>:expires_at</tt> will set an absolute expiration time on
the cache.
- # All caches support auto-expiring content after a specified number of
- # seconds. This value can only be supplied to the +fetch+ or +write+
method to
- # affect just one entry.
- #
- # cache = ActiveSupport::Cache::MemoryStore.new
- # cache.write(key, value, expires_at: Time.now.at_end_of_hour)
- #
- # Setting <tt>:version</tt> verifies the cache stored under <tt>name</tt>
- # is of the same version. nil is returned on mismatches despite contents.
- # This feature is used to support recyclable cache keys.
- #
- # Setting <tt>:race_condition_ttl</tt> is very useful in situations where
- # a cache entry is used very frequently and is under heavy load. If a
- # cache expires and due to heavy load several different processes will
try
- # to read data natively and then they all will try to write to cache. To
- # avoid that case the first process to find an expired cache entry will
- # bump the cache expiration time by the value set in
<tt>:race_condition_ttl</tt>.
- # Yes, this process is extending the time for a stale value by another
few
- # seconds. Because of extended life of the previous cache, other
processes
- # will continue to use slightly stale data for a just a bit longer. In
the
- # meantime that first process will go ahead and will write into cache the
- # new value. After that all the processes will start getting the new
value.
- # The key is to keep <tt>:race_condition_ttl</tt> small.
- #
- # If the process regenerating the entry errors out, the entry will be
- # regenerated after the specified number of seconds. Also note that the
- # life of stale cache is extended only if it expired recently. Otherwise
- # a new value is generated and <tt>:race_condition_ttl</tt> does not play
- # any role.
- #
- # # Set all values to expire after one minute.
- # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
- #
- # cache.write('foo', 'original value')
- # val_1 = nil
- # val_2 = nil
- # sleep 60
- #
- # Thread.new do
- # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do
- # sleep 1
- # 'new value 1'
+ # Internally, +fetch+ calls #read_entry, and calls #write_entry on a
cache
+ # miss. Thus, +fetch+ supports the same options as #read and #write.
+ # Additionally, +fetch+ supports the following options:
+ #
+ # * <tt>force: true</tt> - Forces a cache "miss," meaning we treat the
+ # cache value as missing even if it's present. Passing a block is
+ # required when +force+ is true so this always results in a cache
write.
+ #
+ # cache.write('today', 'Monday')
+ # cache.fetch('today', force: true) { 'Tuesday' } # => 'Tuesday'
+ # cache.fetch('today', force: true) # => ArgumentError
+ #
+ # The +:force+ option is useful when you're calling some other method
to
+ # ask whether you should force a cache write. Otherwise, it's clearer
to
+ # just call +write+.
+ #
+ # * <tt>skip_nil: true</tt> - Prevents caching a nil result:
+ #
+ # cache.fetch('foo') { nil }
+ # cache.fetch('bar', skip_nil: true) { nil }
+ # cache.exist?('foo') # => true
+ # cache.exist?('bar') # => false
+ #
+ # * +:race_condition_ttl+ - Specifies the number of seconds during which
+ # an expired value can be reused while a new value is being generated.
+ # This can be used to prevent race conditions when cache entries
expire,
+ # by preventing multiple processes from simultaneously regenerating the
+ # same entry (also known as the dog pile effect).
+ #
+ # When a process encounters a cache entry that has expired less than
+ # +:race_condition_ttl+ seconds ago, it will bump the expiration time
by
+ # +:race_condition_ttl+ seconds before generating a new value. During
+ # this extended time window, while the process generates a new value,
+ # other processes will continue to use the old value. After the first
+ # process writes the new value, other processes will then use it.
+ #
+ # If the first process errors out while generating a new value, another
+ # process can try to generate a new value after the extended time
window
+ # has elapsed.
+ #
+ # # Set all values to expire after one minute.
+ # cache = ActiveSupport::Cache::MemoryStore.new(expires_in: 1.minute)
+ #
+ # cache.write('foo', 'original value')
+ # val_1 = nil
+ # val_2 = nil
+ # sleep 60
+ #
+ # Thread.new do
+ # val_1 = cache.fetch('foo', race_condition_ttl: 10.seconds) do
+ # sleep 1
+ # 'new value 1'
+ # end
# end
- # end
#
- # Thread.new do
- # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do
- # 'new value 2'
+ # Thread.new do
+ # val_2 = cache.fetch('foo', race_condition_ttl: 10.seconds) do
+ # 'new value 2'
+ # end
# end
- # end
#
- # cache.fetch('foo') # => "original value"
- # sleep 10 # First thread extended the life of cache by another 10
seconds
- # cache.fetch('foo') # => "new value 1"
- # val_1 # => "new value 1"
- # val_2 # => "original value"
+ # cache.fetch('foo') # => "original value"
+ # sleep 10 # First thread extended the life of cache by another 10
seconds
+ # cache.fetch('foo') # => "new value 1"
+ # val_1 # => "new value 1"
+ # val_2 # => "original value"
#
- # Other options will be handled by the specific cache store
implementation.
- # Internally, #fetch calls #read_entry, and calls #write_entry on a cache
- # miss. +options+ will be passed to the #read and #write calls.
- #
- # For example, MemCacheStore's #write method supports the +:raw+
- # option, which tells the memcached server to store all values as
strings.
- # We can use this option with #fetch too:
- #
- # cache = ActiveSupport::Cache::MemCacheStore.new
- # cache.fetch("foo", force: true, raw: true) do
- # :bar
- # end
- # cache.fetch('foo') # => "bar"
def fetch(name, options = nil, &block)
if block_given?
options = merged_options(options)
@@ -383,7 +352,13 @@
# <tt>:version</tt> options, both of these conditions are applied before
# the data is returned.
#
- # Options are passed to the underlying cache implementation.
+ # ==== Options
+ #
+ # * +:version+ - Specifies a version for the cache entry. If the cached
+ # version does not match the requested version, the read will be
treated
+ # as a cache miss. This feature is used to support recyclable cache
keys.
+ #
+ # Other options will be handled by the specific cache store
implementation.
def read(name, options = nil)
options = merged_options(options)
key = normalize_key(name, options)
@@ -491,9 +466,39 @@
end
end
- # Writes the value to the cache, with the key.
+ # Writes the value to the cache with the key. The value must be supported
+ # by the +coder+'s +dump+ and +load+ methods.
#
- # Options are passed to the underlying cache implementation.
+ # By default, cache entries larger than 1kB are compressed. Compression
+ # allows more data to be stored in the same memory footprint, leading to
+ # fewer cache evictions and higher hit rates.
+ #
+ # ==== Options
+ #
+ # * <tt>compress: false</tt> - Disables compression of the cache entry.
+ #
+ # * +:compress_threshold+ - The compression threshold, specified in
bytes.
+ # \Cache entries larger than this threshold will be compressed.
Defaults
+ # to +1.kilobyte+.
+ #
+ # * +:expires_in+ - Sets a relative expiration time for the cache entry,
+ # specified in seconds. +:expire_in+ and +:expired_in+ are aliases for
+ # +:expires_in+.
+ #
+ # cache = ActiveSupport::Cache::MemoryStore.new(expires_in:
5.minutes)
+ # cache.write(key, value, expires_in: 1.minute) # Set a lower value
for one entry
+ #
+ # * +:expires_at+ - Sets an absolute expiration time for the cache entry.
+ #
+ # cache = ActiveSupport::Cache::MemoryStore.new
+ # cache.write(key, value, expires_at: Time.now.at_end_of_hour)
+ #
+ # * +:version+ - Specifies a version for the cache entry. When reading
+ # from the cache, if the cached version does not match the requested
+ # version, the read will be treated as a cache miss. This feature is
+ # used to support recyclable cache keys.
+ #
+ # Other options will be handled by the specific cache store
implementation.
def write(name, value, options = nil)
options = merged_options(options)
@@ -569,7 +574,7 @@
raise NotImplementedError.new("#{self.class.name} does not support
decrement")
end
- # Cleanups the cache by removing expired entries.
+ # Cleans up the cache by removing expired entries.
#
# Options are passed to the underlying cache implementation.
#
@@ -838,7 +843,7 @@
when 7.0
Rails70Coder
else
- raise ArgumentError, "Unknown ActiveSupport::Cache.format_version
#{Cache.format_version.inspect}"
+ raise ArgumentError, "Unknown ActiveSupport::Cache.format_version:
#{Cache.format_version.inspect}"
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/deprecation/behaviors.rb
new/lib/active_support/deprecation/behaviors.rb
--- old/lib/active_support/deprecation/behaviors.rb 2022-07-12
19:30:21.000000000 +0200
+++ new/lib/active_support/deprecation/behaviors.rb 2022-09-09
20:42:15.000000000 +0200
@@ -114,10 +114,10 @@
raise ArgumentError, "#{behavior.inspect} is not a valid
deprecation behavior."
end
- if behavior.arity == 4 || behavior.arity == -1
- behavior
- else
+ if behavior.respond_to?(:arity) && behavior.arity == 2
-> message, callstack, _, _ { behavior.call(message, callstack) }
+ else
+ behavior
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/encrypted_file.rb
new/lib/active_support/encrypted_file.rb
--- old/lib/active_support/encrypted_file.rb 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/encrypted_file.rb 2022-09-09 20:42:15.000000000
+0200
@@ -45,10 +45,22 @@
@env_key, @raise_if_missing_key = env_key, raise_if_missing_key
end
+ # Returns the encryption key, first trying the environment variable
+ # specified by +env_key+, then trying the key file specified by +key_path+.
+ # If +raise_if_missing_key+ is true, raises MissingKeyError if the
+ # environment variable is not set and the key file does not exist.
def key
read_env_key || read_key_file || handle_missing_key
end
+ # Reads the file and returns the decrypted content.
+ #
+ # Raises:
+ # - MissingKeyError if the key is missing and +raise_if_missing_key+ is
true.
+ # - MissingContentError if the encrypted file does not exist or otherwise
+ # if the key is missing.
+ # - ActiveSupport::MessageEncryptor::InvalidMessage if the content cannot
be
+ # decrypted or verified.
def read
if !key.nil? && content_path.exist?
decrypt content_path.binread
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 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/gem_version.rb 2022-09-09 20:42:15.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/lib/active_support/lazy_load_hooks.rb
new/lib/active_support/lazy_load_hooks.rb
--- old/lib/active_support/lazy_load_hooks.rb 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/lazy_load_hooks.rb 2022-09-09 20:42:15.000000000
+0200
@@ -26,6 +26,18 @@
# run_load_hooks will then execute all the hooks that were registered
# with the on_load method. In the case of the above example, it will
# execute the block of code that is in the +initializer+.
+ #
+ # Registering a hook that has already run results in that hook executing
+ # immediately. This allows hooks to be nested for code that relies on
+ # multiple lazily loaded components:
+ #
+ # initializer "action_text.renderer" do
+ # ActiveSupport.on_load(:action_controller_base) do
+ # ActiveSupport.on_load(:action_text_content) do
+ # self.default_renderer = Class.new(ActionController::Base).renderer
+ # end
+ # end
+ # end
module LazyLoadHooks
def self.extended(base) # :nodoc:
base.class_eval do
@@ -36,7 +48,8 @@
end
# Declares a block that will be executed when a Rails component is fully
- # loaded.
+ # loaded. If the component has already loaded, the block is executed
+ # immediately.
#
# Options:
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/logger.rb
new/lib/active_support/logger.rb
--- old/lib/active_support/logger.rb 2022-07-12 19:30:21.000000000 +0200
+++ new/lib/active_support/logger.rb 2022-09-09 20:42:15.000000000 +0200
@@ -22,10 +22,6 @@
# Broadcasts logs to multiple loggers.
def self.broadcast(logger) # :nodoc:
Module.new do
- define_singleton_method(:extended) do |base|
- base.public_send(:broadcast_to, logger) if
base.respond_to?(:broadcast_to)
- end
-
define_method(:add) do |*args, &block|
logger.add(*args, &block)
super(*args, &block)
@@ -46,6 +42,11 @@
super(name)
end
+ define_method(:formatter=) do |formatter|
+ logger.formatter = formatter
+ super(formatter)
+ end
+
define_method(:level=) do |level|
logger.level = level
super(level)
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 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/notifications.rb 2022-09-09 20:42:15.000000000
+0200
@@ -244,6 +244,12 @@
notifier.subscribe(pattern, callback, monotonic: false, &block)
end
+ # Performs the same functionality as #subscribe, but the +start+ and
+ # +finish+ block arguments are in monotonic time instead of wall-clock
+ # time. Monotonic time will not jump forward or backward (due to NTP or
+ # Daylights Savings). Use +monotonic_subscribe+ when accuracy of time
+ # duration is important. For example, computing elapsed time between
+ # two events.
def monotonic_subscribe(pattern = nil, callback = nil, &block)
notifier.subscribe(pattern, callback, monotonic: true, &block)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/option_merger.rb
new/lib/active_support/option_merger.rb
--- old/lib/active_support/option_merger.rb 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/option_merger.rb 2022-09-09 20:42:15.000000000
+0200
@@ -15,8 +15,8 @@
private
def method_missing(method, *arguments, &block)
options = nil
- if arguments.first.is_a?(Proc)
- proc = arguments.pop
+ if arguments.size == 1 && arguments.first.is_a?(Proc)
+ proc = arguments.shift
arguments << lambda { |*args| @options.deep_merge(proc.call(*args)) }
elsif arguments.last.respond_to?(:to_hash)
options = @options.deep_merge(arguments.pop)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/rescuable.rb
new/lib/active_support/rescuable.rb
--- old/lib/active_support/rescuable.rb 2022-07-12 19:30:21.000000000 +0200
+++ new/lib/active_support/rescuable.rb 2022-09-09 20:42:15.000000000 +0200
@@ -30,20 +30,20 @@
# any.
#
# class ApplicationController < ActionController::Base
- # rescue_from User::NotAuthorized, with: :deny_access # self defined
exception
- # rescue_from ActiveRecord::RecordInvalid, with: :show_errors
+ # rescue_from User::NotAuthorized, with: :deny_access
+ # rescue_from ActiveRecord::RecordInvalid, with: :show_record_errors
#
- # rescue_from 'MyAppError::Base' do |exception|
- # render xml: exception, status: 500
+ # rescue_from "MyApp::BaseError" do |exception|
+ # redirect_to root_url, alert: exception.message
# end
#
# private
# def deny_access
- # ...
+ # head :forbidden
# end
#
- # def show_errors(exception)
- # exception.record.new_record? ? ...
+ # def show_record_errors(exception)
+ # redirect_back_or_to root_url, alert:
exception.record.errors.full_messages.to_sentence
# end
# end
#
@@ -79,7 +79,7 @@
# Be sure to re-raise unhandled exceptions if this is what you expect.
#
# begin
- # ???
+ # # ...
# rescue => exception
# rescue_with_handler(exception) || raise
# end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/tagged_logging.rb
new/lib/active_support/tagged_logging.rb
--- old/lib/active_support/tagged_logging.rb 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/tagged_logging.rb 2022-09-09 20:42:15.000000000
+0200
@@ -1,7 +1,6 @@
# frozen_string_literal: true
require "active_support/core_ext/module/delegation"
-require "active_support/core_ext/module/redefine_method"
require "active_support/core_ext/object/blank"
require "logger"
require "active_support/logger"
@@ -95,20 +94,6 @@
delegate :push_tags, :pop_tags, :clear_tags!, to: :formatter
- def broadcast_to(other_logger) # :nodoc:
- define_singleton_method(:formatter=) do |formatter|
- other_logger.formatter ||= formatter
-
- other_logger.formatter.singleton_class.redefine_method(:current_tags)
do
- formatter.current_tags
- end
-
- super(formatter)
- end
-
- self.formatter = self.formatter.clone
- end
-
def tagged(*tags)
if block_given?
formatter.tagged(*tags) { yield self }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/active_support/test_case.rb
new/lib/active_support/test_case.rb
--- old/lib/active_support/test_case.rb 2022-07-12 19:30:21.000000000 +0200
+++ new/lib/active_support/test_case.rb 2022-09-09 20:42:15.000000000 +0200
@@ -147,5 +147,9 @@
alias :assert_not_same :refute_same
ActiveSupport.run_load_hooks(:active_support_test_case, self)
+
+ def inspect # :nodoc:
+ Object.instance_method(:to_s).bind_call(self)
+ end
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 2022-07-12 19:30:21.000000000
+0200
+++ new/lib/active_support/time_with_zone.rb 2022-09-09 20:42:15.000000000
+0200
@@ -337,9 +337,8 @@
alias_method :in, :+
# Subtracts an interval of time and returns a new TimeWithZone object
unless
- # the other value +acts_like?+ time. Then it will return a Float of the
difference
- # between the two times that represents the difference between the current
- # object's time and the +other+ time.
+ # the other value +acts_like?+ time. In which case, it will subtract the
+ # other time and return the difference in seconds as a Float.
#
# Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US &
Canada)'
# now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2022-07-12 19:30:21.000000000 +0200
+++ new/metadata 2022-09-09 20:42:15.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: activesupport
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: 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.3.1/activesupport/CHANGELOG.md
- documentation_uri: https://api.rubyonrails.org/v7.0.3.1/
+ changelog_uri:
https://github.com/rails/rails/blob/v7.0.4/activesupport/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/activesupport
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.4/activesupport
rubygems_mfa_required: 'true'
post_install_message:
rdoc_options: