[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 51bcebe38cab6088c901f1006339bbe40a36d161
Marc Fournier
marc.fournier at camptocamp.com
Wed Aug 18 05:55:49 UTC 2010
The following commit has been merged in the upstream branch:
commit 6c87917b23a4607bbca7fba721b211d150037920
Author: Marc Fournier <marc.fournier at camptocamp.com>
Date: Fri May 7 09:05:56 2010 +0200
Fixed failing test introduced by previous commit
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
--
Packaging of Facter for debian
More information about the Pkg-puppet-devel
mailing list