Skip to content

Commit

Permalink
Remove dependency on stdlib4
Browse files Browse the repository at this point in the history
This removes the backwards incompatible change between 3.0.x and 3.1.x.
  • Loading branch information
Morgan Haskel committed Sep 5, 2014
1 parent 7780657 commit e0dfc93
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions lib/puppet/parser/functions/ntp_dirname.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module Puppet::Parser::Functions
newfunction(:ntp_dirname, :type => :rvalue, :doc => <<-EOS
Returns the dirname of a path.
EOS
) do |arguments|

raise(Puppet::ParseError, "ntp_dirname(): Wrong number of arguments " +
"given (#{arguments.size} for 1)") if arguments.size < 1

path = arguments[0]
return File.dirname(path)
end
end

# vim: set ts=2 sw=2 et :
2 changes: 1 addition & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class ntp::config inherits ntp {

if $keys_enable {
$directory = dirname($keys_file)
$directory = ntp_dirname($keys_file)
file { $directory:
ensure => directory,
owner => 0,
Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "Apache Version 2.0",
"source": "git://github.com/puppetlabs/puppetlabs-ntp",
"project_page": "http://github.com/puppetlabs/puppetlabs-ntp",
"issues_url": "https://github.com/puppetlabs/puppetlabs-ntp/issues",
"issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
Expand Down Expand Up @@ -70,7 +70,7 @@
"requirements": [
{
"name": "pe",
"version_requirement": "3.3.x"
"version_requirement": "3.x"
},
{
"name": "puppet",
Expand All @@ -81,7 +81,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.0.0"
"version_requirement": ">= 3.2.0 < 5.0.0"
}
]
}

0 comments on commit e0dfc93

Please sign in to comment.