puppet-lint cleanup
This commit is contained in:
parent
747dcc6fc7
commit
88acc52393
12 changed files with 11 additions and 15 deletions
|
@ -22,4 +22,3 @@
|
|||
* Build a new package with puppet-module or the rake build task if it exists
|
||||
* Publish the new package to the forge
|
||||
* Bonus points for an announcement to puppet-users.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:abs, :type => :rvalue, :doc => <<-EOS
|
||||
Returns the absolute value of a number, for example -34.56 becomes
|
||||
Returns the absolute value of a number, for example -34.56 becomes
|
||||
34.56. Takes a single integer and float value as an argument.
|
||||
EOS
|
||||
) do |arguments|
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS'
|
||||
Removes the record separator from the end of a string or an array of
|
||||
Removes the record separator from the end of a string or an array of
|
||||
strings, for example `hello\n` becomes `hello`.
|
||||
Requires a single string or array as an input.
|
||||
EOS
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:chop, :type => :rvalue, :doc => <<-'EOS'
|
||||
Returns a new string with the last character removed. If the string ends
|
||||
with `\r\n`, both characters are removed. Applying chop to an empty
|
||||
string returns an empty string. If you wish to merely remove record
|
||||
Returns a new string with the last character removed. If the string ends
|
||||
with `\r\n`, both characters are removed. Applying chop to an empty
|
||||
string returns an empty string. If you wish to merely remove record
|
||||
separators then you should use the `chomp` function.
|
||||
Requires a string or array of strings as input.
|
||||
EOS
|
||||
|
|
|
@ -15,7 +15,7 @@ Returns true if the string passed to this function is a valid IP address.
|
|||
"given #{arguments.size} for 1")
|
||||
end
|
||||
|
||||
begin
|
||||
begin
|
||||
ip = IPAddr.new(arguments[0])
|
||||
rescue ArgumentError
|
||||
return false
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS
|
||||
This function accepts YAML as a string and converts it into the correct
|
||||
This function accepts YAML as a string and converts it into the correct
|
||||
Puppet structure.
|
||||
EOS
|
||||
) do |arguments|
|
||||
|
|
|
@ -14,9 +14,9 @@ Returns a new string where runs of the same character that occur in this set are
|
|||
end
|
||||
|
||||
item = arguments[0]
|
||||
squeezeval = arguments[1]
|
||||
squeezeval = arguments[1]
|
||||
|
||||
if item.is_a?(Array) then
|
||||
if item.is_a?(Array) then
|
||||
if squeezeval then
|
||||
item.collect { |i| i.squeeze(squeezeval) }
|
||||
else
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS
|
||||
This converts a string to a boolean. This attempt to convert strings that
|
||||
This converts a string to a boolean. This attempt to convert strings that
|
||||
contain things like: y, 1, t, true to 'true' and strings that contain things
|
||||
like: 0, f, n, false, no to 'false'.
|
||||
EOS
|
||||
|
|
|
@ -8,4 +8,3 @@ class Class
|
|||
self.class_eval { private(*saved_private_instance_methods) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ describe "the fqdn_rotate function" do
|
|||
end
|
||||
|
||||
it "should rotate a string to give the same results for one host" do
|
||||
scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice
|
||||
scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice
|
||||
scope.function_fqdn_rotate(["abcdefg"]).should eql(scope.function_fqdn_rotate(["abcdefg"]))
|
||||
end
|
||||
|
||||
|
|
|
@ -41,4 +41,3 @@ describe Puppet::Parser::Functions.function(:validate_hash) do
|
|||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -58,4 +58,3 @@ describe Puppet::Parser::Functions.function(:validate_string) do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue