summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-05-26 14:54:11 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-26 16:08:32 -0700
commit2aa9f2fe390c15806cce5532afed2fc7ecf51b8b (patch)
treed6cd2cac914673d528c9dc37ef89a313437d7494 /lib/puppet/indirector
parent9447cb957b8c01ba7d368baebc1061c3dbfc9399 (diff)
downloadpuppet-2aa9f2fe390c15806cce5532afed2fc7ecf51b8b.tar.gz
puppet-2aa9f2fe390c15806cce5532afed2fc7ecf51b8b.tar.xz
puppet-2aa9f2fe390c15806cce5532afed2fc7ecf51b8b.zip
(#7690) Don't blow up when listing terminuses available for faces
Previously, in order to list the available terminuses for an indirected face we loaded all the the terminuses in order to list them. This meant that if a terminus like active_record didn't have the dependencies it needed, the documentation would raise errors and not list terminuses. <Puppet::Error: Could not autoload filename uninitialized constant Object::ActiveRecord> Now we just list the terminuses available in the load path without trying to load them. The terminus will still raise an error if you try to use it without its dependencies being met. Paired-with: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'lib/puppet/indirector')
-rw-r--r--lib/puppet/indirector/terminus.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/puppet/indirector/terminus.rb b/lib/puppet/indirector/terminus.rb
index 4ebd0d004..d488869d1 100644
--- a/lib/puppet/indirector/terminus.rb
+++ b/lib/puppet/indirector/terminus.rb
@@ -111,12 +111,9 @@ class Puppet::Indirector::Terminus
# Return all terminus classes for a given indirection.
def terminus_classes(indirection_name)
setup_instance_loading indirection_name
-
- # Load them all.
- instance_loader(indirection_name).loadall
-
- # And return the list of names.
- loaded_instances(indirection_name)
+ instance_loader(indirection_name).files_to_load.map do |file|
+ File.basename(file).chomp(".rb").intern
+ end
end
private