On 11 March 2011 00:52, James Turnbull <[email protected]> wrote:
> Thanks to James Goddard for the patch

+1

>
> Signed-off-by: James Turnbull <[email protected]>
> ---
> Local-branch: ticket/master/6679
>  lib/facter/operatingsystem.rb     |    2 ++
>  spec/unit/operatingsystem_spec.rb |   12 ++++++------
>  2 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/lib/facter/operatingsystem.rb b/lib/facter/operatingsystem.rb
> index c5a3dc1..bda8ba3 100644
> --- a/lib/facter/operatingsystem.rb
> +++ b/lib/facter/operatingsystem.rb
> @@ -36,6 +36,8 @@ Facter.add(:operatingsystem) do
>             txt = File.read("/etc/redhat-release")
>             if txt =~ /centos/i
>                 "CentOS"
> +            elsif txt =~ /scientific/i
> +                "Scientific"
>             else
>                 "RedHat"
>             end
> diff --git a/spec/unit/operatingsystem_spec.rb 
> b/spec/unit/operatingsystem_spec.rb
> index be83916..73b3649 100755
> --- a/spec/unit/operatingsystem_spec.rb
> +++ b/spec/unit/operatingsystem_spec.rb
> @@ -9,23 +9,23 @@ describe "Operating System fact" do
>     before do
>         Facter.clear
>     end
> -
> +
>     after do
>         Facter.clear
>     end
> -
> +
>     it "should default to the kernel name" do
>         Facter.fact(:kernel).stubs(:value).returns("Nutmeg")
>
>         Facter.fact(:operatingsystem).value.should == "Nutmeg"
>     end
> -
> +
>     it "should be Solaris for SunOS" do
>          Facter.fact(:kernel).stubs(:value).returns("SunOS")
> -
> +
>          Facter.fact(:operatingsystem).value.should == "Solaris"
>     end
> -
> +
>     it "should identify Oracle VM as OVS" do
>
>         Facter.fact(:kernel).stubs(:value).returns("Linux")
> @@ -33,7 +33,7 @@ describe "Operating System fact" do
>
>         FileTest.expects(:exists?).with("/etc/ovs-release").returns true
>         FileTest.expects(:exists?).with("/etc/enterprise-release").returns 
> true
> -
> +
>         Facter.fact(:operatingsystem).value.should == "OVS"
>     end
>  end
> --
> 1.7.1
>
> --
> 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.
>
>

-- 
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.

Reply via email to