From ab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 22 Apr 2009 16:10:49 -0700 Subject: No more free lunch --- activerecord/lib/active_record.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 2f8c5c712f..500a90d6cb 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -30,6 +30,7 @@ rescue LoadError require 'active_support' end end +require 'active_support/core/all' module ActiveRecord # TODO: Review explicit loads to see if they will automatically be handled by the initilizer. -- cgit v1.2.3 From 945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 2 May 2009 15:16:12 -0700 Subject: Check for sibling Active Support first --- activerecord/lib/active_record.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 500a90d6cb..1982ffc791 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -21,15 +21,10 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -begin - require 'active_support' -rescue LoadError - activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" - if File.directory?(activesupport_path) - $:.unshift activesupport_path - require 'active_support' - end +"#{File.dirname(__FILE__)}/../../activesupport/lib".tap do |path| + $:.unshift(path) if File.directory?(path) end +require 'active_support' require 'active_support/core/all' module ActiveRecord -- cgit v1.2.3 From d3ee8756c8b09b8524a9599926b02ededd27319c Mon Sep 17 00:00:00 2001 From: Chris Kampmeier Date: Sun, 3 May 2009 18:09:06 -0700 Subject: Don't use #tap before Active Support is available, since older versions of ruby don't have native implementations [#2603 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/lib/active_record.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 1982ffc791..06d6c87090 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -21,9 +21,8 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -"#{File.dirname(__FILE__)}/../../activesupport/lib".tap do |path| - $:.unshift(path) if File.directory?(path) -end +activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" +$:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' require 'active_support/core/all' -- cgit v1.2.3 From a7ccc7c79fa69cea3b7d19bcaa4df3c2932238d8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 12 May 2009 17:58:37 -0700 Subject: Remove support for deprecated validation message interpolation format --- activerecord/lib/active_record.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 06d6c87090..c9e9a84ce7 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -75,5 +75,4 @@ module ActiveRecord end end -require 'active_record/i18n_interpolation_deprecation' I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' -- cgit v1.2.3 From e8550ee0329586b32de425e905c7af7e65bc78a8 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 13 May 2009 01:10:37 -0700 Subject: Cherry-pick core extensions --- activerecord/lib/active_record.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index c9e9a84ce7..2d98239052 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -24,7 +24,6 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' -require 'active_support/core/all' module ActiveRecord # TODO: Review explicit loads to see if they will automatically be handled by the initilizer. -- cgit v1.2.3 From 8e6a18d8672f7efe6ef79b49185e4a6a23e4e547 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Sat, 16 May 2009 12:09:25 -0700 Subject: Get AR CI passing again by requiring the entire core_ext Note that this includes Time and Date; we should really figure out what parts of core_ext are really required for AR and require just those. --- activerecord/lib/active_record.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 2d98239052..b5c17cb23b 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -25,6 +25,9 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' +# TODO: Figure out what parts of AS are *actually* required and use those +require 'active_support/core_ext' + module ActiveRecord # TODO: Review explicit loads to see if they will automatically be handled by the initilizer. def self.load_all! -- cgit v1.2.3 From 37453e11e9c071f9bdec47b073939fd34402127d Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 18 May 2009 11:55:06 -0700 Subject: Revert "Get AR CI passing again by requiring the entire core_ext" This reverts commit 8e6a18d8672f7efe6ef79b49185e4a6a23e4e547. --- activerecord/lib/active_record.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index b5c17cb23b..2d98239052 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -25,9 +25,6 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' -# TODO: Figure out what parts of AS are *actually* required and use those -require 'active_support/core_ext' - module ActiveRecord # TODO: Review explicit loads to see if they will automatically be handled by the initilizer. def self.load_all! -- cgit v1.2.3