pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/time/ruby-tzinfo time/ruby-tzinfo: update to 2.0.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/039f34bcc731
branches:  trunk
changeset: 391290:039f34bcc731
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Feb 03 15:27:53 2019 +0000

description:
time/ruby-tzinfo: update to 2.0.0

2.0.0 (2018-12-26)

Added

* to_local and period_for instance methods have been added to TZInfo::Timezone. These are similar to utc_to_local and period_for_utc, but take the UTC offset of the given time into account.
* abbreviation, dst?, base_utc_offset and observed_utc_offset instance methods have been added to TZInfo::Timezone, returning the abbreviation, whether daylight savings time is in effect and the UTC 
offset of the time zone at a specified time.
* A TZInfo::Timestamp class has been added. It can be used with TZInfo::Timezone in place of a Time or DateTime.
* local_time, local_datetime and local_timestamp instance methods have been added to TZInfo::Timezone. These methods construct local Time, DateTime and TZInfo::Timestamp instances with the correct 
UTC offset and abbreviation for the time zone.
* Support for a (yet to be released) version 2 of tzinfo-data has been added, in addition to support for version 1. The new version will remove the (no longer needed) DateTime parameters from 
transition times, reduce memory consumption and improve the efficiency of loading timezone and country indexes.
* A TZInfo::VERSION constant has been added, indicating the TZInfo version number.

Changed

* The minimum supported Ruby versions are now Ruby MRI 1.9.3, JRuby 1.7 (in 1.9 or later mode) and Rubinius 3.
* Local times are now returned using the correct UTC offset (instead of using UTC). #49 and #52.
* Local times are returned as instances of TimeWithOffset, DateTimeWithOffset or TZInfo::TimestampWithOffset. These classes subclass Time, DateTime and TZInfo::Timestamp respectively. They override 
the default behaviour of the base classes to return information about the observed offset at the indicated time. For example, the zone abbreviation is returned when using the %Z directive with 
strftime.
* The transitions_up_to, offsets_up_to and strftime instance methods of TZInfo::Timezone now take the UTC offsets of given times into account (instead of ignoring them as was previously the case).
* The TZInfo::TimezonePeriod class has been split into two subclasses: TZInfo::OffsetTimezonePeriod and TZInfo::TransitionsTimezonePeriod. TZInfo::OffsetTimezonePeriod is returned for time zones that 
only have a single offset. TZInfo::TransitionsTimezonePeriod is returned for periods that start or end with a transition.
* TZInfo::TimezoneOffset#abbreviation, TZInfo::TimezonePeriod#abbreviation and TZInfo::TimezonePeriod#zone_identifier now return frozen String instances instead of instances of Symbol.
* The utc_offset and utc_total_offset attributes of TZInfo::TimezonePeriod and TZInfo::TimezoneOffset have been renamed base_utc_offset and observed_utc_offset respectively. The former names have 
been retained as aliases.
* TZInfo::Timezone.get, TZInfo::Timezone.get_proxy and TZInfo::Country.get can now be used with strings having any encoding. Previously, only encodings that are directly comparable with UTF-8 were 
supported.
* The requested identifier is included in TZInfo::InvalidTimezoneIdentifier exception messages.
* The requested country code is included in TZInfo::InvalidCountryCode exception messages.
* The full range of transitions is now loaded from zoneinfo files. Zoneinfo files produced with version 2014c of the zic tool contain an initial transition 2**63 seconds before the epoch. Zoneinfo 
files produced with version 2014d or later of zic contain an initial transition 2**59 seconds before the epoch. These transitions would previously have been ignored, but are now returned in methods 
such as TZInfo::Timezone#transitions_up_to.
* The TZInfo::RubyDataSource and TZInfo::ZoneinfoDataSource classes have been moved into a new TZInfo::DataSources module. Code that is setting TZInfo::ZoneinfoDataSource.search_path or 
TZInfo::ZoneinfoDataSource.alternate_iso3166_tab_search_path will need to be updated accordingly.
* The TZInfo::InvalidZoneinfoDirectory and TZInfo::ZoneinfoDirectoryNotFound exception classes raised by TZInfo::DataSources::ZoneinfoDataSource have been moved into the TZInfo::DataSources module.
* Setting the data source to :ruby or instantiating TZInfo::DataSources::RubyDataSource will now immediately raise a TZInfo::DataSources::TZInfoDataNotFound exception if require 'tzinfo/data' fails. 
Previously, a failure would only occur later when accessing an index or loading a timezone or country.
* The DEFAULT_SEARCH_PATH and DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH constants of TZInfo::DataSources::ZoneinfoDataSource have been made private.
* The TZInfo::Country.data_source, TZInfo::DataSource.create_default_data_source, TZInfo::DataSources::ZoneinfoDataSource.process_search_path, TZInfo::Timezone.get_proxies and 
TZInfo::Timezone.data_source methods have been made private.
* The performance of loading zoneinfo files and the associated indexes has been improved.
* Memory use has been decreased by deduplicating String instances when loading country and time zone data.
* The dependency on the deprecated thread_safe gem as been removed and replaced by concurrent-ruby.
* The Info classes used to return time zone and country information from TZInfo::DataSource implementations have been moved into the TZInfo::DataSources module.
* The TZInfo::TransitionDataTimezoneInfo class has been removed and replaced with TZInfo::DataSources::TransitionsDataTimezoneInfo and TZInfo::DataSources::ConstantOffsetDataTimezoneInfo. 
TZInfo::DataSources::TransitionsDataTimezoneInfo is constructed with an Array of TZInfo::TimezoneTransition instances representing times when the offset changes. 
TZInfo::DataSources::ConstantOffsetDataTimezoneInfo is constructed with a TZInfo::TimezoneOffset instance representing the offset constantly observed in a time zone.
* The TZInfo::DataSource#timezone_identifiers method should no longer be overridden in custom data source implementations. The implementation in the base class now calculates a result from 
TZInfo::DataSource#data_timezone_identifiers and TZInfo::DataSource#linked_timezone_identifiers.
* The results of the TZInfo::DataSources::RubyDataSource to_s and inspect methods now include the time zone database and tzinfo-data versions.

