[Pkg-puppet-devel] [facter] 38/180: (maint) Define Util::Resolution#resolution_type

Stig Sandbeck Mathisen ssm at debian.org
Mon Jun 30 15:06:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 7b5b8492f3d47c05d778728f70a1fc9a8d221f17
Author: Adrien Thebo <git at somethingsinistral.net>
Date:   Mon Mar 31 11:47:18 2014 -0700

    (maint) Define Util::Resolution#resolution_type
    
    The resolution_type method is needed when reopening a fact definition
    with the Facter 2.0 API:
    
    Facter.define_fact(:myfact) do
      define_resolution(:myres) do
        # [...]
    
    The aggregate resolution type implemented this but Util::Resolution did
    not, which could cause errors using the new syntax. This corrects the
    omission.
---
 lib/facter/util/resolution.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb
index 0182a9a..9b3efa0 100644
--- a/lib/facter/util/resolution.rb
+++ b/lib/facter/util/resolution.rb
@@ -62,6 +62,10 @@ class Facter::Util::Resolution
     @weight = nil
   end
 
+  def resolution_type
+    :simple
+  end
+
   # Evaluate the given block in the context of this resolution. If a block has
   # already been evaluated emit a warning to that effect.
   #

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list