From f50fc9cb87bbcedd7c133ecc0bebe11a873825d7 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Fri, 5 Aug 2011 11:44:40 -0700 Subject: [PATCH] Remove Faces API call. Previously, used the catalog face for compilation with the :use_node option. Starting in 2.7.2rc2, all faces options must be explicit, so the catalog face no longer supports the use_node option. This commit changes the call to use the indirection directly. --- lib/rspec-puppet/support.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rspec-puppet/support.rb b/lib/rspec-puppet/support.rb index ab5289a8..cccda141 100644 --- a/lib/rspec-puppet/support.rb +++ b/lib/rspec-puppet/support.rb @@ -1,5 +1,5 @@ module RSpec::Puppet - module Support + module Support def build_catalog nodename, facts_val node_obj = Puppet::Node.new(nodename) @@ -9,8 +9,7 @@ def build_catalog nodename, facts_val if Puppet::Resource::Catalog.respond_to? :find Puppet::Resource::Catalog.find(node_obj.name, :use_node => node_obj) else - require 'puppet/face' - Puppet::Face[:catalog, :current].find(node_obj.name, :use_node => node_obj) + Puppet::Resource::Catalog.indirection.find(node_obj.name, :use_node => node_obj) end end end