There are tests for this file in the repo; I think it makes sense to verify this behaviour.
On Jul 23, 2009, at 8:34 AM, Nigel Kersten wrote: > > > Signed-off-by: Nigel Kersten <[email protected]> > --- > lib/facter/util/macosx.rb | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/facter/util/macosx.rb b/lib/facter/util/macosx.rb > index f5f83f3..6700abf 100644 > --- a/lib/facter/util/macosx.rb > +++ b/lib/facter/util/macosx.rb > @@ -60,8 +60,12 @@ module Facter::Util::Macosx > end > productversion = ver["macosx_productVersion"] > if not productversion.nil? > - ver["macosx_productversion_major"] = > productversion.scan(/(\d+\.\d+)/)[0][0] > - ver["macosx_productversion_minor"] = > productversion.scan(/(\d+)\.(\d+)\.(\d+)/)[0].last > + versions = productversion.scan(/(\d+)\.(\d+)\.*(\d*)/)[0] > + ver["macosx_productversion_major"] = > "#{versions[0]}.#{versions[1]}" > + if versions[2].empty? # 10.x should be treated as 10.x.0 > + versions[2] = "0" > + end > + ver["macosx_productversion_minor"] = versions[2] > end > ver > end > -- > 1.6.3.3 > > > > -- Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger. -- Franklin P. Jones --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
