Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump concurrent-ruby from 1.3.4 to 1.3.5 in /Library/Homebrew #19114

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GEM
bigdecimal (3.1.9)
bindata (2.5.0)
coderay (1.1.3)
concurrent-ruby (1.3.4)
concurrent-ruby (1.3.5)
diff-lcs (1.5.1)
docile (1.4.1)
elftools (1.3.1)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Library/Homebrew/vendor/bundle/bundler/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def self.extension_api_version
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bigdecimal-3.1.9/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/bindata-2.5.0/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/coderay-1.1.3/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/concurrent-ruby-1.3.5/lib/concurrent-ruby")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/diff-lcs-1.5.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/docile-1.4.1/lib")
$:.unshift File.expand_path("#{__dir__}/../#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/elftools-1.3.1/lib")
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def await_for(timeout)
# @param [Float] timeout the maximum number of seconds to wait
# @return [Boolean] true if all actions complete before timeout
#
# @raise [Concurrent::TimeoutError] when timout is reached
# @raise [Concurrent::TimeoutError] when timeout is reached
#
# @!macro agent_await_warning
def await_for!(timeout)
Expand Down Expand Up @@ -477,7 +477,7 @@ def await_for(timeout, *agents)
# @param [Array<Concurrent::Agent>] agents the Agents on which to wait
# @return [Boolean] true if all actions complete before timeout
#
# @raise [Concurrent::TimeoutError] when timout is reached
# @raise [Concurrent::TimeoutError] when timeout is reached
# @!macro agent_await_warning
def await_for!(timeout, *agents)
raise Concurrent::TimeoutError unless await_for(timeout, *agents)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module Async

# @!method self.new(*args, &block)
#
# Instanciate a new object and ensure proper initialization of the
# Instantiate a new object and ensure proper initialization of the
# synchronization mechanisms.
#
# @param [Array<Object>] args Zero or more arguments to be passed to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Atom < Synchronization::Object
# @option opts [Proc] :validator (nil) Optional proc used to validate new
# values. It must accept one and only one argument which will be the
# intended new value. The validator will return true if the new value
# is acceptable else return false (preferrably) or raise an exception.
# is acceptable else return false (preferably) or raise an exception.
#
# @!macro deref_options
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require 'logger'
require 'concurrent/atomic/atomic_reference'

module Concurrent
Expand All @@ -8,10 +7,12 @@ module Concern
#
# @!visibility private
module Logging
include Logger::Severity
# The same as Logger::Severity but we copy it here to avoid a dependency on the logger gem just for these 7 constants
DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN = 0, 1, 2, 3, 4, 5
SEV_LABEL = %w[DEBUG INFO WARN ERROR FATAL ANY].freeze

# Logs through {Concurrent.global_logger}, it can be overridden by setting @logger
# @param [Integer] level one of Logger::Severity constants
# @param [Integer] level one of Concurrent::Concern::Logging constants
# @param [String] progname e.g. a path of an Actor
# @param [String, nil] message when nil block is used to generate the message
# @yieldreturn [String] a message
Expand All @@ -23,7 +24,7 @@ def log(level, progname, message = nil, &block)
end
logger.call level, progname, message, &block
rescue => error
$stderr.puts "`Concurrent.configuration.logger` failed to log #{[level, progname, message, block]}\n" +
$stderr.puts "`Concurrent.global_logger` failed to log #{[level, progname, message, block]}\n" +
"#{error.message} (#{error.class})\n#{error.backtrace.join "\n"}"
end
end
Expand All @@ -33,8 +34,10 @@ def log(level, progname, message = nil, &block)
module Concurrent
extend Concern::Logging

# @return [Logger] Logger with provided level and output.
def self.create_simple_logger(level = Logger::FATAL, output = $stderr)
# Create a simple logger with provided level and output.
def self.create_simple_logger(level = :FATAL, output = $stderr)
level = Concern::Logging.const_get(level) unless level.is_a?(Integer)

# TODO (pitr-ch 24-Dec-2016): figure out why it had to be replaced, stdlogger was deadlocking
lambda do |severity, progname, message = nil, &block|
return false if severity < level
Expand All @@ -52,21 +55,23 @@ def self.create_simple_logger(level = Logger::FATAL, output = $stderr)

output.print format "[%s] %5s -- %s: %s\n",
Time.now.strftime('%Y-%m-%d %H:%M:%S.%L'),
Logger::SEV_LABEL[severity],
Concern::Logging::SEV_LABEL[severity],
progname,
formatted_message
true
end
end

# Use logger created by #create_simple_logger to log concurrent-ruby messages.
def self.use_simple_logger(level = Logger::FATAL, output = $stderr)
def self.use_simple_logger(level = :FATAL, output = $stderr)
Concurrent.global_logger = create_simple_logger level, output
end

# @return [Logger] Logger with provided level and output.
# Create a stdlib logger with provided level and output.
# If you use this deprecated method you might need to add logger to your Gemfile to avoid warnings from Ruby 3.3.5+.
# @deprecated
def self.create_stdlib_logger(level = Logger::FATAL, output = $stderr)
def self.create_stdlib_logger(level = :FATAL, output = $stderr)
require 'logger'
logger = Logger.new(output)
logger.level = level
logger.formatter = lambda do |severity, datetime, progname, msg|
Expand All @@ -93,7 +98,7 @@ def self.create_stdlib_logger(level = Logger::FATAL, output = $stderr)

# Use logger created by #create_stdlib_logger to log concurrent-ruby messages.
# @deprecated
def self.use_stdlib_logger(level = Logger::FATAL, output = $stderr)
def self.use_stdlib_logger(level = :FATAL, output = $stderr)
Concurrent.global_logger = create_stdlib_logger level, output
end

Expand All @@ -103,7 +108,7 @@ def self.use_stdlib_logger(level = Logger::FATAL, output = $stderr)
NULL_LOGGER = lambda { |level, progname, message = nil, &block| }

# @!visibility private
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(Logger::WARN))
GLOBAL_LOGGER = AtomicReference.new(create_simple_logger(:WARN))
private_constant :GLOBAL_LOGGER

def self.global_logger
Expand Down
Binary file not shown.
Loading
Loading