Removed

* Methods of TZInfo::Timezone that accept time arguments no longer allow Integer timestamp values. Time, DateTime or TZInfo::Timestamp values or objects that respond to to_i, subsec and optionally 
utc_offset must be used instead.
* The %:::z format directive can now only be used with TZInfo::Timezone#strftime if it is supported by Time#strftime on the runtime platform.
* Using TZInfo::Timezone.new(identifier) and TZInfo::Country.new(code) to obtain a specific TZInfo::Timezone or TZInfo::Country will no longer work. TZInfo::Timezone.get(identifier) and 
TZInfo::Country.get(code) should be used instead.
* The TZInfo::TimeOrDateTime class has been removed.
* The valid_for_utc?, utc_after_start?, utc_before_end?, valid_for_local?, local_after_start? and local_before_end? instance methods of TZInfo::TimezonePeriod have been removed. Comparisons can be 
performed with the results of the starts_at, ends_at, local_starts_at and local_ends_at methods instead.
* The to_local and to_utc instance methods of TZInfo::TimezonePeriod and TZInfo::TimezoneOffset have been removed. Conversions should be performed using the TZInfo::Timezone class instead.
* The TZInfo::TimezonePeriod#utc_total_offset_rational method has been removed. Equivalent information can be obtained using the TZInfo::TimezonePeriod#observed_utc_offset method.
* The datetime, time, local_end, local_end_time, local_start and local_start_time instance methods of TZInfo::TimezoneTransition have been removed. The at, local_end_at and local_start_at methods 
should be used instead and the result (a TZInfo::TimestampWithOffset) converted to either a DateTime or Time by calling to_datetime or to_time on the result.
* The us_zones and us_zone_identifiers class methods of TZInfo::Timezone have been removed. TZInfo::Country.get('US').zones and TZInfo::Country.get('US').zone_identifiers should be used instead.

