From d34f651e18ddeb9fafd3983afc7dd8796e5022ea 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 --- REFERENCE.md | 57 ------------------- 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 +----- 6 files changed, 2 insertions(+), 119 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/REFERENCE.md b/REFERENCE.md index ba80e4391b..a176c7c57f 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -156,12 +156,9 @@ outside of the defaults. ### Functions -* [`apache::apache_pw_hash`](#apache--apache_pw_hash): DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead. * [`apache::authz_core_config`](#apache--authz_core_config): Function to generate the authz_core configuration directives. * [`apache::bool2httpd`](#apache--bool2httpd): Transform a supposed boolean to On or Off. Passes all other values through. * [`apache::pw_hash`](#apache--pw_hash): Hashes a password in a format suitable for htpasswd files read by apache. -* [`apache_pw_hash`](#apache_pw_hash): DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead. -* [`bool2httpd`](#bool2httpd): DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead. ### Data types @@ -11033,24 +11030,6 @@ Default value: `false` ## Functions -### `apache::apache_pw_hash` - -Type: Ruby 4.x API - -DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead. - -#### `apache::apache_pw_hash(Any *$args)` - -The apache::apache_pw_hash function. - -Returns: `Any` - -##### `*args` - -Data type: `Any` - - - ### `apache::authz_core_config` Type: Ruby 4.x API @@ -11212,42 +11191,6 @@ Data type: `String[1]` The input that is to be hashed. -### `apache_pw_hash` - -Type: Ruby 4.x API - -DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead. - -#### `apache_pw_hash(Any *$args)` - -The apache_pw_hash function. - -Returns: `Any` - -##### `*args` - -Data type: `Any` - - - -### `bool2httpd` - -Type: Ruby 4.x API - -DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead. - -#### `bool2httpd(Any *$args)` - -The bool2httpd function. - -Returns: `Any` - -##### `*args` - -Data type: `Any` - - - ## Data types ### `Apache::LogLevel` 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