Skip to content

Commit

Permalink
Merge pull request #655 from puppetlabs/revert-654-puppet4Dep
Browse files Browse the repository at this point in the history
Revert "Ensure validate functions use Puppet 4 deprecation"
  • Loading branch information
DavidS committed Sep 21, 2016
2 parents e94beb5 + 69c69e7 commit f69cd1a
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 78 deletions.
3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_absolute_path.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_array.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_bool.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_hash.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_integer.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_ip_address.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_ipv4_address.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_ipv6_address.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_numeric.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_re.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/puppet/functions/validate_string.rb

This file was deleted.

21 changes: 0 additions & 21 deletions lib/puppet_x/puppetlabs/stdlib/deprecation_gen.rb

This file was deleted.

16 changes: 8 additions & 8 deletions spec/acceptance/validate_array_spec.rb
Expand Up @@ -20,14 +20,14 @@

apply_manifest(pp, :catch_failures => true)
end
[
%{validate_array({'a' => 'hash' })},
%{validate_array('string')},
%{validate_array(false)},
%{validate_array(undef)}
].each do |pp|
it "rejects #{pp.inspect}" do
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not an Array\. It looks to be a/)
it 'validates a non-array' do
{
%{validate_array({'a' => 'hash' })} => "Hash",
%{validate_array('string')} => "String",
%{validate_array(false)} => "FalseClass",
%{validate_array(undef)} => "String"
}.each do |pp,type|
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
end
end
end
Expand Down
16 changes: 8 additions & 8 deletions spec/acceptance/validate_bool_spec.rb
Expand Up @@ -20,14 +20,14 @@

apply_manifest(pp, :catch_failures => true)
end
[
%{validate_bool('true')},
%{validate_bool('false')},
%{validate_bool([true])},
%{validate_bool(undef)}
].each do |pp|
it "rejects #{pp.inspect}" do
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not a boolean\. It looks to be a/)
it 'validates a non-bool' do
{
%{validate_bool('true')} => "String",
%{validate_bool('false')} => "String",
%{validate_bool([true])} => "Array",
%{validate_bool(undef)} => "String",
}.each do |pp,type|
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
end
end
end
Expand Down
16 changes: 8 additions & 8 deletions spec/acceptance/validate_hash_spec.rb
Expand Up @@ -20,14 +20,14 @@

apply_manifest(pp, :catch_failures => true)
end
[
%{validate_hash('{ "not" => "hash" }')},
%{validate_hash('string')},
%{validate_hash(["array"])},
%{validate_hash(undef)}
].each do |pp|
it "rejects #{pp.inspect}" do
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(//)
it 'validates a non-hash' do
{
%{validate_hash('{ "not" => "hash" }')} => "String",
%{validate_hash('string')} => "String",
%{validate_hash(["array"])} => "Array",
%{validate_hash(undef)} => "String",
}.each do |pp,type|
expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/)
end
end
end
Expand Down

0 comments on commit f69cd1a

Please sign in to comment.