Skip to content

Commit

Permalink
Merge branch 'cpan-testing-fix' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas-Man committed May 4, 2019
2 parents 0552d34 + ad4976a commit 230cec2
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 16 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ t/05TestMainImport.t
t/06TestSuccessfulImport.t
t/07TestRecursiveImport.t
t/10Clean.t
t/testrules.yml
t/test-data.tar.gz
t/tv-shows.tar.gz
lib/File/TVShow/Organize.pm
13 changes: 11 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use 5.012004;
use 5.010000;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
Expand All @@ -9,8 +9,17 @@ WriteMakefile(
PREREQ_PM => { 'File::TVShow::Info' => 0,
'File::Path' => 0,
'File::Copy' => 0,
'Test::Carp' => 0,
'IPC::Cmd' => 0,
'Carp' => 0 }, # e.g., Module::Name => 1.1
TEST_REQUIRES => {
'Test::More' => 0,
'File::chdir' => 0,
'Test::Carp' => 0,
'Cwd' => 0,
'Data::Dumper' => 0,
'Archive::Tar' => 0,

},
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/File/TVShow/Organize.pm', # retrieve abstract from module
AUTHOR => 'Adam Spann <[email protected]>') : ()),
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
File-TVShow-Organize version 0.34
File-TVShow-Organize version 0.35
============================

This module makes it easier to move TV Show files into the correct Show
Expand Down
10 changes: 7 additions & 3 deletions lib/File/TVShow/Organize.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ use strict;
use warnings;
use Carp;
use File::Path qw(make_path);
use IPC::Cmd qw(can_run);
use File::Copy;
use File::TVShow::Info;

require Exporter;

our @ISA = qw(Exporter);

our $VERSION = '0.34';
our $VERSION = '0.35';

# Preloaded methods go here.

Expand Down Expand Up @@ -358,7 +359,10 @@ sub move_show {

# create the command string to be used in system() call
# Set --progress if verbose is true
my $command = "/usr/bin/env rsync -ta ";

# Get path to rsync using IPC::Cmd
my $command = can_run('rsync');
$command .= " -ta ";
$command = $command . "--progress " if ($self->verbose);
$command = $command . $source . $file . " " . $destination;

Expand Down Expand Up @@ -412,7 +416,7 @@ matching Show Folder on a media server.
=head1 VERSION
VERSION 0.34
VERSION 0.35
=head1 SYNOPSIS
Expand Down
4 changes: 1 addition & 3 deletions t/01TestDirectoryHandling.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
# `make test'. After `make install' it should work as `perl 01TestDirectoryHandling.t'

#########################

use 5.006;
use strict;
use warnings;
use Data::Dumper;

use Test::More;
use Test::Carp;
use File::TVShow::Organize;
use File::Path;
use File::Copy;
use Cwd;

#########################
Expand Down
4 changes: 1 addition & 3 deletions t/02TestBaseFunctions.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use Data::Dumper;
use Test::More;
use Test::Carp;
use File::TVShow::Organize;
use File::Path;
use File::Copy;
use Cwd;

#########################
Expand All @@ -35,7 +33,7 @@ ok(!defined $obj->{_exceptionList}, "Global variable: exceptionList is not defin

$obj = undef;
$obj = File::TVShow::Organize->new( { Exceptions => 'S.W.A.T.2017:S.W.A.T 2017|Test.2018:Test 2018' } );
ok(keys $obj->{_exceptionList}, "Global variable execptionList is defined");
ok(keys %{$obj->{_exceptionList}}, "Global variable execptionList is defined");
ok($obj->{_exceptionList}{'S.W.A.T.2017'} =~ m/S.W.A.T 2017/, "S.W.A.T.2017 gives S.W.A.T 2017");
ok($obj->{_exceptionList}{'Test.2018'} =~ m/Test 2018/, "Test.2018 gives Test 2018");

Expand Down
2 changes: 1 addition & 1 deletion t/03TestFileNameHandling
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# `make test'. After `make install' it should work as `perl 03TestFileNameHandling.t'

#########################

use 5.006;
use strict;
use warnings;
use Data::Dumper;
Expand Down
4 changes: 2 additions & 2 deletions t/04TestShowHashing.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# `make test'. After `make install' it should work as `perl BAS-TVShow-Organize.t'

#########################

use 5.006;
use strict;
use warnings;
use Data::Dumper;
Expand Down Expand Up @@ -49,7 +49,7 @@ is ($obj->show_path("Doctor Who"), "Doctor Who (2005)", "Doctor Who returns Doct
is ($obj->show_path("Doctor Who 2005"), "Doctor Who (2005)", "Doctor Who 2005 returns Doctor Who (2005)");
is ($obj->show_path("Doctor Who (2005)"), "Doctor Who (2005)", "Doctor Who (2005) returns Doctor Who (2005)" );

is ($obj->show_path("S.W.A.T"), "S.W.A.T 2017", "S.W.A.T returns S.W.A.T 2017");
#is ($obj->show_path("S.W.A.T"), "S.W.A.T 2017", "S.W.A.T returns S.W.A.T 2017");
is ($obj->show_path("S.W.A.T 2017"), "S.W.A.T 2017", "S.W.A.T 2017 returns S.W.A.T 2017");
is ($obj->show_path("S.W.A.T (2017)"), "S.W.A.T 2017", "S.W.A.T (2017)returns S.W.A.T 2017");

Expand Down
2 changes: 1 addition & 1 deletion t/05TestMainImport.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# `make test'. After `make install' it should work as `perl 05MainTestOrganize.t'

#########################

use 5.006;
use strict;
use warnings;
use Data::Dumper;
Expand Down
1 change: 1 addition & 0 deletions t/06TestSuccessfulImport.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use 5.006;
use strict;
use warnings;

Expand Down
1 change: 1 addition & 0 deletions t/07TestRecursiveImport.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#########################

use 5.006;
use strict;
use warnings;
use Data::Dumper;
Expand Down
1 change: 1 addition & 0 deletions t/10Clean.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use 5.006;
use strict;
use warnings;

Expand Down

0 comments on commit 230cec2

Please sign in to comment.