aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:41:06 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-22 16:42:14 -0700
commitf5d720fb96f2e085acc4ed17f63272c4d38e567e (patch)
tree01d83252d6fe6f090668a860a7f22912c657a600
parentab321268f86d9013cbd4ecd0b5f46e7b05ec55a9 (diff)
downloadrails-f5d720fb96f2e085acc4ed17f63272c4d38e567e.tar.gz
rails-f5d720fb96f2e085acc4ed17f63272c4d38e567e.tar.bz2
rails-f5d720fb96f2e085acc4ed17f63272c4d38e567e.zip
Opt in to Dependencies
-rw-r--r--actionpack/lib/action_view/template/template.rb1
-rwxr-xr-xactiverecord/lib/active_record/base.rb1
-rw-r--r--activesupport/lib/active_support.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/class/delegating_attributes.rb2
-rw-r--r--activesupport/lib/active_support/dependencies.rb1
-rw-r--r--activesupport/lib/active_support/json.rb2
-rw-r--r--activesupport/lib/active_support/testing/deprecation.rb18
-rw-r--r--activesupport/test/core_ext/module/attribute_aliasing_test.rb1
-rw-r--r--activesupport/test/dependencies_test.rb1
-rw-r--r--railties/lib/rails/plugin.rb1
10 files changed, 19 insertions, 10 deletions
diff --git a/actionpack/lib/action_view/template/template.rb b/actionpack/lib/action_view/template/template.rb
index 0d2f201458..b6967a2013 100644
--- a/actionpack/lib/action_view/template/template.rb
+++ b/actionpack/lib/action_view/template/template.rb
@@ -1,3 +1,4 @@
+require 'set'
require "action_view/template/path"
module ActionView #:nodoc:
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 251d5000f5..97c36a675d 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1,5 +1,6 @@
require 'yaml'
require 'set'
+require 'active_support/dependencies'
module ActiveRecord #:nodoc:
# Generic Active Record exception class.
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index 84bf372163..f240cbf5e4 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -51,7 +51,6 @@ module ActiveSupport
end
require 'active_support/vendor'
-require 'active_support/dependencies'
require 'active_support/json'
I18n.load_path << "#{File.dirname(__FILE__)}/active_support/locale/en.yml"
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
index da798c67e7..b0784d8416 100644
--- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
+++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/blank'
+
class Class
def superclass_delegating_reader(*names)
class_name_to_stop_searching_on = superclass.name.blank? ? "Object" : superclass.name
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 41b7e00c0c..1804c14618 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -1,4 +1,5 @@
require 'set'
+require 'thread'
require 'active_support/inflector'
require 'active_support/core_ext/name_error'
require 'active_support/core_ext/object/blank'
diff --git a/activesupport/lib/active_support/json.rb b/activesupport/lib/active_support/json.rb
index 2bdb4a7b11..91f19f8a70 100644
--- a/activesupport/lib/active_support/json.rb
+++ b/activesupport/lib/active_support/json.rb
@@ -1,3 +1,5 @@
+require 'active_support/core_ext/module/attribute_accessors'
+
module ActiveSupport
# If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format.
mattr_accessor :use_standard_json_time_format
diff --git a/activesupport/lib/active_support/testing/deprecation.rb b/activesupport/lib/active_support/testing/deprecation.rb
index e9220605bd..0135185a47 100644
--- a/activesupport/lib/active_support/testing/deprecation.rb
+++ b/activesupport/lib/active_support/testing/deprecation.rb
@@ -1,3 +1,5 @@
+require 'active_support/deprecation'
+
module ActiveSupport
module Testing
module Deprecation #:nodoc:
@@ -35,21 +37,19 @@ end
begin
require 'test/unit/error'
-
+rescue LoadError
+ # Using miniunit, ignore.
+else
module Test
module Unit
- class Error # :nodoc:
+ class Error #:nodoc:
# Silence warnings when reporting test errors.
def message_with_silenced_deprecation
- ActiveSupport::Deprecation.silence do
- message_without_silenced_deprecation
- end
+ ActiveSupport::Deprecation.silence { message_without_silenced_deprecation }
end
-
- alias_method_chain :message, :silenced_deprecation
+ alias_method :message_without_silenced_deprecation, :message
+ alias_method :message, :message_with_silenced_deprecation
end
end
end
-rescue LoadError
- # Using miniunit, ignore.
end
diff --git a/activesupport/test/core_ext/module/attribute_aliasing_test.rb b/activesupport/test/core_ext/module/attribute_aliasing_test.rb
index 570ac3b8d5..f17d031662 100644
--- a/activesupport/test/core_ext/module/attribute_aliasing_test.rb
+++ b/activesupport/test/core_ext/module/attribute_aliasing_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/module/aliasing'
module AttributeAliasing
class Content
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index a21f09403f..01c1d67f4c 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -1,5 +1,6 @@
require 'abstract_unit'
require 'pp'
+require 'active_support/dependencies'
module ModuleWithMissing
mattr_accessor :missing_count
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb
index e66166306a..dd840ef058 100644
--- a/railties/lib/rails/plugin.rb
+++ b/railties/lib/rails/plugin.rb
@@ -1,4 +1,5 @@
require 'active_support/core_ext/kernel/reporting'
+require 'active_support/dependencies'
module Rails
# The Plugin class should be an object which provides the following methods: