From d50104ce10d7709c9c21f475eb6241136f937ad8 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sun, 10 Oct 2010 11:00:18 +0200 Subject: Fix functions declaration and filenames. --- lib/puppet/parser/functions/debian_nextcodename.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/puppet/parser/functions/debian_nextcodename.rb (limited to 'lib/puppet/parser/functions/debian_nextcodename.rb') diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb new file mode 100644 index 0000000..37322a2 --- /dev/null +++ b/lib/puppet/parser/functions/debian_nextcodename.rb @@ -0,0 +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' + end + return result + end +end -- cgit v1.2.3 From b4e24ecc0699687adec30bd38d78b34423eda1a1 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Sun, 10 Oct 2010 12:05:26 +0200 Subject: Fix functions return values. --- lib/puppet/parser/functions/debian_nextcodename.rb | 12 ++++++------ lib/puppet/parser/functions/debian_nextrelease.rb | 4 ++-- lib/puppet/parser/functions/debian_release.rb | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'lib/puppet/parser/functions/debian_nextcodename.rb') diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb index 37322a2..6bc4b6b 100644 --- a/lib/puppet/parser/functions/debian_nextcodename.rb +++ b/lib/puppet/parser/functions/debian_nextcodename.rb @@ -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 diff --git a/lib/puppet/parser/functions/debian_nextrelease.rb b/lib/puppet/parser/functions/debian_nextrelease.rb index 62e3234..76c3e0d 100644 --- a/lib/puppet/parser/functions/debian_nextrelease.rb +++ b/lib/puppet/parser/functions/debian_nextrelease.rb @@ -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 diff --git a/lib/puppet/parser/functions/debian_release.rb b/lib/puppet/parser/functions/debian_release.rb index ec46601..64feb66 100644 --- a/lib/puppet/parser/functions/debian_release.rb +++ b/lib/puppet/parser/functions/debian_release.rb @@ -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 -- cgit v1.2.3 From f11e821f0ad7e52be19163b62f18930c90fffed5 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 7 Feb 2011 11:28:29 +0100 Subject: debian_nextcodename: take into account Squeeze was released. --- lib/puppet/parser/functions/debian_nextcodename.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions/debian_nextcodename.rb') diff --git a/lib/puppet/parser/functions/debian_nextcodename.rb b/lib/puppet/parser/functions/debian_nextcodename.rb index 6bc4b6b..f57dd2a 100644 --- a/lib/puppet/parser/functions/debian_nextcodename.rb +++ b/lib/puppet/parser/functions/debian_nextcodename.rb @@ -3,7 +3,8 @@ module Puppet::Parser::Functions case args[0] when "etch" then "lenny" when "lenny" then "squeeze" - when "squeeze" then "sid" + when "squeeze" then "wheezy" + when "wheezy" then "sid" when "sid" then "experimental" else "sid" end -- cgit v1.2.3