Skip to content

Commit

Permalink
Fixed a bug in the mock introduced in release 1.27. Had added it to t…
Browse files Browse the repository at this point in the history
…he 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
  • Loading branch information
jonasbn committed Nov 9, 2020
1 parent db2b0b4 commit 93d6499
Show file tree
Hide file tree
Showing 34 changed files with 44 additions and 31 deletions.
6 changes: 6 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
# Perl::Tidy error files
\bperltidy\.ERR

# VSCode files
perl-date-holidays.code-workspace

# Jekyll github pages files
_config\.yml
^assets
Expand All @@ -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/
Expand Down
1 change: 1 addition & 0 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/Date/Holidays.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use Scalar::Util qw(blessed);

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub new {
my ($class, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/AT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/AU.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

use constant DEFAULT_STATE => 'VIC';

Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/AW.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/BR.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter';

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ( $self, %params ) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/BY.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/CA_ES.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base qw(Date::Holidays::Adapter::ES);

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/CN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter';

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/CZ.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter';

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

my $format = '%#:%m%d';

Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/DE.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/DK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/ES.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Module::Load; # load

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/FR.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/GB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/JP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/KR.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/KZ.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/Local.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/NL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/NO.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use base 'Date::Holidays::Adapter';

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/NZ.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/PL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/PT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base 'Date::Holidays::Adapter';

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/RU.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/SK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use vars qw($VERSION);

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/UA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Carp;

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

sub holidays {
my ($self, %params) = @_;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/UK.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base qw(Date::Holidays::Adapter::GB);

use vars qw($VERSION);

$VERSION = '1.26';
$VERSION = '1.27';

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/US.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
2 changes: 1 addition & 1 deletion lib/Date/Holidays/Adapter/USFederal.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Data::Dumper;

use base 'Date::Holidays::Adapter';

$VERSION = '1.26';
$VERSION = '1.27';

# sub new {
# my $class = shift;
Expand Down
2 changes: 1 addition & 1 deletion t/Test/Class/Date/Holidays.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 93d6499

Please sign in to comment.