summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.markdown27
-rw-r--r--examples/kwalify-1.pp9
-rw-r--r--examples/kwalify-2.pp24
-rw-r--r--examples/validate_resource-1.pp23
-rw-r--r--examples/validate_resource-1.schema39
-rw-r--r--examples/validate_resource-2.pp17
-rw-r--r--examples/validate_resource-2.schema26
-rw-r--r--lib/puppet/parser/functions/kwalify.rb35
-rw-r--r--lib/puppet/parser/functions/validate_resource.rb41
-rwxr-xr-xspec/unit/parser/functions/kwalify_spec.rb62
-rwxr-xr-xspec/unit/puppet/parser/functions/abs_spec.rb (renamed from spec/unit/parser/functions/abs_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/bool2num_spec.rb (renamed from spec/unit/parser/functions/bool2num_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/capitalize_spec.rb (renamed from spec/unit/parser/functions/capitalize_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/chomp_spec.rb (renamed from spec/unit/parser/functions/chomp_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/chop_spec.rb (renamed from spec/unit/parser/functions/chop_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/delete_at_spec.rb (renamed from spec/unit/parser/functions/delete_at_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/delete_spec.rb (renamed from spec/unit/parser/functions/delete_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/downcase_spec.rb (renamed from spec/unit/parser/functions/downcase_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/empty_spec.rb (renamed from spec/unit/parser/functions/empty_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/flatten_spec.rb (renamed from spec/unit/parser/functions/flatten_spec.rb)0
-rwxr-xr-xspec/unit/puppet/parser/functions/grep_spec.rb (renamed from spec/unit/parser/functions/grep_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/hash_spec.rb (renamed from spec/unit/parser/functions/hash_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_array_spec.rb (renamed from spec/unit/parser/functions/is_array_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_domain_name_spec.rb (renamed from spec/unit/parser/functions/is_domain_name_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_float_spec.rb (renamed from spec/unit/parser/functions/is_float_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_hash_spec.rb (renamed from spec/unit/parser/functions/is_hash_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_integer_spec.rb (renamed from spec/unit/parser/functions/is_integer_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_ip_address_spec.rb (renamed from spec/unit/parser/functions/is_ip_address_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_mac_address_spec.rb (renamed from spec/unit/parser/functions/is_mac_address_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_numeric_spec.rb (renamed from spec/unit/parser/functions/is_numeric_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/is_string_spec.rb (renamed from spec/unit/parser/functions/is_string_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/join_spec.rb (renamed from spec/unit/parser/functions/join_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/keys_spec.rb (renamed from spec/unit/parser/functions/keys_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/lstrip_spec.rb (renamed from spec/unit/parser/functions/lstrip_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/member_spec.rb (renamed from spec/unit/parser/functions/member_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/num2bool_spec.rb (renamed from spec/unit/parser/functions/num2bool_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/parsejson_spec.rb (renamed from spec/unit/parser/functions/parsejson_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/parseyaml_spec.rb (renamed from spec/unit/parser/functions/parseyaml_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/prefix_spec.rb (renamed from spec/unit/parser/functions/prefix_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/range_spec.rb (renamed from spec/unit/parser/functions/range_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/reverse_spec.rb (renamed from spec/unit/parser/functions/reverse_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/rstrip_spec.rb (renamed from spec/unit/parser/functions/rstrip_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/shuffle_spec.rb (renamed from spec/unit/parser/functions/shuffle_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/size_spec.rb (renamed from spec/unit/parser/functions/size_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/sort_spec.rb (renamed from spec/unit/parser/functions/sort_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/squeeze_spec.rb (renamed from spec/unit/parser/functions/squeeze_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/str2bool_spec.rb (renamed from spec/unit/parser/functions/str2bool_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/strftime_spec.rb (renamed from spec/unit/parser/functions/strftime_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/strip_spec.rb (renamed from spec/unit/parser/functions/strip_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/swapcase_spec.rb (renamed from spec/unit/parser/functions/swapcase_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/time_spec.rb (renamed from spec/unit/parser/functions/time_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/type_spec.rb (renamed from spec/unit/parser/functions/type_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/unique_spec.rb (renamed from spec/unit/parser/functions/unique_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/upcase_spec.rb (renamed from spec/unit/parser/functions/upcase_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/values_at_spec.rb (renamed from spec/unit/parser/functions/values_at_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/values_spec.rb (renamed from spec/unit/parser/functions/values_spec.rb)0
-rw-r--r--spec/unit/puppet/parser/functions/zip_spec.rb (renamed from spec/unit/parser/functions/zip_spec.rb)0
57 files changed, 1 insertions, 302 deletions
diff --git a/README.markdown b/README.markdown
index 68e559e..a15338f 100644
--- a/README.markdown
+++ b/README.markdown
@@ -20,29 +20,4 @@ Depending on the version of Puppet, you may need to restart the puppetmasterd (o
## Functions
-### kwalify
-
-This function allows you to validate Puppet data structures using Kwalify
-schemas as documented here:
-
-http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html
-
-To validate, create a schema in Puppet:
-
- $schema = {
- 'type' => 'seq',
- 'sequence' => [
- { 'type' => 'str' }
- ]
- }
-
-And create some content that you want validated:
-
- $document = ['a', 'b', 'c']
-
-And then use the function to validate:
-
- kwalify($schema, $document)
-
-The function will throw an error and list all validation errors if there is a
-problem otherwise it succeeds silently.
+TODO
diff --git a/examples/kwalify-1.pp b/examples/kwalify-1.pp
deleted file mode 100644
index 852e46c..0000000
--- a/examples/kwalify-1.pp
+++ /dev/null
@@ -1,9 +0,0 @@
-$schema = {
- 'type' => 'seq',
- 'sequence' => [
- { 'type' => 'str', 'enum' => ['asdf','fdsa'] }
- ]
-}
-$document = ['a', 'b', 'c']
-
-kwalify($schema, $document)
diff --git a/examples/kwalify-2.pp b/examples/kwalify-2.pp
deleted file mode 100644
index 3f4ec33..0000000
--- a/examples/kwalify-2.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-$schema = {
- 'type' => 'map',
- 'mapping' => {
- 'name' => {
- 'type' => 'str',
- 'required' => true,
- },
- 'email' => {
- 'type' => 'str',
- 'pattern' => '/@/',
- },
- 'age' => {
- 'type' => 'str',
- 'pattern' => '/^\d+$/',
- },
- }
-}
-$document = {
- 'name' => 'foo',
- 'email' => 'foo@mail.com',
- 'age' => 20,
-}
-
-kwalify($schema, $document)
diff --git a/examples/validate_resource-1.pp b/examples/validate_resource-1.pp
deleted file mode 100644
index c701b8d..0000000
--- a/examples/validate_resource-1.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-define fooresource(
- $color,
- $type,
- $somenumber,
- $map
- ) {
-
- validate_resource()
-
- # ... do something ...
-
-}
-
-fooresource { "example1":
- color => "blue",
- type => "circle",
- somenumber => 5,
- map => {
- a => 1,
- b => 2,
- c => 3,
- }
-}
diff --git a/examples/validate_resource-1.schema b/examples/validate_resource-1.schema
deleted file mode 100644
index c540db5..0000000
--- a/examples/validate_resource-1.schema
+++ /dev/null
@@ -1,39 +0,0 @@
-type: map
-mapping:
- "title":
- type: str
- required: yes
- "name":
- type: str
- required: yes
- "caller_module_name":
- type: str
- required: yes
- "module_name":
- type: str
- required: yes
- "color":
- type: str
- required: yes
- "type":
- type: str
- required: yes
- "somenumber":
- type: str
- required: yes
- pattern: /^\d+$/
- "map":
- type: map
- mapping:
- "a":
- type: str
- required: yes
- pattern: /^\d+$/
- "b":
- type: str
- required: yes
- pattern: /^\d+$/
- "c":
- type: str
- required: yes
- pattern: /^\d+$/
diff --git a/examples/validate_resource-2.pp b/examples/validate_resource-2.pp
deleted file mode 100644
index b53b109..0000000
--- a/examples/validate_resource-2.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-class foo (
- $a,
- $b,
- $c
- ) {
-
- validate_resource()
-
- # ... do something ...
-
-}
-
-class { "foo":
- a => "1",
- b => "foobaz",
- c => ['a','b','c']
-}
diff --git a/examples/validate_resource-2.schema b/examples/validate_resource-2.schema
deleted file mode 100644
index b516945..0000000
--- a/examples/validate_resource-2.schema
+++ /dev/null
@@ -1,26 +0,0 @@
-type: map
-mapping:
- "title":
- type: str
- required: yes
- "name":
- type: str
- required: yes
- "caller_module_name":
- type: str
- required: yes
- "module_name":
- type: str
- required: yes
- "a":
- type: str
- required: yes
- "b":
- type: str
- required: yes
- pattern: /^foo/
- "c":
- type: seq
- required: yes
- sequence:
- - type: str
diff --git a/lib/puppet/parser/functions/kwalify.rb b/lib/puppet/parser/functions/kwalify.rb
deleted file mode 100644
index 49b9aeb..0000000
--- a/lib/puppet/parser/functions/kwalify.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# kwalify.rb
-#
-
-module Puppet::Parser::Functions
- newfunction(:kwalify, :type => :statement, :doc => <<-EOS
-This function uses kwalify to validate Puppet data structures against Kwalify
-schemas.
- EOS
- ) do |args|
-
- raise(Puppet::ParseError, "kwalify(): Wrong number of arguments " +
- "given (#{args.size} for 2)") if args.size != 2
-
- schema = args[0]
- document = args[1]
-
- require 'kwalify'
-
- validator = Kwalify::Validator.new(schema)
-
- errors = validator.validate(document)
-
- if errors && !errors.empty?
- error_out = []
- for e in errors
- error_out << "[#{e.path}] #{e.message}"
- end
- raise(Puppet::ParseError, "Failed kwalify schema validation:\n" + error_out.join("\n"))
- end
-
- end
-end
-
-# vim: set ts=2 sw=2 et :
diff --git a/lib/puppet/parser/functions/validate_resource.rb b/lib/puppet/parser/functions/validate_resource.rb
deleted file mode 100644
index d71ef3f..0000000
--- a/lib/puppet/parser/functions/validate_resource.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# validate_resource
-#
-
-module Puppet::Parser::Functions
- newfunction(:validate_resource, :type => :statement, :doc => <<-EOS
-This function when placed at the beginning of a class, will go looking for a
-valid kwalify schema by replacing the extension of the file with '.schema'.
-
-It will then validate the arguments passed to the function using that kwalify
-schema.
- EOS
- ) do |arguments|
-
- require 'kwalify'
-
- if (arguments.size != 0) then
- raise(Puppet::ParseError, "validate_resource(): Wrong number of arguments "+
- "given #{arguments.size} for 0")
- end
-
-
- classhash = to_hash(recursive=false)
- sourcepath = source.file
- schemapath = sourcepath.gsub(/\.(rb|pp)$/, ".schema")
- schema = Kwalify::Yaml.load_file(schemapath)
- validator = Kwalify::Validator.new(schema)
- errors = validator.validate(classhash)
-
- if errors && !errors.empty?
- error_output = "Resource validation failed:\n"
- for e in errors
- error_output += "[#{e.path}] #{e.message}\n"
- end
- raise(Puppet::ParseError, error_output)
- end
-
- end
-end
-
-# vim: set ts=2 sw=2 et :
diff --git a/spec/unit/parser/functions/kwalify_spec.rb b/spec/unit/parser/functions/kwalify_spec.rb
deleted file mode 100755
index abdd529..0000000
--- a/spec/unit/parser/functions/kwalify_spec.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env rspec
-require 'spec_helper'
-
-describe "the kwalify function" do
- before :all do
- Puppet::Parser::Functions.autoloader.loadall
- end
-
- before :each do
- @scope = Puppet::Parser::Scope.new
- end
-
- it "should exist" do
- Puppet::Parser::Functions.function("kwalify").should == "function_kwalify"
- end
-
- it "should raise a ParseError if there is less than 2 arguments" do
- lambda { @scope.function_kwalify([]) }.should( raise_error(Puppet::ParseError))
- end
-
- it "should validate a simple array schema" do
- schema = {
- 'type' => 'seq',
- 'sequence' => [
- { 'type' => 'str' }
- ]
- }
- document = ['a','b','c']
- @scope.function_kwalify([schema, document])
- end
-
- it "should not validate a simple array schema when invalid" do
- schema = {
- 'type' => 'seq',
- 'sequence' => [
- { 'type' => 'str' }
- ]
- }
- document = ['a','b',{'a' => 'b'}]
- lambda { @scope.function_kwalify([schema, document]) }.should(raise_error(Puppet::ParseError))
- end
-
- it "should validate a hash schema" do
- schema = {
- 'type' => 'map',
- 'mapping' => {
- 'key1' => {
- 'type' => 'str',
- },
- 'key2' => {
- 'type' => 'str',
- },
- }
- }
- document = {
- 'key1' => 'b',
- 'key2' => 'c',
- }
- @scope.function_kwalify([schema, document])
- end
-
-end
diff --git a/spec/unit/parser/functions/abs_spec.rb b/spec/unit/puppet/parser/functions/abs_spec.rb
index 65ba2e8..65ba2e8 100755
--- a/spec/unit/parser/functions/abs_spec.rb
+++ b/spec/unit/puppet/parser/functions/abs_spec.rb
diff --git a/spec/unit/parser/functions/bool2num_spec.rb b/spec/unit/puppet/parser/functions/bool2num_spec.rb
index d5da18c..d5da18c 100755
--- a/spec/unit/parser/functions/bool2num_spec.rb
+++ b/spec/unit/puppet/parser/functions/bool2num_spec.rb
diff --git a/spec/unit/parser/functions/capitalize_spec.rb b/spec/unit/puppet/parser/functions/capitalize_spec.rb
index 1c45821..1c45821 100755
--- a/spec/unit/parser/functions/capitalize_spec.rb
+++ b/spec/unit/puppet/parser/functions/capitalize_spec.rb
diff --git a/spec/unit/parser/functions/chomp_spec.rb b/spec/unit/puppet/parser/functions/chomp_spec.rb
index 0592115..0592115 100755
--- a/spec/unit/parser/functions/chomp_spec.rb
+++ b/spec/unit/puppet/parser/functions/chomp_spec.rb
diff --git a/spec/unit/parser/functions/chop_spec.rb b/spec/unit/puppet/parser/functions/chop_spec.rb
index 0c456a8..0c456a8 100755
--- a/spec/unit/parser/functions/chop_spec.rb
+++ b/spec/unit/puppet/parser/functions/chop_spec.rb
diff --git a/spec/unit/parser/functions/delete_at_spec.rb b/spec/unit/puppet/parser/functions/delete_at_spec.rb
index 27db0c8..27db0c8 100755
--- a/spec/unit/parser/functions/delete_at_spec.rb
+++ b/spec/unit/puppet/parser/functions/delete_at_spec.rb
diff --git a/spec/unit/parser/functions/delete_spec.rb b/spec/unit/puppet/parser/functions/delete_spec.rb
index fab3230..fab3230 100755
--- a/spec/unit/parser/functions/delete_spec.rb
+++ b/spec/unit/puppet/parser/functions/delete_spec.rb
diff --git a/spec/unit/parser/functions/downcase_spec.rb b/spec/unit/puppet/parser/functions/downcase_spec.rb
index 0bccd5f..0bccd5f 100755
--- a/spec/unit/parser/functions/downcase_spec.rb
+++ b/spec/unit/puppet/parser/functions/downcase_spec.rb
diff --git a/spec/unit/parser/functions/empty_spec.rb b/spec/unit/puppet/parser/functions/empty_spec.rb
index cb0021f..cb0021f 100755
--- a/spec/unit/parser/functions/empty_spec.rb
+++ b/spec/unit/puppet/parser/functions/empty_spec.rb
diff --git a/spec/unit/parser/functions/flatten_spec.rb b/spec/unit/puppet/parser/functions/flatten_spec.rb
index 7bedeb2..7bedeb2 100755
--- a/spec/unit/parser/functions/flatten_spec.rb
+++ b/spec/unit/puppet/parser/functions/flatten_spec.rb
diff --git a/spec/unit/parser/functions/grep_spec.rb b/spec/unit/puppet/parser/functions/grep_spec.rb
index b1f647c..b1f647c 100755
--- a/spec/unit/parser/functions/grep_spec.rb
+++ b/spec/unit/puppet/parser/functions/grep_spec.rb
diff --git a/spec/unit/parser/functions/hash_spec.rb b/spec/unit/puppet/parser/functions/hash_spec.rb
index 6d3d48c..6d3d48c 100644
--- a/spec/unit/parser/functions/hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/hash_spec.rb
diff --git a/spec/unit/parser/functions/is_array_spec.rb b/spec/unit/puppet/parser/functions/is_array_spec.rb
index 537595c..537595c 100644
--- a/spec/unit/parser/functions/is_array_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_array_spec.rb
diff --git a/spec/unit/parser/functions/is_domain_name_spec.rb b/spec/unit/puppet/parser/functions/is_domain_name_spec.rb
index ec7c7f5..ec7c7f5 100644
--- a/spec/unit/parser/functions/is_domain_name_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_domain_name_spec.rb
diff --git a/spec/unit/parser/functions/is_float_spec.rb b/spec/unit/puppet/parser/functions/is_float_spec.rb
index 55ba8cf..55ba8cf 100644
--- a/spec/unit/parser/functions/is_float_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_float_spec.rb
diff --git a/spec/unit/parser/functions/is_hash_spec.rb b/spec/unit/puppet/parser/functions/is_hash_spec.rb
index 94364f5..94364f5 100644
--- a/spec/unit/parser/functions/is_hash_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_hash_spec.rb
diff --git a/spec/unit/parser/functions/is_integer_spec.rb b/spec/unit/puppet/parser/functions/is_integer_spec.rb
index faf6f2d..faf6f2d 100644
--- a/spec/unit/parser/functions/is_integer_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_integer_spec.rb
diff --git a/spec/unit/parser/functions/is_ip_address_spec.rb b/spec/unit/puppet/parser/functions/is_ip_address_spec.rb
index 98ce828..98ce828 100644
--- a/spec/unit/parser/functions/is_ip_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_ip_address_spec.rb
diff --git a/spec/unit/parser/functions/is_mac_address_spec.rb b/spec/unit/puppet/parser/functions/is_mac_address_spec.rb
index c9b9637..c9b9637 100644
--- a/spec/unit/parser/functions/is_mac_address_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_mac_address_spec.rb
diff --git a/spec/unit/parser/functions/is_numeric_spec.rb b/spec/unit/puppet/parser/functions/is_numeric_spec.rb
index 2191b7b..2191b7b 100644
--- a/spec/unit/parser/functions/is_numeric_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_numeric_spec.rb
diff --git a/spec/unit/parser/functions/is_string_spec.rb b/spec/unit/puppet/parser/functions/is_string_spec.rb
index 4f3f5fd..4f3f5fd 100644
--- a/spec/unit/parser/functions/is_string_spec.rb
+++ b/spec/unit/puppet/parser/functions/is_string_spec.rb
diff --git a/spec/unit/parser/functions/join_spec.rb b/spec/unit/puppet/parser/functions/join_spec.rb
index 1b3dec8..1b3dec8 100644
--- a/spec/unit/parser/functions/join_spec.rb
+++ b/spec/unit/puppet/parser/functions/join_spec.rb
diff --git a/spec/unit/parser/functions/keys_spec.rb b/spec/unit/puppet/parser/functions/keys_spec.rb
index 927be96..927be96 100644
--- a/spec/unit/parser/functions/keys_spec.rb
+++ b/spec/unit/puppet/parser/functions/keys_spec.rb
diff --git a/spec/unit/parser/functions/lstrip_spec.rb b/spec/unit/puppet/parser/functions/lstrip_spec.rb
index ac331fa..ac331fa 100644
--- a/spec/unit/parser/functions/lstrip_spec.rb
+++ b/spec/unit/puppet/parser/functions/lstrip_spec.rb
diff --git a/spec/unit/parser/functions/member_spec.rb b/spec/unit/puppet/parser/functions/member_spec.rb
index 2cebc0d..2cebc0d 100644
--- a/spec/unit/parser/functions/member_spec.rb
+++ b/spec/unit/puppet/parser/functions/member_spec.rb
diff --git a/spec/unit/parser/functions/num2bool_spec.rb b/spec/unit/puppet/parser/functions/num2bool_spec.rb
index 6585273..6585273 100644
--- a/spec/unit/parser/functions/num2bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/num2bool_spec.rb
diff --git a/spec/unit/parser/functions/parsejson_spec.rb b/spec/unit/puppet/parser/functions/parsejson_spec.rb
index 26eea36..26eea36 100644
--- a/spec/unit/parser/functions/parsejson_spec.rb
+++ b/spec/unit/puppet/parser/functions/parsejson_spec.rb
diff --git a/spec/unit/parser/functions/parseyaml_spec.rb b/spec/unit/puppet/parser/functions/parseyaml_spec.rb
index f9cb049..f9cb049 100644
--- a/spec/unit/parser/functions/parseyaml_spec.rb
+++ b/spec/unit/puppet/parser/functions/parseyaml_spec.rb
diff --git a/spec/unit/parser/functions/prefix_spec.rb b/spec/unit/puppet/parser/functions/prefix_spec.rb
index a0cbcab..a0cbcab 100644
--- a/spec/unit/parser/functions/prefix_spec.rb
+++ b/spec/unit/puppet/parser/functions/prefix_spec.rb
diff --git a/spec/unit/parser/functions/range_spec.rb b/spec/unit/puppet/parser/functions/range_spec.rb
index 8c2446a..8c2446a 100644
--- a/spec/unit/parser/functions/range_spec.rb
+++ b/spec/unit/puppet/parser/functions/range_spec.rb
diff --git a/spec/unit/parser/functions/reverse_spec.rb b/spec/unit/puppet/parser/functions/reverse_spec.rb
index 4fa50e4..4fa50e4 100644
--- a/spec/unit/parser/functions/reverse_spec.rb
+++ b/spec/unit/puppet/parser/functions/reverse_spec.rb
diff --git a/spec/unit/parser/functions/rstrip_spec.rb b/spec/unit/puppet/parser/functions/rstrip_spec.rb
index af8cc12..af8cc12 100644
--- a/spec/unit/parser/functions/rstrip_spec.rb
+++ b/spec/unit/puppet/parser/functions/rstrip_spec.rb
diff --git a/spec/unit/parser/functions/shuffle_spec.rb b/spec/unit/puppet/parser/functions/shuffle_spec.rb
index f04fda5..f04fda5 100644
--- a/spec/unit/parser/functions/shuffle_spec.rb
+++ b/spec/unit/puppet/parser/functions/shuffle_spec.rb
diff --git a/spec/unit/parser/functions/size_spec.rb b/spec/unit/puppet/parser/functions/size_spec.rb
index ccaa335..ccaa335 100644
--- a/spec/unit/parser/functions/size_spec.rb
+++ b/spec/unit/puppet/parser/functions/size_spec.rb
diff --git a/spec/unit/parser/functions/sort_spec.rb b/spec/unit/puppet/parser/functions/sort_spec.rb
index fbe3073..fbe3073 100644
--- a/spec/unit/parser/functions/sort_spec.rb
+++ b/spec/unit/puppet/parser/functions/sort_spec.rb
diff --git a/spec/unit/parser/functions/squeeze_spec.rb b/spec/unit/puppet/parser/functions/squeeze_spec.rb
index 9355ad2..9355ad2 100644
--- a/spec/unit/parser/functions/squeeze_spec.rb
+++ b/spec/unit/puppet/parser/functions/squeeze_spec.rb
diff --git a/spec/unit/parser/functions/str2bool_spec.rb b/spec/unit/puppet/parser/functions/str2bool_spec.rb
index d7f0ac9..d7f0ac9 100644
--- a/spec/unit/parser/functions/str2bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/str2bool_spec.rb
diff --git a/spec/unit/parser/functions/strftime_spec.rb b/spec/unit/puppet/parser/functions/strftime_spec.rb
index f7a2cd9..f7a2cd9 100644
--- a/spec/unit/parser/functions/strftime_spec.rb
+++ b/spec/unit/puppet/parser/functions/strftime_spec.rb
diff --git a/spec/unit/parser/functions/strip_spec.rb b/spec/unit/puppet/parser/functions/strip_spec.rb
index 48a52dd..48a52dd 100644
--- a/spec/unit/parser/functions/strip_spec.rb
+++ b/spec/unit/puppet/parser/functions/strip_spec.rb
diff --git a/spec/unit/parser/functions/swapcase_spec.rb b/spec/unit/puppet/parser/functions/swapcase_spec.rb
index 2686054..2686054 100644
--- a/spec/unit/parser/functions/swapcase_spec.rb
+++ b/spec/unit/puppet/parser/functions/swapcase_spec.rb
diff --git a/spec/unit/parser/functions/time_spec.rb b/spec/unit/puppet/parser/functions/time_spec.rb
index 666e8e0..666e8e0 100644
--- a/spec/unit/parser/functions/time_spec.rb
+++ b/spec/unit/puppet/parser/functions/time_spec.rb
diff --git a/spec/unit/parser/functions/type_spec.rb b/spec/unit/puppet/parser/functions/type_spec.rb
index e3c28ed..e3c28ed 100644
--- a/spec/unit/parser/functions/type_spec.rb
+++ b/spec/unit/puppet/parser/functions/type_spec.rb
diff --git a/spec/unit/parser/functions/unique_spec.rb b/spec/unit/puppet/parser/functions/unique_spec.rb
index 627dc33..627dc33 100644
--- a/spec/unit/parser/functions/unique_spec.rb
+++ b/spec/unit/puppet/parser/functions/unique_spec.rb
diff --git a/spec/unit/parser/functions/upcase_spec.rb b/spec/unit/puppet/parser/functions/upcase_spec.rb
index 5d18846..5d18846 100644
--- a/spec/unit/parser/functions/upcase_spec.rb
+++ b/spec/unit/puppet/parser/functions/upcase_spec.rb
diff --git a/spec/unit/parser/functions/values_at_spec.rb b/spec/unit/puppet/parser/functions/values_at_spec.rb
index 6c45316..6c45316 100644
--- a/spec/unit/parser/functions/values_at_spec.rb
+++ b/spec/unit/puppet/parser/functions/values_at_spec.rb
diff --git a/spec/unit/parser/functions/values_spec.rb b/spec/unit/puppet/parser/functions/values_spec.rb
index f6eb5b6..f6eb5b6 100644
--- a/spec/unit/parser/functions/values_spec.rb
+++ b/spec/unit/puppet/parser/functions/values_spec.rb
diff --git a/spec/unit/parser/functions/zip_spec.rb b/spec/unit/puppet/parser/functions/zip_spec.rb
index 074f4df..074f4df 100644
--- a/spec/unit/parser/functions/zip_spec.rb
+++ b/spec/unit/puppet/parser/functions/zip_spec.rb