]> gitweb.fluxo.info Git - puppet-apt.git/commitdiff
Fix functions return values.
authorintrigeri <intrigeri@boum.org>
Sun, 10 Oct 2010 10:05:26 +0000 (12:05 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 10 Oct 2010 10:05:26 +0000 (12:05 +0200)
lib/puppet/parser/functions/debian_nextcodename.rb
lib/puppet/parser/functions/debian_nextrelease.rb
lib/puppet/parser/functions/debian_release.rb

index 37322a2833e98cc35496dfce239615152f04591b..6bc4b6b9df3f1bee0dbd1f4bf0972f8ccb26fa4f 100644 (file)
@@ -1,11 +1,11 @@
 module Puppet::Parser::Functions
   newfunction(:debian_nextcodename, :type => :rvalue) do |args|
-    result = case #{args[0]}
-      when 'etch'    then 'lenny'
-      when 'lenny'   then 'squeeze'
-      when 'squeeze' then 'sid'
-      when 'sid'     then 'experimental'
+    case args[0]
+      when "etch"    then "lenny"
+      when "lenny"   then "squeeze"
+      when "squeeze" then "sid"
+      when "sid"     then "experimental"
+      else "sid"
     end
-    return result
   end
 end
index 62e3234f068e72bdc2b99d021dfdf45273396236..76c3e0d2a4a537a9b59d6bb9f4442a9911b1cfbc 100644 (file)
@@ -1,11 +1,11 @@
 module Puppet::Parser::Functions
   newfunction(:debian_nextrelease, :type => :rvalue) do |args|
-    result = case #{args[0]}
+    case args[0]
       when 'oldstable' then 'stable'
       when 'stable'    then 'testing'
       when 'testing'   then 'unstable'
       when 'unstable'  then 'experimental'
+      else 'unstable'
     end
-    return result
   end
 end
index ec4660107dce6aae810707b5946aab0bc2e10520..64feb669597cd57d3595853b9f5accd98152c93e 100644 (file)
@@ -1,12 +1,13 @@
 module Puppet::Parser::Functions
   newfunction(:debian_release, :type => :rvalue) do |args|
-    result = case #{args[0]}
+    case args[0]
       when 'etch'         then 'oldstable'
       when 'lenny'        then 'stable'
       when 'squeeze'      then 'testing'
+      when 'wheezy'       then 'testing'
       when 'sid'          then 'unstable'
       when 'experimental' then 'experimental'
+      else 'testing'
     end
-    return result
   end
 end