activesupport 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
- data/CHANGELOG +13 -1
- data/lib/active_support.rb +6 -0
- data/lib/active_support/cache.rb +3 -1
- data/lib/active_support/cache/compressed_mem_cache_store.rb +4 -4
- data/lib/active_support/core_ext/date/behavior.rb +26 -0
- data/lib/active_support/core_ext/date/calculations.rb +1 -1
- data/lib/active_support/core_ext/hash/except.rb +4 -3
- data/lib/active_support/core_ext/hash/slice.rb +3 -1
- data/lib/active_support/core_ext/module.rb +5 -0
- data/lib/active_support/core_ext/module/model_naming.rb +22 -0
- data/lib/active_support/core_ext/object/extending.rb +9 -8
- data/lib/active_support/core_ext/range/blockless_step.rb +2 -2
- data/lib/active_support/core_ext/rexml.rb +35 -0
- data/lib/active_support/core_ext/string/unicode.rb +11 -13
- data/lib/active_support/core_ext/time.rb +22 -1
- data/lib/active_support/dependencies.rb +393 -392
- data/lib/active_support/deprecation.rb +27 -9
- data/lib/active_support/inflections.rb +51 -49
- data/lib/active_support/inflector.rb +267 -262
- data/lib/active_support/json/encoders/date_time.rb +1 -1
- data/lib/active_support/ordered_options.rb +14 -12
- data/lib/active_support/string_inquirer.rb +11 -0
- data/lib/active_support/time_with_zone.rb +34 -13
- data/lib/active_support/values/time_zone.rb +348 -346
- data/lib/active_support/vendor.rb +2 -2
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/data_timezone.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/data_timezone_info.rb +2 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Algiers.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Cairo.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Casablanca.rb +2 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Harare.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Johannesburg.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Monrovia.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Africa/Nairobi.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Argentina/San_Juan.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Bogota.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Caracas.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Chicago.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Chihuahua.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Denver.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Godthab.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Guatemala.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Halifax.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Indiana/Indianapolis.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Juneau.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/La_Paz.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Lima.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Los_Angeles.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Mazatlan.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Mexico_City.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Monterrey.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/New_York.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Phoenix.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Regina.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Santiago.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/St_Johns.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/America/Tijuana.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Almaty.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Baghdad.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Baku.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Bangkok.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Chongqing.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Dhaka.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Hong_Kong.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Irkutsk.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Jakarta.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Jerusalem.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Kabul.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Kamchatka.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Karachi.rb +2 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Katmandu.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Kolkata.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Krasnoyarsk.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Kuala_Lumpur.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Kuwait.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Magadan.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Muscat.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Novosibirsk.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Rangoon.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Riyadh.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Seoul.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Shanghai.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Singapore.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Taipei.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Tashkent.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Tbilisi.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Tehran.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Tokyo.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Ulaanbaatar.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Urumqi.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Vladivostok.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Yakutsk.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Yekaterinburg.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Asia/Yerevan.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Atlantic/Azores.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Atlantic/Cape_Verde.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Atlantic/South_Georgia.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Adelaide.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Brisbane.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Darwin.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Hobart.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Melbourne.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Perth.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Australia/Sydney.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Etc/UTC.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Amsterdam.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Athens.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Belgrade.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Berlin.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Bratislava.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Brussels.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Bucharest.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Budapest.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Copenhagen.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Dublin.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Helsinki.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Istanbul.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Kiev.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Lisbon.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Ljubljana.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/London.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Madrid.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Minsk.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Moscow.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Paris.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Prague.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Riga.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Rome.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Sarajevo.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Skopje.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Sofia.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Stockholm.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Tallinn.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Vienna.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Vilnius.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Warsaw.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Europe/Zagreb.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Auckland.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Fiji.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Guam.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Honolulu.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Majuro.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Midway.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Noumea.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Pago_Pago.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Port_Moresby.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/definitions/Pacific/Tongatapu.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/info_timezone.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/linked_timezone.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/linked_timezone_info.rb +0 -0
- data/lib/active_support/vendor/tzinfo-0.3.9/tzinfo/offset_rationals.rb +95 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/time_or_datetime.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone.rb +6 -6
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_definition.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_info.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_offset_info.rb +4 -4
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_period.rb +0 -0
- data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_transition_info.rb +2 -2
- data/lib/active_support/version.rb +1 -1
- metadata +154 -151
- data/lib/active_support/vendor/tzinfo-0.3.8/tzinfo/offset_rationals.rb +0 -95
File without changes
|
@@ -371,8 +371,8 @@ module TZInfo
|
|
371
371
|
# type as utc. Any timezone information in utc is ignored (it is treated as
|
372
372
|
# a UTC time).
|
373
373
|
def utc_to_local(utc)
|
374
|
-
TimeOrDateTime.wrap(utc) {|
|
375
|
-
period_for_utc(
|
374
|
+
TimeOrDateTime.wrap(utc) {|wrapped|
|
375
|
+
period_for_utc(wrapped).to_local(wrapped)
|
376
376
|
}
|
377
377
|
end
|
378
378
|
|
@@ -410,14 +410,14 @@ module TZInfo
|
|
410
410
|
# single period to use to convert the time or return nil or an empty array
|
411
411
|
# to cause an AmbiguousTime exception to be raised.
|
412
412
|
def local_to_utc(local, dst = nil)
|
413
|
-
TimeOrDateTime.wrap(local) {|
|
413
|
+
TimeOrDateTime.wrap(local) {|wrapped|
|
414
414
|
if block_given?
|
415
|
-
period = period_for_local(
|
415
|
+
period = period_for_local(wrapped, dst) {|periods| yield periods }
|
416
416
|
else
|
417
|
-
period = period_for_local(
|
417
|
+
period = period_for_local(wrapped, dst)
|
418
418
|
end
|
419
419
|
|
420
|
-
period.to_utc(
|
420
|
+
period.to_utc(wrapped)
|
421
421
|
}
|
422
422
|
end
|
423
423
|
|
File without changes
|
File without changes
|
@@ -56,15 +56,15 @@ module TZInfo
|
|
56
56
|
|
57
57
|
# Converts a UTC DateTime to local time based on the offset of this period.
|
58
58
|
def to_local(utc)
|
59
|
-
TimeOrDateTime.wrap(utc) {|
|
60
|
-
|
59
|
+
TimeOrDateTime.wrap(utc) {|wrapped|
|
60
|
+
wrapped + @utc_total_offset
|
61
61
|
}
|
62
62
|
end
|
63
63
|
|
64
64
|
# Converts a local DateTime to UTC based on the offset of this period.
|
65
65
|
def to_utc(local)
|
66
|
-
TimeOrDateTime.wrap(local) {|
|
67
|
-
|
66
|
+
TimeOrDateTime.wrap(local) {|wrapped|
|
67
|
+
wrapped - @utc_total_offset
|
68
68
|
}
|
69
69
|
end
|
70
70
|
|
File without changes
|
data/lib/active_support/vendor/{tzinfo-0.3.8 → tzinfo-0.3.9}/tzinfo/timezone_transition_info.rb
RENAMED
@@ -48,7 +48,7 @@ module TZInfo
|
|
48
48
|
# seconds since the epoch. If denominator is specified numerator_or_time
|
49
49
|
# and denominator are used to create a DateTime as follows:
|
50
50
|
#
|
51
|
-
# DateTime.new!(Rational.new
|
51
|
+
# DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY)
|
52
52
|
#
|
53
53
|
# For performance reasons, the numerator and denominator must be specified
|
54
54
|
# in their lowest form.
|
@@ -70,7 +70,7 @@ module TZInfo
|
|
70
70
|
unless @denominator
|
71
71
|
@at = TimeOrDateTime.new(@numerator_or_time)
|
72
72
|
else
|
73
|
-
r = Rational.new
|
73
|
+
r = Rational.send(:new!, @numerator_or_time, @denominator)
|
74
74
|
|
75
75
|
# Ruby 1.8.6 introduced new! and deprecated new0.
|
76
76
|
# Ruby 1.9.0 removed new0.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-09-04 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/active_support/core_ext/module/inclusion.rb
|
110
110
|
- lib/active_support/core_ext/module/introspection.rb
|
111
111
|
- lib/active_support/core_ext/module/loading.rb
|
112
|
+
- lib/active_support/core_ext/module/model_naming.rb
|
112
113
|
- lib/active_support/core_ext/module.rb
|
113
114
|
- lib/active_support/core_ext/name_error.rb
|
114
115
|
- lib/active_support/core_ext/numeric
|
@@ -135,6 +136,7 @@ files:
|
|
135
136
|
- lib/active_support/core_ext/range/include_range.rb
|
136
137
|
- lib/active_support/core_ext/range/overlaps.rb
|
137
138
|
- lib/active_support/core_ext/range.rb
|
139
|
+
- lib/active_support/core_ext/rexml.rb
|
138
140
|
- lib/active_support/core_ext/string
|
139
141
|
- lib/active_support/core_ext/string/access.rb
|
140
142
|
- lib/active_support/core_ext/string/conversions.rb
|
@@ -194,6 +196,7 @@ files:
|
|
194
196
|
- lib/active_support/option_merger.rb
|
195
197
|
- lib/active_support/ordered_hash.rb
|
196
198
|
- lib/active_support/ordered_options.rb
|
199
|
+
- lib/active_support/string_inquirer.rb
|
197
200
|
- lib/active_support/test_case.rb
|
198
201
|
- lib/active_support/testing
|
199
202
|
- lib/active_support/testing/default.rb
|
@@ -215,154 +218,154 @@ files:
|
|
215
218
|
- lib/active_support/vendor/builder-2.1.2/builder.rb
|
216
219
|
- lib/active_support/vendor/memcache-client-1.5.0
|
217
220
|
- lib/active_support/vendor/memcache-client-1.5.0/memcache.rb
|
218
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
219
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
220
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
221
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
222
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
223
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
224
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
225
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
226
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
227
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
228
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
229
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
230
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
231
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
232
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
233
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
234
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
235
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
236
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
237
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
238
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
239
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
240
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
241
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
242
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
243
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
244
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
245
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
246
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
247
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
248
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
249
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
250
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
251
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
252
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
253
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
254
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
255
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
256
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
257
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
258
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
259
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
260
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
261
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
262
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
263
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
264
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
265
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
266
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
267
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
268
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
269
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
270
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
271
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
272
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
273
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
274
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
275
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
276
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
277
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
278
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
279
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
280
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
281
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
282
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
283
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
284
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
285
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
286
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
287
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
288
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
289
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
290
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
291
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
292
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
293
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
294
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
295
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
296
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
297
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
298
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
299
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
300
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
301
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
302
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
303
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
304
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
305
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
306
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
307
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
308
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
309
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
310
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
311
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
312
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
313
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
314
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
315
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
316
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
317
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
318
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
319
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
320
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
321
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
322
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
323
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
324
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
325
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
326
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
327
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
328
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
329
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
330
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
331
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
332
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
333
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
334
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
335
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
336
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
337
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
338
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
339
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
340
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
341
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
342
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
343
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
344
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
345
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
346
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
347
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
348
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
349
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
350
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
351
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
352
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
353
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
354
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
355
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
356
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
357
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
358
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
359
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
360
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
361
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
362
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
363
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
364
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
365
|
-
- lib/active_support/vendor/tzinfo-0.3.
|
221
|
+
- lib/active_support/vendor/tzinfo-0.3.9
|
222
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo
|
223
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/data_timezone.rb
|
224
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/data_timezone_info.rb
|
225
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions
|
226
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa
|
227
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Algiers.rb
|
228
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Cairo.rb
|
229
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Casablanca.rb
|
230
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Harare.rb
|
231
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Johannesburg.rb
|
232
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Monrovia.rb
|
233
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Africa/Nairobi.rb
|
234
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America
|
235
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Argentina
|
236
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Argentina/Buenos_Aires.rb
|
237
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Argentina/San_Juan.rb
|
238
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Bogota.rb
|
239
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Caracas.rb
|
240
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Chicago.rb
|
241
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Chihuahua.rb
|
242
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Denver.rb
|
243
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Godthab.rb
|
244
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Guatemala.rb
|
245
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Halifax.rb
|
246
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Indiana
|
247
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Indiana/Indianapolis.rb
|
248
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Juneau.rb
|
249
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/La_Paz.rb
|
250
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Lima.rb
|
251
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Los_Angeles.rb
|
252
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Mazatlan.rb
|
253
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Mexico_City.rb
|
254
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Monterrey.rb
|
255
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/New_York.rb
|
256
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Phoenix.rb
|
257
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Regina.rb
|
258
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Santiago.rb
|
259
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/St_Johns.rb
|
260
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/America/Tijuana.rb
|
261
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia
|
262
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Almaty.rb
|
263
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Baghdad.rb
|
264
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Baku.rb
|
265
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Bangkok.rb
|
266
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Chongqing.rb
|
267
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Dhaka.rb
|
268
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Hong_Kong.rb
|
269
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Irkutsk.rb
|
270
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Jakarta.rb
|
271
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Jerusalem.rb
|
272
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Kabul.rb
|
273
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Kamchatka.rb
|
274
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Karachi.rb
|
275
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Katmandu.rb
|
276
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Kolkata.rb
|
277
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Krasnoyarsk.rb
|
278
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Kuala_Lumpur.rb
|
279
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Kuwait.rb
|
280
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Magadan.rb
|
281
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Muscat.rb
|
282
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Novosibirsk.rb
|
283
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Rangoon.rb
|
284
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Riyadh.rb
|
285
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Seoul.rb
|
286
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Shanghai.rb
|
287
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Singapore.rb
|
288
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Taipei.rb
|
289
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Tashkent.rb
|
290
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Tbilisi.rb
|
291
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Tehran.rb
|
292
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Tokyo.rb
|
293
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Ulaanbaatar.rb
|
294
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Urumqi.rb
|
295
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Vladivostok.rb
|
296
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Yakutsk.rb
|
297
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Yekaterinburg.rb
|
298
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Asia/Yerevan.rb
|
299
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Atlantic
|
300
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Atlantic/Azores.rb
|
301
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Atlantic/Cape_Verde.rb
|
302
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Atlantic/South_Georgia.rb
|
303
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia
|
304
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Adelaide.rb
|
305
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Brisbane.rb
|
306
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Darwin.rb
|
307
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Hobart.rb
|
308
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Melbourne.rb
|
309
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Perth.rb
|
310
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Australia/Sydney.rb
|
311
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Etc
|
312
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Etc/UTC.rb
|
313
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe
|
314
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Amsterdam.rb
|
315
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Athens.rb
|
316
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Belgrade.rb
|
317
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Berlin.rb
|
318
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Bratislava.rb
|
319
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Brussels.rb
|
320
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Bucharest.rb
|
321
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Budapest.rb
|
322
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Copenhagen.rb
|
323
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Dublin.rb
|
324
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Helsinki.rb
|
325
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Istanbul.rb
|
326
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Kiev.rb
|
327
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Lisbon.rb
|
328
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Ljubljana.rb
|
329
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/London.rb
|
330
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Madrid.rb
|
331
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Minsk.rb
|
332
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Moscow.rb
|
333
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Paris.rb
|
334
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Prague.rb
|
335
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Riga.rb
|
336
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Rome.rb
|
337
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Sarajevo.rb
|
338
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Skopje.rb
|
339
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Sofia.rb
|
340
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Stockholm.rb
|
341
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Tallinn.rb
|
342
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Vienna.rb
|
343
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Vilnius.rb
|
344
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Warsaw.rb
|
345
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Europe/Zagreb.rb
|
346
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific
|
347
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Auckland.rb
|
348
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Fiji.rb
|
349
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Guam.rb
|
350
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Honolulu.rb
|
351
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Majuro.rb
|
352
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Midway.rb
|
353
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Noumea.rb
|
354
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Pago_Pago.rb
|
355
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Port_Moresby.rb
|
356
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/definitions/Pacific/Tongatapu.rb
|
357
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/info_timezone.rb
|
358
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/linked_timezone.rb
|
359
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/linked_timezone_info.rb
|
360
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/offset_rationals.rb
|
361
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/time_or_datetime.rb
|
362
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone.rb
|
363
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_definition.rb
|
364
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_info.rb
|
365
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_offset_info.rb
|
366
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_period.rb
|
367
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo/timezone_transition_info.rb
|
368
|
+
- lib/active_support/vendor/tzinfo-0.3.9/tzinfo.rb
|
366
369
|
- lib/active_support/vendor/xml-simple-1.0.11
|
367
370
|
- lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb
|
368
371
|
- lib/active_support/vendor.rb
|
@@ -392,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
392
395
|
requirements: []
|
393
396
|
|
394
397
|
rubyforge_project: activesupport
|
395
|
-
rubygems_version: 1.0
|
398
|
+
rubygems_version: 1.2.0
|
396
399
|
signing_key:
|
397
400
|
specification_version: 2
|
398
401
|
summary: Support and utility classes used by the Rails framework.
|
@@ -1,95 +0,0 @@
|
|
1
|
-
#--
|
2
|
-
# Copyright (c) 2006 Philip Ross
|
3
|
-
#
|
4
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
-
# of this software and associated documentation files (the "Software"), to deal
|
6
|
-
# in the Software without restriction, including without limitation the rights
|
7
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
-
# copies of the Software, and to permit persons to whom the Software is
|
9
|
-
# furnished to do so, subject to the following conditions:
|
10
|
-
#
|
11
|
-
# The above copyright notice and this permission notice shall be included in all
|
12
|
-
# copies or substantial portions of the Software.
|
13
|
-
#
|
14
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
-
# THE SOFTWARE.
|
21
|
-
#++
|
22
|
-
|
23
|
-
module TZInfo
|
24
|
-
|
25
|
-
# Provides a method for getting Rationals for a timezone offset in seconds.
|
26
|
-
# Pre-reduced rationals are returned for all the half-hour intervals between
|
27
|
-
# -14 and +14 hours to avoid having to call gcd at runtime.
|
28
|
-
module OffsetRationals #:nodoc:
|
29
|
-
@@rational_cache = {
|
30
|
-
-50400 => Rational(-7,12),
|
31
|
-
-48600 => Rational(-9,16),
|
32
|
-
-46800 => Rational(-13,24),
|
33
|
-
-45000 => Rational(-25,48),
|
34
|
-
-43200 => Rational(-1,2),
|
35
|
-
-41400 => Rational(-23,48),
|
36
|
-
-39600 => Rational(-11,24),
|
37
|
-
-37800 => Rational(-7,16),
|
38
|
-
-36000 => Rational(-5,12),
|
39
|
-
-34200 => Rational(-19,48),
|
40
|
-
-32400 => Rational(-3,8),
|
41
|
-
-30600 => Rational(-17,48),
|
42
|
-
-28800 => Rational(-1,3),
|
43
|
-
-27000 => Rational(-5,16),
|
44
|
-
-25200 => Rational(-7,24),
|
45
|
-
-23400 => Rational(-13,48),
|
46
|
-
-21600 => Rational(-1,4),
|
47
|
-
-19800 => Rational(-11,48),
|
48
|
-
-18000 => Rational(-5,24),
|
49
|
-
-16200 => Rational(-3,16),
|
50
|
-
-14400 => Rational(-1,6),
|
51
|
-
-12600 => Rational(-7,48),
|
52
|
-
-10800 => Rational(-1,8),
|
53
|
-
-9000 => Rational(-5,48),
|
54
|
-
-7200 => Rational(-1,12),
|
55
|
-
-5400 => Rational(-1,16),
|
56
|
-
-3600 => Rational(-1,24),
|
57
|
-
-1800 => Rational(-1,48),
|
58
|
-
0 => Rational(0,1),
|
59
|
-
1800 => Rational(1,48),
|
60
|
-
3600 => Rational(1,24),
|
61
|
-
5400 => Rational(1,16),
|
62
|
-
7200 => Rational(1,12),
|
63
|
-
9000 => Rational(5,48),
|
64
|
-
10800 => Rational(1,8),
|
65
|
-
12600 => Rational(7,48),
|
66
|
-
14400 => Rational(1,6),
|
67
|
-
16200 => Rational(3,16),
|
68
|
-
18000 => Rational(5,24),
|
69
|
-
19800 => Rational(11,48),
|
70
|
-
21600 => Rational(1,4),
|
71
|
-
23400 => Rational(13,48),
|
72
|
-
25200 => Rational(7,24),
|
73
|
-
27000 => Rational(5,16),
|
74
|
-
28800 => Rational(1,3),
|
75
|
-
30600 => Rational(17,48),
|
76
|
-
32400 => Rational(3,8),
|
77
|
-
34200 => Rational(19,48),
|
78
|
-
36000 => Rational(5,12),
|
79
|
-
37800 => Rational(7,16),
|
80
|
-
39600 => Rational(11,24),
|
81
|
-
41400 => Rational(23,48),
|
82
|
-
43200 => Rational(1,2),
|
83
|
-
45000 => Rational(25,48),
|
84
|
-
46800 => Rational(13,24),
|
85
|
-
48600 => Rational(9,16),
|
86
|
-
50400 => Rational(7,12)}
|
87
|
-
|
88
|
-
# Returns a Rational expressing the fraction of a day that offset in
|
89
|
-
# seconds represents (i.e. equivalent to Rational(offset, 86400)).
|
90
|
-
def rational_for_offset(offset)
|
91
|
-
@@rational_cache[offset] || Rational(offset, 86400)
|
92
|
-
end
|
93
|
-
module_function :rational_for_offset
|
94
|
-
end
|
95
|
-
end
|