aboutsummaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-10-10 11:00:18 +0200
committerintrigeri <intrigeri@boum.org>2010-10-10 11:00:18 +0200
commitd50104ce10d7709c9c21f475eb6241136f937ad8 (patch)
tree50f850ca3179058b6ece6a1e9d9a3a95f7452e5d /lib/puppet
parent7b7fe9497ab2d465fa5ce139dda8ce6ae860e0dc (diff)
downloadpuppet-apt-d50104ce10d7709c9c21f475eb6241136f937ad8.tar.gz
puppet-apt-d50104ce10d7709c9c21f475eb6241136f937ad8.tar.bz2
Fix functions declaration and filenames.
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/functions/debian_nextcodename.rb11
-rw-r--r--lib/puppet/parser/functions/debian_nextrelease.rb11
-rw-r--r--lib/puppet/parser/functions/debian_release.rb15
-rw-r--r--lib/puppet/parser/functions/nextcodename.rb10
-rw-r--r--lib/puppet/parser/functions/nextrelease.rb10
5 files changed, 30 insertions, 27 deletions
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
diff --git a/lib/puppet/parser/functions/debian_nextrelease.rb b/lib/puppet/parser/functions/debian_nextrelease.rb
new file mode 100644
index 0000000..62e3234
--- /dev/null
+++ b/lib/puppet/parser/functions/debian_nextrelease.rb
@@ -0,0 +1,11 @@
+module Puppet::Parser::Functions
+ newfunction(:debian_nextrelease, :type => :rvalue) do |args|
+ result = case #{args[0]}
+ when 'oldstable' then 'stable'
+ when 'stable' then 'testing'
+ when 'testing' then 'unstable'
+ when 'unstable' then 'experimental'
+ end
+ return result
+ end
+end
diff --git a/lib/puppet/parser/functions/debian_release.rb b/lib/puppet/parser/functions/debian_release.rb
index ef30484..ec46601 100644
--- a/lib/puppet/parser/functions/debian_release.rb
+++ b/lib/puppet/parser/functions/debian_release.rb
@@ -1,11 +1,12 @@
module Puppet::Parser::Functions
newfunction(:debian_release, :type => :rvalue) do |args|
- case #{args[0]} {
- etch: { 'oldstable' }
- lenny: { 'stable' }
- squeeze: { 'testing' }
- sid: { 'unstable' }
- experimental: { 'experimental' }
- }
+ result = case #{args[0]}
+ when 'etch' then 'oldstable'
+ when 'lenny' then 'stable'
+ when 'squeeze' then 'testing'
+ when 'sid' then 'unstable'
+ when 'experimental' then 'experimental'
+ end
+ return result
end
end
diff --git a/lib/puppet/parser/functions/nextcodename.rb b/lib/puppet/parser/functions/nextcodename.rb
deleted file mode 100644
index 3dd592b..0000000
--- a/lib/puppet/parser/functions/nextcodename.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module Puppet::Parser::Functions
- newfunction(:debian_nextcodename, :type => :rvalue) do |args|
- case #{args[0]} {
- etch: { 'lenny' }
- lenny: { 'squeeze' }
- squeeze: { 'sid' }
- sid: { 'experimental' }
- }
- end
-end
diff --git a/lib/puppet/parser/functions/nextrelease.rb b/lib/puppet/parser/functions/nextrelease.rb
deleted file mode 100644
index 4449121..0000000
--- a/lib/puppet/parser/functions/nextrelease.rb
+++ /dev/null
@@ -1,10 +0,0 @@
-module Puppet::Parser::Functions
- newfunction(:debian_nextrelease, :type => :rvalue) do |args|
- case #{args[0]} {
- oldstable: { 'stable' }
- stable: { 'testing' }
- testing: { 'unstable' }
- unstable: { 'experimental' }
- }
- end
-end