From 02df503d3b4db7a3e7fabe1403c388a059f905b8 Mon Sep 17 00:00:00 2001 From: Phil Ross Date: Wed, 12 Nov 2008 13:42:56 +0000 Subject: TimeZone: Caracas GMT offset changed to -4:30 [#1361 state:resolved] --- activesupport/CHANGELOG | 2 ++ activesupport/lib/active_support/values/time_zone.rb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index e77affc315..12b300d3ae 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *2.2.1 [RC2 or 2.2 final]* +* TimeZone: Caracas GMT offset changed to -4:30 [#1361 state:resolved] [Phil Ross] + * Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] * Fixed the option merging in Array#to_xml #1126 [Rudolf Gavlas] diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 4991f71683..335d75d218 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -304,7 +304,8 @@ module ActiveSupport "Mexico City", "Monterrey", "Central America" ], [-18_000, "Eastern Time (US & Canada)", "Indiana (East)", "Bogota", "Lima", "Quito" ], - [-14_400, "Atlantic Time (Canada)", "Caracas", "La Paz", "Santiago" ], + [-16_200, "Caracas" ], + [-14_400, "Atlantic Time (Canada)", "La Paz", "Santiago" ], [-12_600, "Newfoundland" ], [-10_800, "Brasilia", "Buenos Aires", "Georgetown", "Greenland" ], [ -7_200, "Mid-Atlantic" ], -- cgit v1.2.3 From 020a4113048be7166346cba6c59bbbca819de911 Mon Sep 17 00:00:00 2001 From: gbuesing Date: Thu, 13 Nov 2008 09:04:06 -0600 Subject: TimeZone: fix base offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date --- activesupport/CHANGELOG | 2 ++ activesupport/lib/active_support/values/time_zone.rb | 4 ++-- activesupport/test/time_zone_test.rb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 12b300d3ae..1475586cde 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *2.2.1 [RC2 or 2.2 final]* +* TimeZone: fix offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date [Geoff Buesing] + * TimeZone: Caracas GMT offset changed to -4:30 [#1361 state:resolved] [Phil Ross] * Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 335d75d218..1d87fa64b5 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -326,9 +326,9 @@ module ActiveSupport [ 14_400, "Abu Dhabi", "Muscat", "Baku", "Tbilisi", "Yerevan" ], [ 16_200, "Kabul" ], [ 18_000, "Ekaterinburg", "Islamabad", "Karachi", "Tashkent" ], - [ 19_800, "Chennai", "Kolkata", "Mumbai", "New Delhi" ], + [ 19_800, "Chennai", "Kolkata", "Mumbai", "New Delhi", "Sri Jayawardenepura" ], [ 20_700, "Kathmandu" ], - [ 21_600, "Astana", "Dhaka", "Sri Jayawardenepura", "Almaty", + [ 21_600, "Astana", "Dhaka", "Almaty", "Novosibirsk" ], [ 23_400, "Rangoon" ], [ 25_200, "Bangkok", "Hanoi", "Jakarta", "Krasnoyarsk" ], diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 515ffcf0bf..d999b9f2a8 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -51,7 +51,7 @@ class TimeZoneTest < Test::Unit::TestCase define_method("test_utc_offset_for_#{name}") do silence_warnings do # silence warnings raised by tzinfo gem - period = zone.tzinfo.period_for_utc(Time.utc(2006,1,1,0,0,0)) + period = zone.tzinfo.period_for_utc(Time.utc(2009,1,1,0,0,0)) assert_equal period.utc_offset, zone.utc_offset end end -- cgit v1.2.3 From 61e43700b85de753b6254893d5365e04d3465b9a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 14 Nov 2008 12:26:50 +0100 Subject: Prepare for RC2 --- activesupport/CHANGELOG | 8 +------- activesupport/lib/active_support/version.rb | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 1475586cde..3526c2e8fc 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,10 +1,4 @@ -*2.2.1 [RC2 or 2.2 final]* - -* TimeZone: fix offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date [Geoff Buesing] - -* TimeZone: Caracas GMT offset changed to -4:30 [#1361 state:resolved] [Phil Ross] - -* Added render :js for people who want to render inline JavaScript replies without using RJS [DHH] +*2.2.1 [RC2] (November 14th, 2008)* * Fixed the option merging in Array#to_xml #1126 [Rudolf Gavlas] diff --git a/activesupport/lib/active_support/version.rb b/activesupport/lib/active_support/version.rb index 8f5395fca6..6631f233f1 100644 --- a/activesupport/lib/active_support/version.rb +++ b/activesupport/lib/active_support/version.rb @@ -2,7 +2,7 @@ module ActiveSupport module VERSION #:nodoc: MAJOR = 2 MINOR = 2 - TINY = 0 + TINY = 1 STRING = [MAJOR, MINOR, TINY].join('.') end -- cgit v1.2.3 From 065cc202ce9f292501faa94be0be9aa805fc75db Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 14 Nov 2008 16:09:53 +0100 Subject: Missing changelog for memcache-client changes --- activesupport/CHANGELOG | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 3526c2e8fc..2b0b296842 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *2.2.1 [RC2] (November 14th, 2008)* +* Increment the version of our altered memcache-client to prevent confusion caused when the 1.5.0 gem is installed. + * Fixed the option merging in Array#to_xml #1126 [Rudolf Gavlas] * Make I18n::Backend::Simple reload its translations in development mode [DHH/Sven Fuchs] -- cgit v1.2.3 From e6b33a83376462619832fc51fb18929d4fc131db Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Nov 2008 11:05:44 +0100 Subject: =?UTF-8?q?Added=20lambda=20merging=20to=20OptionMerger=20(especia?= =?UTF-8?q?lly=20useful=20with=20named=5Fscope=20and=20with=5Foptions)=20[?= =?UTF-8?q?#740=20state:commited]=20(Pawe=C5=82=20Kondzior)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- activesupport/CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 2b0b296842..ee285f3ecb 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,3 +1,8 @@ +*2.3.0/3.0* + +* Added lambda merging to OptionMerger (especially useful with named_scope and with_options) #740 [Paweł Kondzior] + + *2.2.1 [RC2] (November 14th, 2008)* * Increment the version of our altered memcache-client to prevent confusion caused when the 1.5.0 gem is installed. -- cgit v1.2.3 From 9eaa0a3449595d07fe2ada5c4c93ec226622147c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Nov 2008 16:48:14 +0100 Subject: =?UTF-8?q?Added=20lambda=20merging=20to=20OptionMerger=20(especia?= =?UTF-8?q?lly=20useful=20with=20named=5Fscope=20and=20with=5Foptions)=20[?= =?UTF-8?q?#740=20state:committed]=20(Pawe=C5=82=20Kondzior)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- activesupport/lib/active_support/option_merger.rb | 8 +++++++- activesupport/test/option_merger_test.rb | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/option_merger.rb b/activesupport/lib/active_support/option_merger.rb index b563b093ed..63662b75c7 100644 --- a/activesupport/lib/active_support/option_merger.rb +++ b/activesupport/lib/active_support/option_merger.rb @@ -10,7 +10,13 @@ module ActiveSupport private def method_missing(method, *arguments, &block) - arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup) + if arguments.last.is_a?(Proc) + proc = arguments.pop + arguments << lambda { |*args| @options.deep_merge(proc.call(*args)) } + else + arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup) + end + @context.__send__(method, *arguments, &block) end end diff --git a/activesupport/test/option_merger_test.rb b/activesupport/test/option_merger_test.rb index 0d72314880..f26d61617d 100644 --- a/activesupport/test/option_merger_test.rb +++ b/activesupport/test/option_merger_test.rb @@ -64,6 +64,14 @@ class OptionMergerTest < Test::Unit::TestCase end end end + + def test_nested_method_with_options_using_lamdba + local_lamdba = lambda { { :lambda => true } } + with_options(@options) do |o| + assert_equal @options.merge(local_lamdba.call), + o.method_with_options(local_lamdba).call + end + end # Needed when counting objects with the ObjectSpace def test_option_merger_class_method -- cgit v1.2.3 From 31be959de746da0b704684e858d1ca69dbf6bf7f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Nov 2008 16:49:20 +0100 Subject: Wrong reference --- activesupport/CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index ee285f3ecb..ded72be2f2 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,6 +1,6 @@ *2.3.0/3.0* -* Added lambda merging to OptionMerger (especially useful with named_scope and with_options) #740 [Paweł Kondzior] +* Added lambda merging to OptionMerger (especially useful with named_scope and with_options) #726 [Paweł Kondzior] *2.2.1 [RC2] (November 14th, 2008)* -- cgit v1.2.3