Skip to content

Commit

Permalink
Changing to use autoload for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmal committed Jan 30, 2010
1 parent 172ba37 commit c716b76
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@
*.*~
.rakeTasks
.idea
*.log
19 changes: 10 additions & 9 deletions lib/rconfig.rb
Expand Up @@ -23,18 +23,19 @@

$:.unshift File.dirname(__FILE__)

require 'socket'
require 'yaml'
require 'rubygems'
require 'active_support'
require 'active_support/core_ext'
require 'active_support/core_ext/hash/conversions'
require 'active_support/core_ext/hash/indifferent_access'

require 'rconfig/core_ext/hash'
autoload :Socket, 'socket'
autoload :YAML, 'yaml'

autoload :Hash, 'active_support/core_ext/hash/conversions'
autoload :HashWithIndifferentAccess, 'active_support/core_ext/hash/indifferent_access'

autoload :Hash, 'rconfig/core_ext/hash'
autoload :ConfigHash, 'rconfig/config_hash'
autoload :PropertiesFileParser, 'rconfig/properties_file_parser'

require 'rconfig/core_ext/object'
require 'rconfig/config_hash'
require 'rconfig/properties_file_parser'
require 'rconfig/exceptions'
require 'rconfig/constants'
require 'rconfig/class_variables'
Expand Down

0 comments on commit c716b76

Please sign in to comment.