It might just be worth testing for the directory.  It's not like it's  
expensive.

On Jun 12, 2009, at 8:20 AM, James Turnbull wrote:

>
>
> Signed-off-by: James Turnbull <[email protected]>
> ---
> lib/puppet/feature/rails.rb |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/puppet/feature/rails.rb b/lib/puppet/feature/rails.rb
> index 597b028..aec364b 100644
> --- a/lib/puppet/feature/rails.rb
> +++ b/lib/puppet/feature/rails.rb
> @@ -9,7 +9,7 @@ Puppet.features.add(:rails) do
>     begin
>         require 'active_record'
>     rescue LoadError => detail
> -        if Facter["operatingsystem"].value == "Debian" and  
> FileTest.exists?("/usr/share/rails")
> +        if %w{Debian Ubuntu}.include? 
> (Facter.value(:operatingsystem)) and FileTest.exists?("/usr/share/ 
> rails")
>             count = 0
>             Dir.entries("/usr/share/rails").each do |dir|
>                 libdir = File.join("/usr/share/rails", dir, "lib")
> -- 
> 1.6.0.6
>
>
> >


-- 
The cure for writer's cramp is writer's block.
     -- Inigo DeLeon
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


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