diff options
author | Luke Kanies <luke@madstop.com> | 2007-09-10 17:58:23 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-09-10 17:58:23 -0500 |
commit | bb69a1f08a6b0ba37222eeddf28ffbff657283e7 (patch) | |
tree | 4e8f3a6d710445a218f87b0ab712f63d7b292914 | |
parent | 81149333c360d6f10e6c1cf58f43b6e18c0a55dc (diff) | |
download | puppet-bb69a1f08a6b0ba37222eeddf28ffbff657283e7.tar.gz puppet-bb69a1f08a6b0ba37222eeddf28ffbff657283e7.tar.xz puppet-bb69a1f08a6b0ba37222eeddf28ffbff657283e7.zip |
Renaming the instance loader method to "instance_load". It was previously autoload, which could class with Kernel.autoload.
-rw-r--r-- | lib/puppet/network/handler/node.rb | 2 | ||||
-rwxr-xr-x | lib/puppet/network/handler/report.rb | 2 | ||||
-rwxr-xr-x | lib/puppet/util/instance_loader.rb | 2 | ||||
-rw-r--r-- | lib/puppet/util/reference.rb | 2 | ||||
-rwxr-xr-x | test/util/instance_loader.rb | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/puppet/network/handler/node.rb b/lib/puppet/network/handler/node.rb index f93087a2f..c6ccc2eb6 100644 --- a/lib/puppet/network/handler/node.rb +++ b/lib/puppet/network/handler/node.rb @@ -73,7 +73,7 @@ class Puppet::Network::Handler::Node < Puppet::Network::Handler } # Set up autoloading and retrieving of reports. - autoload :node_source, 'puppet/node_source' + instance_load :node_source, 'puppet/node_source' attr_reader :source diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb index 8a82f5a58..81aee6a3c 100755 --- a/lib/puppet/network/handler/report.rb +++ b/lib/puppet/network/handler/report.rb @@ -26,7 +26,7 @@ class Puppet::Network::Handler } # Set up autoloading and retrieving of reports. - autoload :report, 'puppet/reports' + instance_load :report, 'puppet/reports' class << self attr_reader :hooks diff --git a/lib/puppet/util/instance_loader.rb b/lib/puppet/util/instance_loader.rb index 3613b4e39..1a64c9c69 100755 --- a/lib/puppet/util/instance_loader.rb +++ b/lib/puppet/util/instance_loader.rb @@ -6,7 +6,7 @@ require 'puppet/util' module Puppet::Util::InstanceLoader include Puppet::Util # Define a new type of autoloading. - def autoload(type, path, options = {}) + def instance_load(type, path, options = {}) @autoloaders ||= {} @instances ||= {} type = symbolize(type) diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb index ce3d6550c..3446aeb06 100644 --- a/lib/puppet/util/reference.rb +++ b/lib/puppet/util/reference.rb @@ -7,7 +7,7 @@ class Puppet::Util::Reference extend Puppet::Util::InstanceLoader - autoload(:reference, 'puppet/reference') + instance_load(:reference, 'puppet/reference') def self.footer "\n\n----------------\n\n*This page autogenerated on %s*\n" % Time.now diff --git a/test/util/instance_loader.rb b/test/util/instance_loader.rb index fa08d1bd6..24e8c9cab 100755 --- a/test/util/instance_loader.rb +++ b/test/util/instance_loader.rb @@ -19,15 +19,15 @@ class TestInstanceloader < Test::Unit::TestCase end end - assert_nothing_raised("Could not create autoloader") do - @loader.autoload(:stuff, "puppet/stuff") + assert_nothing_raised("Could not create instance loader") do + @loader.instance_load(:stuff, "puppet/stuff") end end # Make sure we correctly create our autoload instance. This covers the basics. def test_autoload # Make sure we can retrieve the loader - assert_instance_of(Puppet::Util::Autoload, @loader.instance_loader(:stuff), "Could not get autoloader") + assert_instance_of(Puppet::Util::Autoload, @loader.instance_loader(:stuff), "Could not get instance loader") # Make sure we can get the instance hash assert(@loader.instance_hash(:stuff), "Could not get instance hash") @@ -46,7 +46,7 @@ class TestInstanceloader < Test::Unit::TestCase assert_equal("a value", @loader.loaded_instance(:stuff, :testing), "Got incorrect loaded instance") end - def test_autoloading + def test_instance_loading end end |