From 2aa9f2fe390c15806cce5532afed2fc7ecf51b8b Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Thu, 26 May 2011 14:54:11 -0700 Subject: (#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. 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 --- lib/puppet/application/faces.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/puppet/application') diff --git a/lib/puppet/application/faces.rb b/lib/puppet/application/faces.rb index e7fce66b1..3145da821 100644 --- a/lib/puppet/application/faces.rb +++ b/lib/puppet/application/faces.rb @@ -66,7 +66,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License str = "#{name}:\n" if arguments.include?("terminuses") begin - terms = terminus_classes(name.to_sym) + terms = Puppet::Indirector::Face.terminus_classes(name.to_sym) str << "\tTerminuses: #{terms.join(", ")}\n" rescue => detail puts detail.backtrace if Puppet[:trace] @@ -107,10 +107,6 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License Puppet::Face.faces end - def terminus_classes(indirection) - Puppet::Indirector::Terminus.terminus_classes(indirection).collect { |t| t.to_s }.sort - end - def actions(indirection) return [] unless face = Puppet::Face[indirection, '0.0.1'] face.load_actions -- cgit