summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.markdown2
-rw-r--r--RELEASE_PROCESS.markdown1
-rw-r--r--lib/puppet/parser/functions/abs.rb2
-rw-r--r--lib/puppet/parser/functions/chomp.rb2
-rw-r--r--lib/puppet/parser/functions/chop.rb6
-rw-r--r--lib/puppet/parser/functions/is_ip_address.rb2
-rw-r--r--lib/puppet/parser/functions/parseyaml.rb2
-rw-r--r--lib/puppet/parser/functions/squeeze.rb4
-rw-r--r--lib/puppet/parser/functions/str2bool.rb2
-rwxr-xr-xspec/monkey_patches/publicize_methods.rb1
-rw-r--r--spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb2
-rw-r--r--spec/unit/puppet/parser/functions/validate_hash_spec.rb1
-rw-r--r--spec/unit/puppet/parser/functions/validate_string_spec.rb1
-rw-r--r--tests/has_interface_with.pp16
-rw-r--r--tests/has_ip_address.pp4
-rw-r--r--tests/has_ip_network.pp4
16 files changed, 24 insertions, 28 deletions
diff --git a/README.markdown b/README.markdown
index 130753d..a33add3 100644
--- a/README.markdown
+++ b/README.markdown
@@ -46,7 +46,7 @@ All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7.
## stdlib 3.x ##
The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x
-supports Puppet 2.7.
+supports Puppet 2 and Puppet 3.
# Functions #
diff --git a/RELEASE_PROCESS.markdown b/RELEASE_PROCESS.markdown
index 3982c84..0f9328e 100644
--- a/RELEASE_PROCESS.markdown
+++ b/RELEASE_PROCESS.markdown
@@ -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.
-
diff --git a/lib/puppet/parser/functions/abs.rb b/lib/puppet/parser/functions/abs.rb
index ade5462..11d2d7f 100644
--- a/lib/puppet/parser/functions/abs.rb
+++ b/lib/puppet/parser/functions/abs.rb
@@ -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|
diff --git a/lib/puppet/parser/functions/chomp.rb b/lib/puppet/parser/functions/chomp.rb
index c99d139..4564a00 100644
--- a/lib/puppet/parser/functions/chomp.rb
+++ b/lib/puppet/parser/functions/chomp.rb
@@ -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
diff --git a/lib/puppet/parser/functions/chop.rb b/lib/puppet/parser/functions/chop.rb
index 636b990..f242af3 100644
--- a/lib/puppet/parser/functions/chop.rb
+++ b/lib/puppet/parser/functions/chop.rb
@@ -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
diff --git a/lib/puppet/parser/functions/is_ip_address.rb b/lib/puppet/parser/functions/is_ip_address.rb
index b4a9a15..a90adab 100644
--- a/lib/puppet/parser/functions/is_ip_address.rb
+++ b/lib/puppet/parser/functions/is_ip_address.rb
@@ -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
diff --git a/lib/puppet/parser/functions/parseyaml.rb b/lib/puppet/parser/functions/parseyaml.rb
index e8ac8a4..53d54fa 100644
--- a/lib/puppet/parser/functions/parseyaml.rb
+++ b/lib/puppet/parser/functions/parseyaml.rb
@@ -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|
diff --git a/lib/puppet/parser/functions/squeeze.rb b/lib/puppet/parser/functions/squeeze.rb
index 65c174a..81fadfd 100644
--- a/lib/puppet/parser/functions/squeeze.rb
+++ b/lib/puppet/parser/functions/squeeze.rb
@@ -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
diff --git a/lib/puppet/parser/functions/str2bool.rb b/lib/puppet/parser/functions/str2bool.rb
index c320da6..0509c2b 100644
--- a/lib/puppet/parser/functions/str2bool.rb
+++ b/lib/puppet/parser/functions/str2bool.rb
@@ -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
diff --git a/spec/monkey_patches/publicize_methods.rb b/spec/monkey_patches/publicize_methods.rb
index b39e9c0..f3a1abf 100755
--- a/spec/monkey_patches/publicize_methods.rb
+++ b/spec/monkey_patches/publicize_methods.rb
@@ -8,4 +8,3 @@ class Class
self.class_eval { private(*saved_private_instance_methods) }
end
end
-
diff --git a/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb b/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
index 4eb799d..2577723 100644
--- a/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
+++ b/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
@@ -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
diff --git a/spec/unit/puppet/parser/functions/validate_hash_spec.rb b/spec/unit/puppet/parser/functions/validate_hash_spec.rb
index f63db1d..06d77a1 100644
--- a/spec/unit/puppet/parser/functions/validate_hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_hash_spec.rb
@@ -41,4 +41,3 @@ describe Puppet::Parser::Functions.function(:validate_hash) do
end
end
-
diff --git a/spec/unit/puppet/parser/functions/validate_string_spec.rb b/spec/unit/puppet/parser/functions/validate_string_spec.rb
index f40bf2a..007b4ca 100644
--- a/spec/unit/puppet/parser/functions/validate_string_spec.rb
+++ b/spec/unit/puppet/parser/functions/validate_string_spec.rb
@@ -58,4 +58,3 @@ describe Puppet::Parser::Functions.function(:validate_string) do
end
end
end
-
diff --git a/tests/has_interface_with.pp b/tests/has_interface_with.pp
index 8b9e51e..e1f1353 100644
--- a/tests/has_interface_with.pp
+++ b/tests/has_interface_with.pp
@@ -1,10 +1,10 @@
include stdlib
-info("has_interface_with('lo'):", has_interface_with('lo'))
-info("has_interface_with('loX'):", has_interface_with('loX'))
-info("has_interface_with('ipaddress', '127.0.0.1'):", has_interface_with('ipaddress', '127.0.0.1'))
-info("has_interface_with('ipaddress', '127.0.0.100'):", has_interface_with('ipaddress', '127.0.0.100'))
-info("has_interface_with('network', '127.0.0.0'):", has_interface_with('network', '127.0.0.0'))
-info("has_interface_with('network', '128.0.0.0'):", has_interface_with('network', '128.0.0.0'))
-info("has_interface_with('netmask', '255.0.0.0'):", has_interface_with('netmask', '255.0.0.0'))
-info("has_interface_with('netmask', '256.0.0.0'):", has_interface_with('netmask', '256.0.0.0'))
+info('has_interface_with(\'lo\'):', has_interface_with('lo'))
+info('has_interface_with(\'loX\'):', has_interface_with('loX'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1'))
+info('has_interface_with(\'ipaddress\', \'127.0.0.100\'):', has_interface_with('ipaddress', '127.0.0.100'))
+info('has_interface_with(\'network\', \'127.0.0.0\'):', has_interface_with('network', '127.0.0.0'))
+info('has_interface_with(\'network\', \'128.0.0.0\'):', has_interface_with('network', '128.0.0.0'))
+info('has_interface_with(\'netmask\', \'255.0.0.0\'):', has_interface_with('netmask', '255.0.0.0'))
+info('has_interface_with(\'netmask\', \'256.0.0.0\'):', has_interface_with('netmask', '256.0.0.0'))
diff --git a/tests/has_ip_address.pp b/tests/has_ip_address.pp
index e770a11..8429a88 100644
--- a/tests/has_ip_address.pp
+++ b/tests/has_ip_address.pp
@@ -1,3 +1,3 @@
include stdlib
-info("has_ip_address('192.168.1.256'):", has_ip_address('192.168.1.256'))
-info("has_ip_address('127.0.0.1'):", has_ip_address('127.0.0.1'))
+info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256'))
+info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1'))
diff --git a/tests/has_ip_network.pp b/tests/has_ip_network.pp
index 036d649..a15d8c0 100644
--- a/tests/has_ip_network.pp
+++ b/tests/has_ip_network.pp
@@ -1,4 +1,4 @@
include stdlib
-info("has_ip_network('127.0.0.0'):", has_ip_network('127.0.0.0'))
-info("has_ip_network('128.0.0.0'):", has_ip_network('128.0.0.0'))
+info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0'))
+info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0'))