diffstat:

 time/ruby-tzinfo/Makefile |    4 +-
 time/ruby-tzinfo/PLIST    |  125 ++++++++++++---------------------------------
 time/ruby-tzinfo/distinfo |   10 +-
 3 files changed, 41 insertions(+), 98 deletions(-)

diffs (174 lines):

diff -r 54ecf5ba9f68 -r 039f34bcc731 time/ruby-tzinfo/Makefile
--- a/time/ruby-tzinfo/Makefile Sun Feb 03 15:13:06 2019 +0000
+++ b/time/ruby-tzinfo/Makefile Sun Feb 03 15:27:53 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.43 2019/01/02 14:44:48 taca Exp $
+# $NetBSD: Makefile,v 1.44 2019/02/03 15:27:53 taca Exp $
 
-DISTNAME=      tzinfo-1.2.5
+DISTNAME=      tzinfo-2.0.0
 CATEGORIES=    time
 
 MAINTAINER=    taca%NetBSD.org@localhost
diff -r 54ecf5ba9f68 -r 039f34bcc731 time/ruby-tzinfo/PLIST
--- a/time/ruby-tzinfo/PLIST    Sun Feb 03 15:13:06 2019 +0000
+++ b/time/ruby-tzinfo/PLIST    Sun Feb 03 15:27:53 2019 +0000
@@ -1,109 +1,52 @@
-@comment $NetBSD: PLIST,v 1.26 2017/10/31 15:46:33 taca Exp $
+@comment $NetBSD: PLIST,v 1.27 2019/02/03 15:27:53 taca Exp $
 ${GEM_HOME}/cache/${GEM_NAME}.gem
 ${GEM_LIBDIR}/.yardopts
 ${GEM_LIBDIR}/CHANGES.md
 ${GEM_LIBDIR}/LICENSE
 ${GEM_LIBDIR}/README.md
-${GEM_LIBDIR}/Rakefile
 ${GEM_LIBDIR}/lib/tzinfo.rb
 ${GEM_LIBDIR}/lib/tzinfo/country.rb
-${GEM_LIBDIR}/lib/tzinfo/country_index_definition.rb
-${GEM_LIBDIR}/lib/tzinfo/country_info.rb
 ${GEM_LIBDIR}/lib/tzinfo/country_timezone.rb
 ${GEM_LIBDIR}/lib/tzinfo/data_source.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/country_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/data_timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/linked_timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/ruby_data_source.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/transitions_data_timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/zoneinfo_data_source.rb
+${GEM_LIBDIR}/lib/tzinfo/data_sources/zoneinfo_reader.rb
 ${GEM_LIBDIR}/lib/tzinfo/data_timezone.rb
-${GEM_LIBDIR}/lib/tzinfo/data_timezone_info.rb
+${GEM_LIBDIR}/lib/tzinfo/datetime_with_offset.rb
+${GEM_LIBDIR}/lib/tzinfo/format1.rb
+${GEM_LIBDIR}/lib/tzinfo/format1/country_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format1/country_index_definition.rb
+${GEM_LIBDIR}/lib/tzinfo/format1/timezone_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format1/timezone_definition.rb
+${GEM_LIBDIR}/lib/tzinfo/format1/timezone_index_definition.rb
+${GEM_LIBDIR}/lib/tzinfo/format2.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/country_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/country_index_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/country_index_definition.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/timezone_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/timezone_definition.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/timezone_index_definer.rb
+${GEM_LIBDIR}/lib/tzinfo/format2/timezone_index_definition.rb
 ${GEM_LIBDIR}/lib/tzinfo/info_timezone.rb
 ${GEM_LIBDIR}/lib/tzinfo/linked_timezone.rb
