From 93d6499290c073f3c196889e2cd84697a5224e75 Mon Sep 17 00:00:00 2001 From: jonasbn Date: Mon, 9 Nov 2020 22:22:53 +0100 Subject: [PATCH] Fixed a bug in the mock introduced in release 1.27. Had added it to the cpanfile, but not the proper prerequisites and the mocking was not correct syntax Made adjustments to the tar-ball generation, way to much non-distribution related material included --- Changes | 6 ++++++ MANIFEST.SKIP | 6 ++++++ dist.ini | 1 + lib/Date/Holidays.pm | 2 +- lib/Date/Holidays/Adapter.pm | 2 +- lib/Date/Holidays/Adapter/AT.pm | 2 +- lib/Date/Holidays/Adapter/AU.pm | 2 +- lib/Date/Holidays/Adapter/AW.pm | 2 +- lib/Date/Holidays/Adapter/BR.pm | 2 +- lib/Date/Holidays/Adapter/BY.pm | 2 +- lib/Date/Holidays/Adapter/CA_ES.pm | 2 +- lib/Date/Holidays/Adapter/CN.pm | 2 +- lib/Date/Holidays/Adapter/CZ.pm | 2 +- lib/Date/Holidays/Adapter/DE.pm | 2 +- lib/Date/Holidays/Adapter/DK.pm | 2 +- lib/Date/Holidays/Adapter/ES.pm | 2 +- lib/Date/Holidays/Adapter/FR.pm | 2 +- lib/Date/Holidays/Adapter/GB.pm | 2 +- lib/Date/Holidays/Adapter/JP.pm | 2 +- lib/Date/Holidays/Adapter/KR.pm | 2 +- lib/Date/Holidays/Adapter/KZ.pm | 2 +- lib/Date/Holidays/Adapter/Local.pm | 2 +- lib/Date/Holidays/Adapter/NL.pm | 2 +- lib/Date/Holidays/Adapter/NO.pm | 2 +- lib/Date/Holidays/Adapter/NZ.pm | 2 +- lib/Date/Holidays/Adapter/PL.pm | 2 +- lib/Date/Holidays/Adapter/PT.pm | 2 +- lib/Date/Holidays/Adapter/RU.pm | 2 +- lib/Date/Holidays/Adapter/SK.pm | 2 +- lib/Date/Holidays/Adapter/UA.pm | 2 +- lib/Date/Holidays/Adapter/UK.pm | 2 +- lib/Date/Holidays/Adapter/US.pm | 2 +- lib/Date/Holidays/Adapter/USFederal.pm | 2 +- t/Test/Class/Date/Holidays.pm | 2 +- 34 files changed, 44 insertions(+), 31 deletions(-) diff --git a/Changes b/Changes index 279f1b3..a5f2698 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Changes file for Date-Holidays +1.27 2020-11-09 Bug fix release, update recommended + +- Fixed a bug in the mock introduced in release 1.27. Had added it to the cpanfile, but not the proper prerequisites and the mocking was not correct syntax + +- Made adjustments to the tar-ball generation, way to much non-distribution related material included + 1.26 2020-11-09 Bug fix release, update not required - I am implementing an example application and I came across a minor bug in the adapter for Date::Holidays::SK diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 87b54c1..9114500 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -90,6 +90,9 @@ # Perl::Tidy error files \bperltidy\.ERR +# VSCode files +perl-date-holidays.code-workspace + # Jekyll github pages files _config\.yml ^assets @@ -98,6 +101,9 @@ README\.md CONTRIBUTING\.md CODE_OF_CONDUCT\.md ^\.github/ +^_site +Gemfile +Gemfile.lock # Avoid directory and files generated by carton ^local/ diff --git a/dist.ini b/dist.ini index f23690e..3a3dd32 100644 --- a/dist.ini +++ b/dist.ini @@ -81,3 +81,4 @@ Test::Kwalitee = 1.21 ; from Dist::Zilla Pod::Coverage::TrustPod = 0 ; from Dist::Zilla Test::Pod = 1.41 ; from Dist::Zilla Test::Pod::Coverage = 1.08 ; from Dist::Zilla +Test::MockModule = 0 diff --git a/lib/Date/Holidays.pm b/lib/Date/Holidays.pm index 8457a8c..b31ea7d 100644 --- a/lib/Date/Holidays.pm +++ b/lib/Date/Holidays.pm @@ -11,7 +11,7 @@ use Scalar::Util qw(blessed); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub new { my ( $class, %params ) = @_; diff --git a/lib/Date/Holidays/Adapter.pm b/lib/Date/Holidays/Adapter.pm index 4b00172..304d124 100644 --- a/lib/Date/Holidays/Adapter.pm +++ b/lib/Date/Holidays/Adapter.pm @@ -10,7 +10,7 @@ use Scalar::Util qw(blessed); use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub new { my ($class, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/AT.pm b/lib/Date/Holidays/Adapter/AT.pm index 3246bbb..1da08d6 100644 --- a/lib/Date/Holidays/Adapter/AT.pm +++ b/lib/Date/Holidays/Adapter/AT.pm @@ -10,7 +10,7 @@ use vars qw($VERSION); my $format = '%#:%m%d'; -$VERSION = '1.26'; +$VERSION = '1.27'; # Lifted from Date::Holidays::AT source code # Ref: https://metacpan.org/source/MDIETRICH/Date-Holidays-AT-v0.1.4/lib/Date/Holidays/AT.pm diff --git a/lib/Date/Holidays/Adapter/AU.pm b/lib/Date/Holidays/Adapter/AU.pm index d24bdd6..154fe0e 100644 --- a/lib/Date/Holidays/Adapter/AU.pm +++ b/lib/Date/Holidays/Adapter/AU.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; use constant DEFAULT_STATE => 'VIC'; diff --git a/lib/Date/Holidays/Adapter/AW.pm b/lib/Date/Holidays/Adapter/AW.pm index 2cbc465..09bf3de 100644 --- a/lib/Date/Holidays/Adapter/AW.pm +++ b/lib/Date/Holidays/Adapter/AW.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/BR.pm b/lib/Date/Holidays/Adapter/BR.pm index ba047d2..5f60754 100644 --- a/lib/Date/Holidays/Adapter/BR.pm +++ b/lib/Date/Holidays/Adapter/BR.pm @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter'; use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ( $self, %params ) = @_; diff --git a/lib/Date/Holidays/Adapter/BY.pm b/lib/Date/Holidays/Adapter/BY.pm index d2ad727..07be2c8 100644 --- a/lib/Date/Holidays/Adapter/BY.pm +++ b/lib/Date/Holidays/Adapter/BY.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/CA_ES.pm b/lib/Date/Holidays/Adapter/CA_ES.pm index f7767c3..05ad1cf 100644 --- a/lib/Date/Holidays/Adapter/CA_ES.pm +++ b/lib/Date/Holidays/Adapter/CA_ES.pm @@ -7,7 +7,7 @@ use base qw(Date::Holidays::Adapter::ES); use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; 1; diff --git a/lib/Date/Holidays/Adapter/CN.pm b/lib/Date/Holidays/Adapter/CN.pm index 693474b..2c7e212 100644 --- a/lib/Date/Holidays/Adapter/CN.pm +++ b/lib/Date/Holidays/Adapter/CN.pm @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter'; use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/CZ.pm b/lib/Date/Holidays/Adapter/CZ.pm index 22e718d..e3e6f97 100644 --- a/lib/Date/Holidays/Adapter/CZ.pm +++ b/lib/Date/Holidays/Adapter/CZ.pm @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter'; use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; my $format = '%#:%m%d'; diff --git a/lib/Date/Holidays/Adapter/DE.pm b/lib/Date/Holidays/Adapter/DE.pm index 53b469d..467505c 100644 --- a/lib/Date/Holidays/Adapter/DE.pm +++ b/lib/Date/Holidays/Adapter/DE.pm @@ -10,7 +10,7 @@ use vars qw($VERSION); my $format = '%#:%m%d'; -$VERSION = '1.26'; +$VERSION = '1.27'; # Lifted from Date::Holidays::DE example: feiertage.pl # Ref: https://metacpan.org/source/MSCHMITT/Date-Holidays-DE-1.9/example/feiertage.pl diff --git a/lib/Date/Holidays/Adapter/DK.pm b/lib/Date/Holidays/Adapter/DK.pm index 8b21dbd..3756d99 100644 --- a/lib/Date/Holidays/Adapter/DK.pm +++ b/lib/Date/Holidays/Adapter/DK.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/ES.pm b/lib/Date/Holidays/Adapter/ES.pm index d745996..5f4a70f 100644 --- a/lib/Date/Holidays/Adapter/ES.pm +++ b/lib/Date/Holidays/Adapter/ES.pm @@ -8,7 +8,7 @@ use Module::Load; # load use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/FR.pm b/lib/Date/Holidays/Adapter/FR.pm index c625d0c..1ea9bca 100644 --- a/lib/Date/Holidays/Adapter/FR.pm +++ b/lib/Date/Holidays/Adapter/FR.pm @@ -7,7 +7,7 @@ use Carp; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { croak "holidays is unimplemented for ".__PACKAGE__; diff --git a/lib/Date/Holidays/Adapter/GB.pm b/lib/Date/Holidays/Adapter/GB.pm index e4aeab3..8bdb06d 100644 --- a/lib/Date/Holidays/Adapter/GB.pm +++ b/lib/Date/Holidays/Adapter/GB.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/JP.pm b/lib/Date/Holidays/Adapter/JP.pm index f22b80b..efa43b8 100644 --- a/lib/Date/Holidays/Adapter/JP.pm +++ b/lib/Date/Holidays/Adapter/JP.pm @@ -8,7 +8,7 @@ use Carp; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { croak "holidays is unimplemented for ".__PACKAGE__; diff --git a/lib/Date/Holidays/Adapter/KR.pm b/lib/Date/Holidays/Adapter/KR.pm index da259a7..25deaf5 100644 --- a/lib/Date/Holidays/Adapter/KR.pm +++ b/lib/Date/Holidays/Adapter/KR.pm @@ -7,7 +7,7 @@ use Carp; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { croak "holidays is unimplemented for ".__PACKAGE__; diff --git a/lib/Date/Holidays/Adapter/KZ.pm b/lib/Date/Holidays/Adapter/KZ.pm index 8187b44..98fa877 100644 --- a/lib/Date/Holidays/Adapter/KZ.pm +++ b/lib/Date/Holidays/Adapter/KZ.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/Local.pm b/lib/Date/Holidays/Adapter/Local.pm index 11c7ef6..b999002 100644 --- a/lib/Date/Holidays/Adapter/Local.pm +++ b/lib/Date/Holidays/Adapter/Local.pm @@ -7,7 +7,7 @@ use JSON; #from_json use Env qw($HOLIDAYS_FILE); use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub new { my $class = shift; diff --git a/lib/Date/Holidays/Adapter/NL.pm b/lib/Date/Holidays/Adapter/NL.pm index 8600f1c..be1d389 100644 --- a/lib/Date/Holidays/Adapter/NL.pm +++ b/lib/Date/Holidays/Adapter/NL.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/NO.pm b/lib/Date/Holidays/Adapter/NO.pm index 67dd6d0..540bb79 100644 --- a/lib/Date/Holidays/Adapter/NO.pm +++ b/lib/Date/Holidays/Adapter/NO.pm @@ -6,7 +6,7 @@ use base 'Date::Holidays::Adapter'; use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/NZ.pm b/lib/Date/Holidays/Adapter/NZ.pm index 949b076..eca49c3 100644 --- a/lib/Date/Holidays/Adapter/NZ.pm +++ b/lib/Date/Holidays/Adapter/NZ.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/PL.pm b/lib/Date/Holidays/Adapter/PL.pm index 92295e5..e932d15 100644 --- a/lib/Date/Holidays/Adapter/PL.pm +++ b/lib/Date/Holidays/Adapter/PL.pm @@ -7,7 +7,7 @@ use Carp; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { croak "holidays is unimplemented for ".__PACKAGE__; diff --git a/lib/Date/Holidays/Adapter/PT.pm b/lib/Date/Holidays/Adapter/PT.pm index f0dde3d..868dcbf 100644 --- a/lib/Date/Holidays/Adapter/PT.pm +++ b/lib/Date/Holidays/Adapter/PT.pm @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter'; use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/RU.pm b/lib/Date/Holidays/Adapter/RU.pm index 085dd8f..b98082a 100644 --- a/lib/Date/Holidays/Adapter/RU.pm +++ b/lib/Date/Holidays/Adapter/RU.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/SK.pm b/lib/Date/Holidays/Adapter/SK.pm index 61eaed7..b087236 100644 --- a/lib/Date/Holidays/Adapter/SK.pm +++ b/lib/Date/Holidays/Adapter/SK.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/UA.pm b/lib/Date/Holidays/Adapter/UA.pm index 2d5de57..0e46d83 100644 --- a/lib/Date/Holidays/Adapter/UA.pm +++ b/lib/Date/Holidays/Adapter/UA.pm @@ -7,7 +7,7 @@ use Carp; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { my ($self, %params) = @_; diff --git a/lib/Date/Holidays/Adapter/UK.pm b/lib/Date/Holidays/Adapter/UK.pm index 9aa51c5..138ad8a 100644 --- a/lib/Date/Holidays/Adapter/UK.pm +++ b/lib/Date/Holidays/Adapter/UK.pm @@ -7,7 +7,7 @@ use base qw(Date::Holidays::Adapter::GB); use vars qw($VERSION); -$VERSION = '1.26'; +$VERSION = '1.27'; 1; diff --git a/lib/Date/Holidays/Adapter/US.pm b/lib/Date/Holidays/Adapter/US.pm index 2297df8..c332de7 100644 --- a/lib/Date/Holidays/Adapter/US.pm +++ b/lib/Date/Holidays/Adapter/US.pm @@ -8,7 +8,7 @@ use Data::Dumper; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; sub holidays { croak "holidays is unimplemented for ".__PACKAGE__; diff --git a/lib/Date/Holidays/Adapter/USFederal.pm b/lib/Date/Holidays/Adapter/USFederal.pm index ce6c80e..56e4acb 100644 --- a/lib/Date/Holidays/Adapter/USFederal.pm +++ b/lib/Date/Holidays/Adapter/USFederal.pm @@ -8,7 +8,7 @@ use Data::Dumper; use base 'Date::Holidays::Adapter'; -$VERSION = '1.26'; +$VERSION = '1.27'; # sub new { # my $class = shift; diff --git a/t/Test/Class/Date/Holidays.pm b/t/Test/Class/Date/Holidays.pm index 84e59ac..0656590 100644 --- a/t/Test/Class/Date/Holidays.pm +++ b/t/Test/Class/Date/Holidays.pm @@ -111,7 +111,7 @@ sub test_issue45 : Test(1) { # Book: "Perl Testing: A Developer's Notebook" # REF: https://learning.oreilly.com/library/view/perl-testing-a/0596100922/ my $mock = Test::MockModule->new('Date::Holidays::Adapter'); - $mock->mock->redefine('_fetch', sub { + $mock->redefine('_fetch', sub { my ($self, $params) = @_; if ($params->{countrycode} eq 'SK') {