Skip to content
This repository
Browse code

Autoload more ActiveSupport libs

  • Loading branch information...
commit 368117c0411a636a0cbfdc33fbf679c3e9233da7 1 parent 7254d23
Joshua Peek authored November 24, 2008

Showing 1 changed file with 19 additions and 22 deletions. Show diff stats Hide diff stats

  1. 41  activesupport/lib/active_support.rb
41  activesupport/lib/active_support.rb
@@ -22,12 +22,29 @@
22 22
 #++
23 23
 
24 24
 module ActiveSupport
  25
+  def self.load_all!
  26
+    [Dependencies, Deprecation, Gzip, JSON, MessageVerifier, Multibyte, SecureRandom, TimeWithZone]
  27
+  end
  28
+
  29
+  autoload :BacktraceCleaner, 'active_support/backtrace_cleaner'
  30
+  autoload :Base64, 'active_support/base64'
  31
+  autoload :BasicObject, 'active_support/basic_object'
  32
+  autoload :BufferedLogger, 'active_support/buffered_logger'
  33
+  autoload :Cache, 'active_support/cache'
  34
+  autoload :Callbacks, 'active_support/callbacks'
  35
+  autoload :Dependencies, 'active_support/dependencies'
  36
+  autoload :Deprecation, 'active_support/deprecation'
25 37
   autoload :Duration, 'active_support/duration'
26 38
   autoload :Gzip, 'active_support/gzip'
  39
+  autoload :Inflector, 'active_support/inflector'
  40
+  autoload :JSON, 'active_support/json'
  41
+  autoload :Memoizable, 'active_support/memoizable'
27 42
   autoload :MessageVerifier, 'active_support/message_verifier'
  43
+  autoload :Multibyte, 'active_support/multibyte'
28 44
   autoload :OptionMerger, 'active_support/option_merger'
29 45
   autoload :OrderedHash, 'active_support/ordered_hash'
30 46
   autoload :OrderedOptions, 'active_support/ordered_options'
  47
+  autoload :Rescuable, 'active_support/rescuable'
31 48
   autoload :SecureRandom, 'active_support/secure_random'
32 49
   autoload :StringInquirer, 'active_support/string_inquirer'
33 50
   autoload :TimeWithZone, 'active_support/time_with_zone'
@@ -35,28 +52,8 @@ module ActiveSupport
35 52
 end
36 53
 
37 54
 require 'active_support/vendor'
38  
-require 'active_support/basic_object'
39  
-require 'active_support/inflector'
40  
-require 'active_support/callbacks'
41  
-
42 55
 require 'active_support/core_ext'
43 56
 
44  
-require 'active_support/buffered_logger'
45  
-require 'active_support/backtrace_cleaner'
46  
-
47  
-require 'active_support/cache'
48  
-
49  
-require 'active_support/dependencies'
50  
-require 'active_support/deprecation'
51  
-
52  
-require 'active_support/memoizable'
53  
-
54  
-require 'active_support/json'
55  
-
56  
-require 'active_support/multibyte'
57  
-
58  
-require 'active_support/base64'
59  
-
60  
-require 'active_support/rescuable'
61  
-
62 57
 I18n.load_path << "#{File.dirname(__FILE__)}/active_support/locale/en.yml"
  58
+
  59
+ActiveSupport.load_all!

0 notes on commit 368117c

Please sign in to comment.
Something went wrong with that request. Please try again.