-${GEM_LIBDIR}/lib/tzinfo/linked_timezone_info.rb
-${GEM_LIBDIR}/lib/tzinfo/offset_rationals.rb
-${GEM_LIBDIR}/lib/tzinfo/ruby_core_support.rb
-${GEM_LIBDIR}/lib/tzinfo/ruby_country_info.rb
-${GEM_LIBDIR}/lib/tzinfo/ruby_data_source.rb
-${GEM_LIBDIR}/lib/tzinfo/time_or_datetime.rb
+${GEM_LIBDIR}/lib/tzinfo/offset_timezone_period.rb
+${GEM_LIBDIR}/lib/tzinfo/string_deduper.rb
+${GEM_LIBDIR}/lib/tzinfo/time_with_offset.rb
+${GEM_LIBDIR}/lib/tzinfo/timestamp.rb
+${GEM_LIBDIR}/lib/tzinfo/timestamp_with_offset.rb
 ${GEM_LIBDIR}/lib/tzinfo/timezone.rb
-${GEM_LIBDIR}/lib/tzinfo/timezone_definition.rb
-${GEM_LIBDIR}/lib/tzinfo/timezone_index_definition.rb
-${GEM_LIBDIR}/lib/tzinfo/timezone_info.rb
 ${GEM_LIBDIR}/lib/tzinfo/timezone_offset.rb
 ${GEM_LIBDIR}/lib/tzinfo/timezone_period.rb
 ${GEM_LIBDIR}/lib/tzinfo/timezone_proxy.rb
 ${GEM_LIBDIR}/lib/tzinfo/timezone_transition.rb
-${GEM_LIBDIR}/lib/tzinfo/timezone_transition_definition.rb
-${GEM_LIBDIR}/lib/tzinfo/transition_data_timezone_info.rb
-${GEM_LIBDIR}/lib/tzinfo/zoneinfo_country_info.rb
-${GEM_LIBDIR}/lib/tzinfo/zoneinfo_data_source.rb
-${GEM_LIBDIR}/lib/tzinfo/zoneinfo_timezone_info.rb
-${GEM_LIBDIR}/test/tc_country.rb
-${GEM_LIBDIR}/test/tc_country_index_definition.rb
-${GEM_LIBDIR}/test/tc_country_info.rb
-${GEM_LIBDIR}/test/tc_country_timezone.rb
-${GEM_LIBDIR}/test/tc_data_source.rb
-${GEM_LIBDIR}/test/tc_data_timezone.rb
-${GEM_LIBDIR}/test/tc_data_timezone_info.rb
-${GEM_LIBDIR}/test/tc_info_timezone.rb
-${GEM_LIBDIR}/test/tc_linked_timezone.rb
-${GEM_LIBDIR}/test/tc_linked_timezone_info.rb
-${GEM_LIBDIR}/test/tc_offset_rationals.rb
-${GEM_LIBDIR}/test/tc_ruby_core_support.rb
-${GEM_LIBDIR}/test/tc_ruby_country_info.rb
-${GEM_LIBDIR}/test/tc_ruby_data_source.rb
-${GEM_LIBDIR}/test/tc_time_or_datetime.rb
-${GEM_LIBDIR}/test/tc_timezone.rb
-${GEM_LIBDIR}/test/tc_timezone_definition.rb
-${GEM_LIBDIR}/test/tc_timezone_index_definition.rb
-${GEM_LIBDIR}/test/tc_timezone_info.rb
-${GEM_LIBDIR}/test/tc_timezone_london.rb
-${GEM_LIBDIR}/test/tc_timezone_melbourne.rb
-${GEM_LIBDIR}/test/tc_timezone_new_york.rb
-${GEM_LIBDIR}/test/tc_timezone_offset.rb
-${GEM_LIBDIR}/test/tc_timezone_period.rb
-${GEM_LIBDIR}/test/tc_timezone_proxy.rb
-${GEM_LIBDIR}/test/tc_timezone_transition.rb
-${GEM_LIBDIR}/test/tc_timezone_transition_definition.rb
-${GEM_LIBDIR}/test/tc_timezone_utc.rb
-${GEM_LIBDIR}/test/tc_transition_data_timezone_info.rb
-${GEM_LIBDIR}/test/tc_zoneinfo_country_info.rb
-${GEM_LIBDIR}/test/tc_zoneinfo_data_source.rb
-${GEM_LIBDIR}/test/tc_zoneinfo_timezone_info.rb
-${GEM_LIBDIR}/test/test_utils.rb
-${GEM_LIBDIR}/test/ts_all.rb
-${GEM_LIBDIR}/test/ts_all_ruby.rb
-${GEM_LIBDIR}/test/ts_all_zoneinfo.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/EST.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/definitions/UTC.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/indexes/countries.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/indexes/timezones.rb
-${GEM_LIBDIR}/test/tzinfo-data/tzinfo/data/version.rb
-${GEM_LIBDIR}/test/zoneinfo/America/Argentina/Buenos_Aires
-${GEM_LIBDIR}/test/zoneinfo/America/New_York
-${GEM_LIBDIR}/test/zoneinfo/Australia/Melbourne
-${GEM_LIBDIR}/test/zoneinfo/EST
-${GEM_LIBDIR}/test/zoneinfo/Etc/UTC
-${GEM_LIBDIR}/test/zoneinfo/Europe/Amsterdam
-${GEM_LIBDIR}/test/zoneinfo/Europe/Andorra
-${GEM_LIBDIR}/test/zoneinfo/Europe/London
-${GEM_LIBDIR}/test/zoneinfo/Europe/Paris
-${GEM_LIBDIR}/test/zoneinfo/Europe/Prague
-${GEM_LIBDIR}/test/zoneinfo/Factory
-${GEM_LIBDIR}/test/zoneinfo/iso3166.tab
-${GEM_LIBDIR}/test/zoneinfo/leapseconds
-${GEM_LIBDIR}/test/zoneinfo/posix/Europe/London
-${GEM_LIBDIR}/test/zoneinfo/posixrules
-${GEM_LIBDIR}/test/zoneinfo/right/Europe/London
-${GEM_LIBDIR}/test/zoneinfo/zone.tab
-${GEM_LIBDIR}/test/zoneinfo/zone1970.tab
-${GEM_LIBDIR}/tzinfo.gemspec
+${GEM_LIBDIR}/lib/tzinfo/transitions_timezone_period.rb
+${GEM_LIBDIR}/lib/tzinfo/version.rb
+${GEM_LIBDIR}/lib/tzinfo/with_offset.rb
 ${GEM_HOME}/specifications/${GEM_NAME}.gemspec
