diff --git a/.gitignore b/.gitignore index 4de3c8a..1a3591c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ clog /rubygem-tzinfo.spec /tzinfo-0.3.30.gem /tzinfo-0.3.34.gem +/tzinfo-0.3.35.gem diff --git a/rubygem-tzinfo-0.3.35-Fix-TimezoneTransitionInfo-eql.patch b/rubygem-tzinfo-0.3.35-Fix-TimezoneTransitionInfo-eql.patch new file mode 100644 index 0000000..372645f --- /dev/null +++ b/rubygem-tzinfo-0.3.35-Fix-TimezoneTransitionInfo-eql.patch @@ -0,0 +1,132 @@ +Index: lib/tzinfo/country_timezone.rb +=================================================================== +--- lib/tzinfo/country_timezone.rb (revision 386) ++++ lib/tzinfo/country_timezone.rb (revision 387) +@@ -1,5 +1,5 @@ + #-- +-# Copyright (c) 2006-2010 Philip Ross ++# Copyright (c) 2006-2012 Philip Ross + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal +@@ -74,10 +74,9 @@ + # current CountryTimezone (has the same identifer, latitude, longitude + # and description). + def ==(ct) +- ct.respond_to?(:identifier) && ct.respond_to?(:latitude) && +- ct.respond_to?(:longitude) && ct.respond_to?(:description) && +- identifier == ct.identifier && latitude == ct.latitude && +- longitude == ct.longitude && description == ct.description ++ ct.kind_of?(CountryTimezone) && ++ identifier == ct.identifier && latitude == ct.latitude && ++ longitude == ct.longitude && description == ct.description + end + + # Returns true if and only if the given CountryTimezone is equal to the +Index: lib/tzinfo/timezone_transition_info.rb +=================================================================== +--- lib/tzinfo/timezone_transition_info.rb (revision 386) ++++ lib/tzinfo/timezone_transition_info.rb (revision 387) +@@ -1,5 +1,5 @@ + #-- +-# Copyright (c) 2006-2010 Philip Ross ++# Copyright (c) 2006-2012 Philip Ross + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal +@@ -98,7 +98,7 @@ + # considered to be equal by == if offset, previous_offset and at are all + # equal. + def ==(tti) +- tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) && ++ tti.kind_of?(TimezoneTransitionInfo) && + offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at + end + +@@ -109,8 +109,7 @@ + # which just requires the at times to be equal regardless of how they were + # originally specified. + def eql?(tti) +- tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && +- tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) && ++ tti.kind_of?(TimezoneTransitionInfo) && + offset == tti.offset && previous_offset == tti.previous_offset && + numerator_or_time == tti.numerator_or_time && denominator == tti.denominator + end +Index: lib/tzinfo/timezone_period.rb +=================================================================== +--- lib/tzinfo/timezone_period.rb (revision 386) ++++ lib/tzinfo/timezone_period.rb (revision 387) +@@ -1,5 +1,5 @@ + #-- +-# Copyright (c) 2005-2010 Philip Ross ++# Copyright (c) 2005-2012 Philip Ross + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal +@@ -165,17 +165,19 @@ + # Returns true if this TimezonePeriod is equal to p. This compares the + # start_transition, end_transition and offset using ==. + def ==(p) +- p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && +- p.respond_to?(:offset) && start_transition == p.start_transition && +- end_transition == p.end_transition && offset == p.offset ++ p.kind_of?(TimezonePeriod) && ++ start_transition == p.start_transition && ++ end_transition == p.end_transition && ++ offset == p.offset + end + + # Returns true if this TimezonePeriods is equal to p. This compares the + # start_transition, end_transition and offset using eql? + def eql?(p) +- p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && +- p.respond_to?(:offset) && start_transition.eql?(p.start_transition) && +- end_transition.eql?(p.end_transition) && offset.eql?(p.offset) ++ p.kind_of?(TimezonePeriod) && ++ start_transition.eql?(p.start_transition) && ++ end_transition.eql?(p.end_transition) && ++ offset.eql?(p.offset) + end + + # Returns a hash of this TimezonePeriod. +Index: lib/tzinfo/time_or_datetime.rb +=================================================================== +--- lib/tzinfo/time_or_datetime.rb (revision 386) ++++ lib/tzinfo/time_or_datetime.rb (revision 387) +@@ -1,5 +1,5 @@ + #-- +-# Copyright (c) 2006-2010 Philip Ross ++# Copyright (c) 2006-2012 Philip Ross + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal +@@ -251,7 +251,7 @@ + # constructed with the same type (DateTime, Time or timestamp) as this + # TimeOrDateTime. + def eql?(todt) +- todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) ++ todt.kind_of?(TimeOrDateTime) && to_orig.eql?(todt.to_orig) + end + + # Returns a hash of this TimeOrDateTime. +Index: lib/tzinfo/timezone_offset_info.rb +=================================================================== +--- lib/tzinfo/timezone_offset_info.rb (revision 386) ++++ lib/tzinfo/timezone_offset_info.rb (revision 387) +@@ -1,5 +1,5 @@ + #-- +-# Copyright (c) 2006 Philip Ross ++# Copyright (c) 2006-2012 Philip Ross + # + # Permission is hereby granted, free of charge, to any person obtaining a copy + # of this software and associated documentation files (the "Software"), to deal +@@ -71,7 +71,7 @@ + # Returns true if and only if toi has the same utc_offset, std_offset + # and abbreviation as this TimezoneOffsetInfo. + def ==(toi) +- toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) && ++ toi.kind_of?(TimezoneOffsetInfo) && + utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation + end + diff --git a/rubygem-tzinfo.spec b/rubygem-tzinfo.spec index 42d0ed4..f08231d 100644 --- a/rubygem-tzinfo.spec +++ b/rubygem-tzinfo.spec @@ -5,12 +5,14 @@ Summary: Daylight-savings aware timezone library Name: rubygem-%{gem_name} -Version: 0.3.34 -Release: 3%{?dist} +Version: 0.3.35 +Release: 1%{?dist} Group: Development/Languages License: MIT URL: http://tzinfo.rubyforge.org/ Source0: %{download_path}%{gem_name}-%{version}.gem +# Upstream r387 +Patch0: rubygem-tzinfo-0.3.35-Fix-TimezoneTransitionInfo-eql.patch Requires: ruby(release) Requires: ruby(rubygems) Requires: ruby @@ -38,6 +40,10 @@ This package contains documentation for %{name}. %setup -q -c -T %gem_install -n %{SOURCE0} +pushd .%{gem_instdir} +%patch0 +popd + %build %install @@ -47,6 +53,9 @@ cp -a .%{gem_dir}/* \ %check pushd .%{gem_instdir} +# This was disabled for 1.9, so disable it for 2.0 as well. It appears to be +# fixed by r346 upstream, but the patch is too invasive. +sed -i "151,161 s/^/#/" test/tc_timezone.rb testrb test/ts_all.rb popd @@ -65,6 +74,9 @@ popd %{gem_docdir} %changelog +* Mon Feb 25 2013 Vít Ondruch - 0.3.35-1 +- Update to tzinfo 0.3.35. + * Mon Feb 25 2013 Vít Ondruch - 0.3.34-3 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 diff --git a/sources b/sources index 0b61daa..943cf93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b2648d3554a5d62d99bd4d1bce91797f tzinfo-0.3.34.gem +1f83000323fb013c7a14cdb426a9941b tzinfo-0.3.35.gem