2010/1/18 Luke Kanies <l...@reductivelabs.com>:
> On Jan 17, 2010, at 9:03 AM, Paul Nasrat wrote:
>
>> This adds a test to ensure we are not prematurely splitting on Handle
>>
>> Signed-off-by: Paul Nasrat <pnas...@googlemail.com>
>> ---
>> lib/facter/util/manufacturer.rb |    2 +-
>> spec/unit/util/manufacturer.rb  |   22 ++++++++++++++++++++++
>> 2 files changed, 23 insertions(+), 1 deletions(-)
>>
>> diff --git a/lib/facter/util/manufacturer.rb
>> b/lib/facter/util/manufacturer.rb
>> index d015226..baf24bc 100644
>> --- a/lib/facter/util/manufacturer.rb
>> +++ b/lib/facter/util/manufacturer.rb
>> @@ -28,7 +28,7 @@ module Facter::Manufacturer
>>    end
>>
>>    def self.dmi_find_system_info(name)
>> -        splitstr=  Facter.value(:kernel) ==  'SunOS' ? "ID    SIZE TYPE"
>> : "Handle"
>> +        splitstr=  Facter.value(:kernel) ==  'SunOS' ? "ID    SIZE TYPE"
>> : "/^Handle/"
>
> There's probably just not enough context in this patch, but is that really a
> quoted regex?

Yes, and that was the patch supplied in the bug, this whole area needs
revisiting. I figured it's better to start adding tests for the parser
along with the fix and then get to a point where it's better
abstracted rather than get into a rabbit-hole of stuff. The whole pass
a nested dict with regex's into the code is smelly but for 1.5.8 I'd
rather just fix the corner case.

Paul
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.


Reply via email to