From f6d1e1371cf0a9db07d41cf154e79d09d3d7e695 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Tue, 2 Jan 2024 15:32:37 +0100 Subject: [PATCH] Drop deprecated apache_pw_hash, apache::apache_pw_hash and bool2httpd --- lib/puppet/functions/apache/apache_pw_hash.rb | 12 ------------ lib/puppet/functions/apache_pw_hash.rb | 12 ------------ lib/puppet/functions/bool2httpd.rb | 12 ------------ spec/functions/bool2httpd_spec.rb | 12 +----------- spec/functions/pw_hash_spec.rb | 16 +--------------- 5 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 lib/puppet/functions/apache/apache_pw_hash.rb delete mode 100644 lib/puppet/functions/apache_pw_hash.rb delete mode 100644 lib/puppet/functions/bool2httpd.rb diff --git a/lib/puppet/functions/apache/apache_pw_hash.rb b/lib/puppet/functions/apache/apache_pw_hash.rb deleted file mode 100644 index 4606ac7312..0000000000 --- a/lib/puppet/functions/apache/apache_pw_hash.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# @summary DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead. -Puppet::Functions.create_function(:'apache::apache_pw_hash') do - dispatch :deprecation_gen do - repeated_param 'Any', :args - end - def deprecation_gen(*args) - call_function('deprecation', 'apache::apache_pw_hash', 'This function is deprecated, please use apache::pw_hash instead.') - call_function('apache::pw_hash', *args) - end -end diff --git a/lib/puppet/functions/apache_pw_hash.rb b/lib/puppet/functions/apache_pw_hash.rb deleted file mode 100644 index 7aad4400df..0000000000 --- a/lib/puppet/functions/apache_pw_hash.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# @summary DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead. -Puppet::Functions.create_function(:apache_pw_hash) do - dispatch :deprecation_gen do - repeated_param 'Any', :args - end - def deprecation_gen(*args) - call_function('deprecation', 'apache_pw_hash', 'This function is deprecated, please use apache::pw_hash instead.') - call_function('apache::pw_hash', *args) - end -end diff --git a/lib/puppet/functions/bool2httpd.rb b/lib/puppet/functions/bool2httpd.rb deleted file mode 100644 index 62569f7bb4..0000000000 --- a/lib/puppet/functions/bool2httpd.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -# @summary DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead. -Puppet::Functions.create_function(:bool2httpd) do - dispatch :deprecation_gen do - repeated_param 'Any', :args - end - def deprecation_gen(*args) - call_function('deprecation', 'bool2httpd', 'This function is deprecated, please use apache::bool2httpd instead.') - call_function('apache::bool2httpd', *args) - end -end diff --git a/spec/functions/bool2httpd_spec.rb b/spec/functions/bool2httpd_spec.rb index eb7bcf1c28..68dc7b3879 100644 --- a/spec/functions/bool2httpd_spec.rb +++ b/spec/functions/bool2httpd_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -shared_examples 'apache::bool2httpd function' do +describe 'apache::bool2httpd' do it { is_expected.not_to eq(nil) } it { is_expected.to run.with_params.and_raise_error(ArgumentError) } it { is_expected.to run.with_params('1', '2').and_raise_error(ArgumentError) } @@ -25,13 +25,3 @@ it { is_expected.to run.with_params(:undef).and_return('Off') } it { is_expected.to run.with_params('foo').and_return('foo') } end - -describe 'apache::bool2httpd' do - it_behaves_like 'apache::bool2httpd function' - - describe 'deprecated non-namespaced shim' do - describe 'bool2httpd', type: :puppet_function do - it_behaves_like 'apache::bool2httpd function' - end - end -end diff --git a/spec/functions/pw_hash_spec.rb b/spec/functions/pw_hash_spec.rb index 40674aa890..d7e8ea259e 100644 --- a/spec/functions/pw_hash_spec.rb +++ b/spec/functions/pw_hash_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -shared_examples 'apache::pw_hash function' do +describe 'apache::pw_hash' do it { is_expected.not_to eq(nil) } it { is_expected.to run.with_params.and_raise_error(ArgumentError) } it { is_expected.to run.with_params('').and_raise_error(ArgumentError) } @@ -12,17 +12,3 @@ it { is_expected.to run.with_params([]).and_raise_error(ArgumentError) } it { is_expected.to run.with_params('test').and_return('{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=') } end - -describe 'apache::pw_hash' do - it_behaves_like 'apache::pw_hash function' - - describe 'deprecated shims' do - describe 'apache_pw_hash', type: :puppet_function do - it_behaves_like 'apache::pw_hash function' - end - - describe 'apache::apache_pw_hash', type: :puppet_function do - it_behaves_like 'apache::pw_hash function' - end - end -end