[facter] Only run rspec checks on Fedora >= 17

Todd Zullinger tmz at fedoraproject.org
Wed Feb 15 19:55:54 UTC 2012


commit 472463349b4a06abe99656d9f9609d941c0fc8fe
Author: Todd Zullinger <tmz at pobox.com>
Date:   Wed Feb 15 14:22:43 2012 -0500

    Only run rspec checks on Fedora >= 17
    
    Older releases fail with:
    
    undefined method `unstub' for #<Mocha::ClassMethods::AnyInstance:0x7fe0dcca8388>
    
    This may be due to an older version of mocha, but isn't something I'm
    going to track down today.

 facter.spec |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/facter.spec b/facter.spec
index 5ca74c8..1e1e410 100644
--- a/facter.spec
+++ b/facter.spec
@@ -1,17 +1,18 @@
 # F-17 and above have ruby-1.9.x, and place libs in a different location
+# The checks also fail on older releases, due to an older mocha gem, it appears
 %if 0%{?fedora} >= 17
+%global enable_check    1
 %global facter_libdir   %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]')
 %else
+%global enable_check    0
 %global facter_libdir   %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')
 %endif
 
-%global enable_check    0%{?fedora}
-
 %global ruby_version    %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')
 
 Name:           facter
 Version:        1.6.5
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Ruby module for collecting simple facts about a host operating system
 
 Group:          System Environment/Base
@@ -83,6 +84,9 @@ rspec spec
 
 
 %changelog
+* Wed Feb 15 2012 Todd Zullinger <tmz at pobox.com> - 1.6.5-4
+- Only run rspec checks on Fedora >= 17 
+
 * Mon Feb 13 2012 Todd Zullinger <tmz at pobox.com> - 1.6.5-3
 - Make spec file work for EPEL and Fedora
 - Drop BuildArch: noarch and make dmidecode/pciutils deps arch-specific


More information about the scm-commits mailing list