Signed-off-by: Marc Fournier <[email protected]>
---
lib/facter/util/manufacturer.rb | 2 +-
spec/unit/util/manufacturer.rb | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/facter/util/manufacturer.rb b/lib/facter/util/manufacturer.rb
index 61d617a..b781e12 100644
--- a/lib/facter/util/manufacturer.rb
+++ b/lib/facter/util/manufacturer.rb
@@ -35,7 +35,7 @@ module Facter::Manufacturer
v.each do |v2|
v2.each_pair do |value,facterkey|
output.split(splitstr).each do |line|
- if line =~ /#{key}/ and ( line =~ /#{value} 0x\d+
\(([-\w].*)\)\n*./ or line =~ /#{value} ([-\w].*)\n*./ )
+ if line =~ /#{key}/ and ( line =~ /#{value} 0x\d+
\(([-\w].*)\)\n*/ or line =~ /#{value} ([-\w].*)\n*/ )
result = $1.strip
Facter.add(facterkey) do
confine :kernel => [ :linux, :freebsd,
:netbsd, :sunos ]
diff --git a/spec/unit/util/manufacturer.rb b/spec/unit/util/manufacturer.rb
index f9ec81f..74660f7 100644
--- a/spec/unit/util/manufacturer.rb
+++ b/spec/unit/util/manufacturer.rb
@@ -33,7 +33,7 @@ Physical Memory Array
Error Correction Type: None
Maximum Capacity: 4 GB
Error Information Handle: Not Provided
- Number Of Devices: 2
+ Number Of Devices: 123
Handle 0x001F
DMI type 127, 4 bytes.
@@ -43,7 +43,7 @@ Handle 0x001F
Facter.fact(:kernel).stubs(:value).returns("Linux")
query = { 'Physical Memory Array' => [ { 'Number Of Devices:' =>
'ramslots'}]}
Facter::Manufacturer.dmi_find_system_info(query)
- Facter.value(:ramslots).should == "2"
+ Facter.value(:ramslots).should == "123"
end
it "should match the key in the defined section and not the first one
found" do
--
1.7.0
--
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.