summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-10-02 01:14:03 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-10-02 01:14:17 -0700
commitce9a6f97ab1784d8bd60eae8b60272c9875b1f84 (patch)
treeba2e2fe2d56b813e93133683bab006abf28d6cc5 /lib
parentc6e824ad5144957e351892a1d745a127b02f34b3 (diff)
parent8cd1540f82cbdf903c164bdbc2c7229e34a4178b (diff)
downloadpuppet-ce9a6f97ab1784d8bd60eae8b60272c9875b1f84.tar.gz
puppet-ce9a6f97ab1784d8bd60eae8b60272c9875b1f84.tar.xz
puppet-ce9a6f97ab1784d8bd60eae8b60272c9875b1f84.zip
Partial merge to 2.6.2rc1 : Merge commit '8cd1540' into next
There are merge conflicts with commits following this one.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/ast/function.rb2
-rw-r--r--lib/puppet/provider/service/freebsd.rb2
-rw-r--r--lib/puppet/type.rb6
-rwxr-xr-xlib/puppet/type/tidy.rb1
4 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/parser/ast/function.rb b/lib/puppet/parser/ast/function.rb
index 74023f631..80e6e6512 100644
--- a/lib/puppet/parser/ast/function.rb
+++ b/lib/puppet/parser/ast/function.rb
@@ -28,7 +28,7 @@ class Puppet::Parser::AST
end
# We don't need to evaluate the name, because it's plaintext
- args = @arguments.safeevaluate(scope)
+ args = @arguments.safeevaluate(scope).map { |x| x == :undef ? '' : x }
scope.send("function_#{@name}", args)
end
diff --git a/lib/puppet/provider/service/freebsd.rb b/lib/puppet/provider/service/freebsd.rb
index 10970e4da..c75c3c9ab 100644
--- a/lib/puppet/provider/service/freebsd.rb
+++ b/lib/puppet/provider/service/freebsd.rb
@@ -78,7 +78,7 @@ Puppet::Type.type(:service).provide :freebsd, :parent => :init do
# Add a new setting to the rc files
def rc_add(service, rcvar, yesno)
- append = "\n\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\""
+ append = "\# Added by Puppet\n#{rcvar}_enable=\"#{yesno}\"\n"
# First, try the one-file-per-service style
if File.exists?(@@rcconf_dir)
File.open(@@rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0644) {
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index f9aacece8..1b6e7dcd7 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -965,7 +965,7 @@ class Type
the value, and any changes already get logged."
validate do |list|
- list = Array(list)
+ list = Array(list).collect {|p| p.to_sym}
unless list == [:all]
list.each do |param|
next if @resource.class.validattr?(param)
@@ -990,8 +990,8 @@ class Type
end
def properties_to_audit(list)
- if list == :all
- list = all_properties if list == :all
+ if !list.kind_of?(Array) && list.to_sym == :all
+ list = all_properties
else
list = Array(list).collect { |p| p.to_sym }
end
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index 64a7a1a88..65cc077cf 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -1,5 +1,6 @@
Puppet::Type.newtype(:tidy) do
require 'puppet/file_serving/fileset'
+ require 'puppet/file_bucket/dipper'
@doc = "Remove unwanted files based on specific criteria. Multiple
criteria are OR'd together, so a file that is too large but is not