Skip to content

Commit

Permalink
Remove Faces API call.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Dan Bode committed Aug 11, 2011
1 parent 6d6c990 commit f50fc9c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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)

Expand All @@ -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
Expand Down

0 comments on commit f50fc9c

Please sign in to comment.