Re: [Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-25 Thread David Schmitt
On 10/25/2010 2:28 AM, Nigel Kersten wrote: I concur. I made the mistake of using booleans early on, and it would have been useful to have this made obvious before I dug a larger hole for myself. +1. Best Regards, David -- dasz.at OG Tel: +43 (0)664 2602670 Web:

Re: [Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-24 Thread Markus Roberts
Fix is_virtual fact to return strings rather than bools. Wouldn't a better way to achieve this be this patch? diff --git a/lib/facter/util/fact.rb b/lib/facter/util/fact.rb index e78ed97..e01833b 100644 --- a/lib/facter/util/fact.rb +++ b/lib/facter/util/fact.rb @@ -77,6 +77,9 @@ class

Re: [Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-24 Thread Nigel Kersten
On Sun, Oct 24, 2010 at 5:13 PM, Daniel Pittman dan...@rimspace.net wrote: Markus Roberts mar...@puppetlabs.com writes: Fix is_virtual fact to return strings rather than bools. Wouldn't a better way to achieve this be this patch? diff --git a/lib/facter/util/fact.rb

Re: [Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-23 Thread Daniel Pittman
Paul Nasrat pnas...@gmail.com writes: Fix is_virtual fact to return strings rather than bools. Wouldn't a better way to achieve this be this patch? diff --git a/lib/facter/util/fact.rb b/lib/facter/util/fact.rb index e78ed97..e01833b 100644 --- a/lib/facter/util/fact.rb +++

[Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-07 Thread Paul Nasrat
Fix is_virtual fact to return strings rather than bools. Signed-off-by: Paul Nasrat pnas...@googlemail.com --- lib/facter/virtual.rb |4 ++-- spec/unit/virtual.rb | 12 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/facter/virtual.rb

Re: [Puppet-dev] [PATCH/facter 1/1] Issue #4889 Fact values should all be strings

2010-10-07 Thread Markus Roberts
I'd suggest defining: Virtual_systems = %w{ xenu openvzve vmware kvm vserver jail } and then writing     setcode do         Virtual_systems.include?(Facter.value(:virtual)).to_s  end or setcode do #{Virtual_systems.include? Facter.value(:virtual)} end instead of