diff -r 54ecf5ba9f68 -r 039f34bcc731 time/ruby-tzinfo/distinfo
--- a/time/ruby-tzinfo/distinfo Sun Feb 03 15:13:06 2019 +0000
+++ b/time/ruby-tzinfo/distinfo Sun Feb 03 15:27:53 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.39 2018/02/28 15:10:01 taca Exp $
+$NetBSD: distinfo,v 1.40 2019/02/03 15:27:53 taca Exp $
 
-SHA1 (tzinfo-1.2.5.gem) = c63e819a4ef646956bef31acec7d39ddccaff35c
-RMD160 (tzinfo-1.2.5.gem) = cfefbf80840bc193a086eb32c4c079365b0f14be
-SHA512 (tzinfo-1.2.5.gem) = 87f7cd66d6e80d51d216cb993cc76fe7758db03ffd39dde96eb24a9d208699766a8dbff048485fb732ce125ee9f971e38ed9ee1197f3ee3fc3ee8a8da840dd45
-Size (tzinfo-1.2.5.gem) = 153600 bytes
+SHA1 (tzinfo-2.0.0.gem) = 5129e92eab9c5e6e2453e1c7b56686b97829ffe6
+RMD160 (tzinfo-2.0.0.gem) = e11529fdc152d44b056ef21b45a3851add269f16
+SHA512 (tzinfo-2.0.0.gem) = 7232130a9c22e416f9e3e05276a2e7d0088eda0f9143261aa035ab0bb6b7525c100a70e3db88b6f7a9b6954a3783d6d356802b034e29f993e8b0de9ab9c02669
+Size (tzinfo-2.0.0.gem) = 70144 bytes



Home | Main Index | Thread Index | Old Index