Merge pull request #13587 from Homebrew/dependabot/bundler/Library/Homebrew/tzinfo-2.0.5
build(deps): bump tzinfo from 2.0.4 to 2.0.5 in /Library/Homebrew
This commit is contained in:
commit
0b030b74e2
@ -181,7 +181,7 @@ GEM
|
|||||||
thor (>= 1.2.0)
|
thor (>= 1.2.0)
|
||||||
yard-sorbet
|
yard-sorbet
|
||||||
thor (1.2.1)
|
thor (1.2.1)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
|
@ -4,7 +4,11 @@
|
|||||||
# This is an autogenerated file for types exported from the `tzinfo` gem.
|
# This is an autogenerated file for types exported from the `tzinfo` gem.
|
||||||
# Please instead update this file by running `bin/tapioca gem tzinfo`.
|
# Please instead update this file by running `bin/tapioca gem tzinfo`.
|
||||||
|
|
||||||
module TZInfo; end
|
module TZInfo
|
||||||
|
class << self
|
||||||
|
def eager_load!; end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule
|
class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule
|
||||||
def initialize(day, transition_at = T.unsafe(nil)); end
|
def initialize(day, transition_at = T.unsafe(nil)); end
|
||||||
@ -94,6 +98,7 @@ class TZInfo::DataSource
|
|||||||
|
|
||||||
def country_codes; end
|
def country_codes; end
|
||||||
def data_timezone_identifiers; end
|
def data_timezone_identifiers; end
|
||||||
|
def eager_load!; end
|
||||||
def get_country_info(code); end
|
def get_country_info(code); end
|
||||||
def get_timezone_info(identifier); end
|
def get_timezone_info(identifier); end
|
||||||
def inspect; end
|
def inspect; end
|
||||||
@ -275,6 +280,7 @@ end
|
|||||||
|
|
||||||
TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = T.let(T.unsafe(nil), Array)
|
TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = T.let(T.unsafe(nil), Array)
|
||||||
TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_SEARCH_PATH = T.let(T.unsafe(nil), Array)
|
TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_SEARCH_PATH = T.let(T.unsafe(nil), Array)
|
||||||
|
TZInfo::DataSources::ZoneinfoDataSource::EXCLUDED_FILENAMES = T.let(T.unsafe(nil), Array)
|
||||||
class TZInfo::DataSources::ZoneinfoDirectoryNotFound < ::StandardError; end
|
class TZInfo::DataSources::ZoneinfoDirectoryNotFound < ::StandardError; end
|
||||||
|
|
||||||
class TZInfo::DataSources::ZoneinfoReader
|
class TZInfo::DataSources::ZoneinfoReader
|
@ -6,7 +6,7 @@ path = File.expand_path('..', __FILE__)
|
|||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.12.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.12.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.2/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.16.2/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.4/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-2.0.5/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.6.0/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.6.1/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/activesupport-6.1.6.1/lib"
|
||||||
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-4.0.7/lib"
|
$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/public_suffix-4.0.7/lib"
|
||||||
|
@ -3,6 +3,18 @@
|
|||||||
|
|
||||||
# The top level module for TZInfo.
|
# The top level module for TZInfo.
|
||||||
module TZInfo
|
module TZInfo
|
||||||
|
class << self
|
||||||
|
# Instructs the current {DataSource} to load all timezone and country data
|
||||||
|
# into memory (initializing the {DataSource} first if not previously
|
||||||
|
# accessed or set).
|
||||||
|
#
|
||||||
|
# This may be desirable in production environments to improve copy-on-write
|
||||||
|
# performance and to avoid flushing the constant cache every time a new
|
||||||
|
# timezone or country is loaded from {DataSources::RubyDataSource}.
|
||||||
|
def eager_load!
|
||||||
|
DataSource.get.eager_load!
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Object#untaint is a deprecated no-op in Ruby >= 2.7 and will be removed in
|
# Object#untaint is a deprecated no-op in Ruby >= 2.7 and will be removed in
|
@ -247,6 +247,17 @@ module TZInfo
|
|||||||
raise_invalid_data_source('country_codes')
|
raise_invalid_data_source('country_codes')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Loads all timezone and country data into memory.
|
||||||
|
#
|
||||||
|
# This may be desirable in production environments to improve copy-on-write
|
||||||
|
# performance and to avoid flushing the constant cache every time a new
|
||||||
|
# timezone or country is loaded from {DataSources::RubyDataSource}.
|
||||||
|
def eager_load!
|
||||||
|
timezone_identifiers.each {|identifier| load_timezone_info(identifier) }
|
||||||
|
country_codes.each {|code| load_country_info(code) }
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
# @return [String] a description of the {DataSource}.
|
# @return [String] a description of the {DataSource}.
|
||||||
def to_s
|
def to_s
|
||||||
"Default DataSource"
|
"Default DataSource"
|
@ -116,14 +116,14 @@ module TZInfo
|
|||||||
# @param identifier [Array<string>] the component parts of a time zone
|
# @param identifier [Array<string>] the component parts of a time zone
|
||||||
# identifier (split on /). This must have already been validated.
|
# identifier (split on /). This must have already been validated.
|
||||||
def require_definition(identifier)
|
def require_definition(identifier)
|
||||||
require_data(*(['definitions'] + identifier))
|
require_data('definitions', *identifier)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Requires an index by its name.
|
# Requires an index by its name.
|
||||||
#
|
#
|
||||||
# @param name [String] an index name.
|
# @param name [String] an index name.
|
||||||
def require_index(name)
|
def require_index(name)
|
||||||
require_data(*['indexes', name])
|
require_data('indexes', name)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Requires a file from tzinfo/data.
|
# Requires a file from tzinfo/data.
|
@ -78,6 +78,30 @@ module TZInfo
|
|||||||
DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = ['/usr/share/misc/iso3166.tab', '/usr/share/misc/iso3166'].freeze
|
DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = ['/usr/share/misc/iso3166.tab', '/usr/share/misc/iso3166'].freeze
|
||||||
private_constant :DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH
|
private_constant :DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH
|
||||||
|
|
||||||
|
# Files and directories in the top level zoneinfo directory that will be
|
||||||
|
# excluded from the list of available time zones:
|
||||||
|
#
|
||||||
|
# - +VERSION is included on Mac OS X.
|
||||||
|
# - leapseconds is a list of leap seconds.
|
||||||
|
# - localtime is the current local timezone (may be a link).
|
||||||
|
# - posix, posixrules and right are directories containing other
|
||||||
|
# versions of the zoneinfo files.
|
||||||
|
# - SECURITY is included in the Arch Linux tzdata package.
|
||||||
|
# - src is a directory containing the tzdata source included on Solaris.
|
||||||
|
# - timeconfig is a symlink included on Slackware.
|
||||||
|
EXCLUDED_FILENAMES = [
|
||||||
|
'+VERSION',
|
||||||
|
'leapseconds',
|
||||||
|
'localtime',
|
||||||
|
'posix',
|
||||||
|
'posixrules',
|
||||||
|
'right',
|
||||||
|
'SECURITY',
|
||||||
|
'src',
|
||||||
|
'timeconfig'
|
||||||
|
].freeze
|
||||||
|
private_constant :EXCLUDED_FILENAMES
|
||||||
|
|
||||||
# Paths to be checked to find the system zoneinfo directory.
|
# Paths to be checked to find the system zoneinfo directory.
|
||||||
#
|
#
|
||||||
# @private
|
# @private
|
||||||
@ -394,15 +418,7 @@ module TZInfo
|
|||||||
def load_timezone_identifiers
|
def load_timezone_identifiers
|
||||||
index = []
|
index = []
|
||||||
|
|
||||||
# Ignoring particular files:
|
enum_timezones([], EXCLUDED_FILENAMES) do |identifier|
|
||||||
# +VERSION is included on Mac OS X.
|
|
||||||
# leapseconds is a list of leap seconds.
|
|
||||||
# localtime is the current local timezone (may be a link).
|
|
||||||
# posix, posixrules and right are directories containing other versions of the zoneinfo files.
|
|
||||||
# src is a directory containing the tzdata source included on Solaris.
|
|
||||||
# timeconfig is a symlink included on Slackware.
|
|
||||||
|
|
||||||
enum_timezones([], ['+VERSION', 'leapseconds', 'localtime', 'posix', 'posixrules', 'right', 'src', 'timeconfig']) do |identifier|
|
|
||||||
index << identifier.join('/').freeze
|
index << identifier.join('/').freeze
|
||||||
end
|
end
|
||||||
|
|
@ -3,10 +3,11 @@
|
|||||||
|
|
||||||
module TZInfo
|
module TZInfo
|
||||||
# A time represented as an `Integer` number of seconds since 1970-01-01
|
# A time represented as an `Integer` number of seconds since 1970-01-01
|
||||||
# 00:00:00 UTC (ignoring leap seconds), the fraction through the second
|
# 00:00:00 UTC (ignoring leap seconds and using the proleptic Gregorian
|
||||||
# (sub_second as a `Rational`) and an optional UTC offset. Like Ruby's `Time`
|
# calendar), the fraction through the second (sub_second as a `Rational`) and
|
||||||
# class, {Timestamp} can distinguish between a local time with a zero offset
|
# an optional UTC offset. Like Ruby's `Time` class, {Timestamp} can
|
||||||
# and a time specified explicitly as UTC.
|
# distinguish between a local time with a zero offset and a time specified
|
||||||
|
# explicitly as UTC.
|
||||||
class Timestamp
|
class Timestamp
|
||||||
include Comparable
|
include Comparable
|
||||||
|
|
||||||
@ -16,8 +17,8 @@ module TZInfo
|
|||||||
private_constant :JD_EPOCH
|
private_constant :JD_EPOCH
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
# Returns a new {Timestamp} representing the (Gregorian calendar) date and
|
# Returns a new {Timestamp} representing the (proleptic Gregorian
|
||||||
# time specified by the supplied parameters.
|
# calendar) date and time specified by the supplied parameters.
|
||||||
#
|
#
|
||||||
# If `utc_offset` is `nil`, `:utc` or 0, the date and time parameters will
|
# If `utc_offset` is `nil`, `:utc` or 0, the date and time parameters will
|
||||||
# be interpreted as representing a UTC date and time. Otherwise the date
|
# be interpreted as representing a UTC date and time. Otherwise the date
|
||||||
@ -37,7 +38,7 @@ module TZInfo
|
|||||||
# specified offset, an offset from UTC specified as an `Integer` number
|
# specified offset, an offset from UTC specified as an `Integer` number
|
||||||
# of seconds or the `Symbol` `:utc`).
|
# of seconds or the `Symbol` `:utc`).
|
||||||
# @return [Timestamp] a new {Timestamp} representing the specified
|
# @return [Timestamp] a new {Timestamp} representing the specified
|
||||||
# (Gregorian calendar) date and time.
|
# (proleptic Gregorian calendar) date and time.
|
||||||
# @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`,
|
# @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`,
|
||||||
# `minute`, or `second` is not an `Integer`.
|
# `minute`, or `second` is not an `Integer`.
|
||||||
# @raise [ArgumentError] if `sub_second` is not a `Rational`, or the
|
# @raise [ArgumentError] if `sub_second` is not a `Rational`, or the
|
||||||
@ -84,7 +85,8 @@ module TZInfo
|
|||||||
# When called with a block, the {Timestamp} representation of `value` is
|
# When called with a block, the {Timestamp} representation of `value` is
|
||||||
# passed to the block. The block must then return a {Timestamp}, which
|
# passed to the block. The block must then return a {Timestamp}, which
|
||||||
# will be converted back to the type of the initial value. If the initial
|
# will be converted back to the type of the initial value. If the initial
|
||||||
# value was a {Timestamp}, the block result will just be returned.
|
# value was a {Timestamp}, the block result will be returned. If the
|
||||||
|
# initial value was a `DateTime`, a Gregorian `DateTime` will be returned.
|
||||||
#
|
#
|
||||||
# The UTC offset of `value` can either be preserved (the {Timestamp}
|
# The UTC offset of `value` can either be preserved (the {Timestamp}
|
||||||
# representation will have the same UTC offset as `value`), ignored (the
|
# representation will have the same UTC offset as `value`), ignored (the
|
||||||
@ -396,11 +398,11 @@ module TZInfo
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Converts this {Timestamp} to a `DateTime`.
|
# Converts this {Timestamp} to a Gregorian `DateTime`.
|
||||||
#
|
#
|
||||||
# @return [DateTime] a DateTime representation of this {Timestamp}. If the
|
# @return [DateTime] a Gregorian `DateTime` representation of this
|
||||||
# UTC offset of this {Timestamp} is not specified, a UTC `DateTime` will
|
# {Timestamp}. If the UTC offset of this {Timestamp} is not specified, a
|
||||||
# be returned.
|
# UTC `DateTime` will be returned.
|
||||||
def to_datetime
|
def to_datetime
|
||||||
new_datetime
|
new_datetime
|
||||||
end
|
end
|
||||||
@ -408,7 +410,7 @@ module TZInfo
|
|||||||
# Converts this {Timestamp} to an `Integer` number of seconds since
|
# Converts this {Timestamp} to an `Integer` number of seconds since
|
||||||
# 1970-01-01 00:00:00 UTC (ignoring leap seconds).
|
# 1970-01-01 00:00:00 UTC (ignoring leap seconds).
|
||||||
#
|
#
|
||||||
# @return [Integer] an Integer representation of this {Timestamp} (the
|
# @return [Integer] an `Integer` representation of this {Timestamp} (the
|
||||||
# number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds).
|
# number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds).
|
||||||
def to_i
|
def to_i
|
||||||
value
|
value
|
||||||
@ -492,7 +494,9 @@ module TZInfo
|
|||||||
#
|
#
|
||||||
# @private
|
# @private
|
||||||
def new_datetime(klass = DateTime)
|
def new_datetime(klass = DateTime)
|
||||||
datetime = klass.jd(JD_EPOCH + ((@value.to_r + @sub_second) / 86400))
|
# Can't specify the start parameter unless the jd parameter is an exact number of days.
|
||||||
|
# Use #gregorian instead.
|
||||||
|
datetime = klass.jd(JD_EPOCH + ((@value.to_r + @sub_second) / 86400)).gregorian
|
||||||
@utc_offset && @utc_offset != 0 ? datetime.new_offset(Rational(@utc_offset, 86400)) : datetime
|
@utc_offset && @utc_offset != 0 ? datetime.new_offset(Rational(@utc_offset, 86400)) : datetime
|
||||||
end
|
end
|
||||||
|
|
@ -3,5 +3,5 @@
|
|||||||
|
|
||||||
module TZInfo
|
module TZInfo
|
||||||
# The TZInfo version number.
|
# The TZInfo version number.
|
||||||
VERSION = '2.0.4'
|
VERSION = '2.0.5'
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user