Some OCD cleanup; addition of Travis and Coveralls
This commit is contained in:
24
.gitignore
vendored
24
.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
blib/
|
/blib/
|
||||||
.build/
|
/.build/
|
||||||
_build/
|
_build/
|
||||||
cover_db/
|
cover_db/
|
||||||
inc/
|
inc/
|
||||||
@@ -7,14 +7,14 @@ Build
|
|||||||
!Build/
|
!Build/
|
||||||
Build.bat
|
Build.bat
|
||||||
.last_cover_stats
|
.last_cover_stats
|
||||||
Makefile
|
/Makefile
|
||||||
Makefile.old
|
/Makefile.old
|
||||||
MANIFEST.bak
|
/MANIFEST.bak
|
||||||
META.yml
|
/META.yml
|
||||||
MYMETA.yml
|
/META.json
|
||||||
|
/MYMETA.*
|
||||||
nytprof.out
|
nytprof.out
|
||||||
pm_to_blib
|
/pm_to_blib
|
||||||
.tar.gz
|
*.o
|
||||||
.lwpcookies
|
*.bs
|
||||||
.tmp
|
dest
|
||||||
SQL-Abstract-Complete-*
|
|
||||||
|
|||||||
31
.travis.yml
Normal file
31
.travis.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
language: perl
|
||||||
|
perl:
|
||||||
|
- blead
|
||||||
|
- 5.20
|
||||||
|
- 5.18
|
||||||
|
- 5.16
|
||||||
|
- 5.14
|
||||||
|
env: PERL_CPANM_OPT="--quiet --notest --force --skip-satisfied"
|
||||||
|
before_install:
|
||||||
|
- git clone git://github.com/haarg/perl-travis-helper
|
||||||
|
- source perl-travis-helper/init
|
||||||
|
- build-perl
|
||||||
|
- perl -V
|
||||||
|
- cpanm -v -n -f Test::Pod Test::Pod::Coverage Test::CheckManifest Devel::Cover::Report::Coveralls
|
||||||
|
- git config --global github.user gryphonshafer
|
||||||
|
install:
|
||||||
|
- export RELEASE_TESTING=1 AUTOMATED_TESTING=1 AUTHOR_TESTING=1 HARNESS_OPTIONS=c HARNESS_TIMER=1
|
||||||
|
- cpanm -v -n --installdeps .
|
||||||
|
script:
|
||||||
|
- perl Makefile.PL && make test
|
||||||
|
- PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine prove -lrsv t
|
||||||
|
- cover
|
||||||
|
after_success:
|
||||||
|
- cover -report coveralls
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
on_failure: always
|
||||||
|
on_success: change
|
||||||
|
recipients:
|
||||||
|
- gryphon@gryphonshafer.com
|
||||||
3
Changes
3
Changes
@@ -5,3 +5,6 @@ Revision history for SQL::Abstract::Complete
|
|||||||
|
|
||||||
1.03 Mon Jun 10 16:49:35 PDT 2013
|
1.03 Mon Jun 10 16:49:35 PDT 2013
|
||||||
Switch from Clone::Fast to Storable dclone for deep copy
|
Switch from Clone::Fast to Storable dclone for deep copy
|
||||||
|
|
||||||
|
1.04 Wed Sep 25 10:00:58 PDT 2014
|
||||||
|
Some OCD cleanup; addition of Travis and Coveralls.
|
||||||
|
|||||||
7
MANIFEST
7
MANIFEST
@@ -1,10 +1,9 @@
|
|||||||
Changes
|
Changes
|
||||||
MANIFEST
|
|
||||||
Makefile.PL
|
|
||||||
README
|
|
||||||
lib/SQL/Abstract/Complete.pm
|
lib/SQL/Abstract/Complete.pm
|
||||||
|
Makefile.PL
|
||||||
|
MANIFEST
|
||||||
|
README.md
|
||||||
t/00-load.t
|
t/00-load.t
|
||||||
t/boilerplate.t
|
|
||||||
t/Complete.t
|
t/Complete.t
|
||||||
t/manifest.t
|
t/manifest.t
|
||||||
t/pod-coverage.t
|
t/pod-coverage.t
|
||||||
|
|||||||
34
Makefile.PL
34
Makefile.PL
@@ -1,21 +1,31 @@
|
|||||||
|
#!/usr/bin/env perl
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use ExtUtils::MakeMaker;
|
use ExtUtils::MakeMaker;
|
||||||
|
|
||||||
WriteMakefile(
|
WriteMakefile(
|
||||||
NAME => 'SQL::Abstract::Complete',
|
'NAME' => 'SQL::Abstract::Complete',
|
||||||
AUTHOR => q{Gryphon Shafer <gryphon@cpan.org>},
|
'AUTHOR' => 'Gryphon Shafer <gryphon@cpan.org>',
|
||||||
VERSION_FROM => 'lib/SQL/Abstract/Complete.pm',
|
'VERSION_FROM' => 'lib/SQL/Abstract/Complete.pm',
|
||||||
ABSTRACT_FROM => 'lib/SQL/Abstract/Complete.pm',
|
'ABSTRACT_FROM' => 'lib/SQL/Abstract/Complete.pm',
|
||||||
($ExtUtils::MakeMaker::VERSION >= 6.3002
|
'PL_FILES' => {},
|
||||||
? ('LICENSE'=> 'perl')
|
'MIN_PERL_VERSION' => '5.010',
|
||||||
: ()),
|
'PREREQ_PM' => {
|
||||||
PL_FILES => {},
|
|
||||||
PREREQ_PM => {
|
|
||||||
'Test::More' => 0,
|
|
||||||
'SQL::Abstract' => 1.5,
|
'SQL::Abstract' => 1.5,
|
||||||
'Storable' => 0,
|
'Storable' => 0,
|
||||||
|
'Test::Most' => 0,
|
||||||
},
|
},
|
||||||
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
|
'dist' => { 'COMPRESS' => 'gzip -9f', 'SUFFIX' => 'gz' },
|
||||||
clean => { FILES => 'SQL-Abstract-Complete-*' },
|
'clean' => { 'FILES' => 'SQL-Abstract-Complete-*' },
|
||||||
|
( $ExtUtils::MakeMaker::VERSION >= 6.3002 ? ( 'LICENSE' => 'perl' ) : () ),
|
||||||
|
( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? ( 'META_MERGE' => {
|
||||||
|
'meta-spec' => { version => 2 },
|
||||||
|
'resources' => {
|
||||||
|
'repository' => {
|
||||||
|
'type' => 'git',
|
||||||
|
'url' => 'https://github.com/gryphonshafer/SQL-Abstract-Complete.git',
|
||||||
|
'web' => 'https://github.com/gryphonshafer/SQL-Abstract-Complete',
|
||||||
|
},
|
||||||
|
} } ) : ()
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
SQL::Abstract::Complete - Generate complete SQL from Perl data structures
|
# SQL::Abstract::Complete - Generate complete SQL from Perl data structures
|
||||||
|
|
||||||
This module was inspired by the excellent SQL::Abstract, from which in
|
This module was inspired by the excellent SQL::Abstract, from which in
|
||||||
inherits. However, in trying to use the module, I found that what I really
|
inherits. However, in trying to use the module, I found that what I really
|
||||||
@@ -7,12 +7,14 @@ by clauses. So, I set out to create a more complete abstract SQL generation
|
|||||||
module. (To be fair, SQL::Abstract kept it's first $table argument
|
module. (To be fair, SQL::Abstract kept it's first $table argument
|
||||||
inflexible for backwards compatibility reasons.)
|
inflexible for backwards compatibility reasons.)
|
||||||
|
|
||||||
|
[](https://travis-ci.org/gryphonshafer/SQL-Abstract-Complete)
|
||||||
|
[](https://coveralls.io/r/gryphonshafer/SQL-Abstract-Complete)
|
||||||
|
|
||||||
This module only changes the select() method and adds a small new wrinkle to
|
This module only changes the select() method and adds a small new wrinkle to
|
||||||
new(). Everything else from SQL::Abstract is inheritted as-is. Consequently,
|
new(). Everything else from SQL::Abstract is inheritted as-is. Consequently,
|
||||||
you should read the SQL::Abstract documentation before continuing.
|
you should read the SQL::Abstract documentation before continuing.
|
||||||
|
|
||||||
|
## Installation
|
||||||
INSTALLATION
|
|
||||||
|
|
||||||
To install this module, run the following commands:
|
To install this module, run the following commands:
|
||||||
|
|
||||||
@@ -21,7 +23,7 @@ To install this module, run the following commands:
|
|||||||
make test
|
make test
|
||||||
make install
|
make install
|
||||||
|
|
||||||
SUPPORT AND DOCUMENTATION
|
## Support and Documentation
|
||||||
|
|
||||||
After installing, you can find documentation for this module with the
|
After installing, you can find documentation for this module with the
|
||||||
perldoc command.
|
perldoc command.
|
||||||
@@ -30,23 +32,14 @@ perldoc command.
|
|||||||
|
|
||||||
You can also look for information at:
|
You can also look for information at:
|
||||||
|
|
||||||
RT, CPAN's request tracker
|
- [GitHub](https://github.com/gryphonshafer/SQL-Abstract-Complete "GitHub")
|
||||||
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SQL-Abstract-Complete
|
- [AnnoCPAN](http://annocpan.org/dist/SQL-Abstract-Complete "AnnoCPAN")
|
||||||
|
- [CPAN Ratings](http://cpanratings.perl.org/m/SQL-Abstract-Complete "CPAN Ratings")
|
||||||
|
- [Search CPAN](http://search.cpan.org/dist/SQL-Abstract-Complete "Search CPAN")
|
||||||
|
|
||||||
AnnoCPAN, Annotated CPAN documentation
|
## Author and License
|
||||||
http://annocpan.org/dist/SQL-Abstract-Complete
|
|
||||||
|
|
||||||
CPAN Ratings
|
Gryphon Shafer, [gryphon@cpan.org](mailto:gryphon@cpan.org "Email Gryphon Shafer")
|
||||||
http://cpanratings.perl.org/d/SQL-Abstract-Complete
|
|
||||||
|
|
||||||
Search CPAN
|
|
||||||
http://search.cpan.org/dist/SQL-Abstract-Complete/
|
|
||||||
|
|
||||||
|
|
||||||
AUTHOR AND LICENSE
|
|
||||||
|
|
||||||
Gryphon Shafer, gryphon@cpan.org
|
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the same terms as Perl itself, either Perl version 5.8.4 or,
|
it under the same terms as Perl itself.
|
||||||
at your option, any later version of Perl 5 you may have available.
|
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
package SQL::Abstract::Complete;
|
package SQL::Abstract::Complete;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use SQL::Abstract 1.5;
|
use SQL::Abstract 1.5;
|
||||||
use Storable 'dclone';
|
use Storable 'dclone';
|
||||||
|
|
||||||
use vars '@ISA';
|
use vars '@ISA';
|
||||||
@ISA = 'SQL::Abstract';
|
@ISA = 'SQL::Abstract';
|
||||||
|
|
||||||
our $VERSION = '1.03';
|
our $VERSION = '1.04';
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
@@ -140,7 +142,7 @@ sub select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
@@ -334,7 +336,6 @@ Gryphon Shafer E<lt>gryphon@cpan.orgE<gt>.
|
|||||||
=head1 LICENSE
|
=head1 LICENSE
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify
|
This library is free software; you can redistribute it and/or modify
|
||||||
it under the same terms as Perl itself, either Perl version 5.8.4 or,
|
it under the same terms as Perl itself.
|
||||||
at your option, any later version of Perl 5 you may have available.
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|||||||
10
t/00-load.t
10
t/00-load.t
@@ -1,8 +1,6 @@
|
|||||||
#!perl -T
|
#!/usr/bin/env perl
|
||||||
use Test::More tests => 1;
|
use Test::Most;
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
use_ok( 'SQL::Abstract::Complete' ) || print "Bail out!\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
BEGIN { use_ok('SQL::Abstract::Complete') }
|
||||||
diag( "Testing SQL::Abstract::Complete $SQL::Abstract::Complete::VERSION, Perl $], $^X" );
|
diag( "Testing SQL::Abstract::Complete $SQL::Abstract::Complete::VERSION, Perl $], $^X" );
|
||||||
|
done_testing();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Test::More 'tests' => 22;
|
use Test::Most;
|
||||||
|
|
||||||
use constant MODULE => 'SQL::Abstract::Complete';
|
use constant MODULE => 'SQL::Abstract::Complete';
|
||||||
|
|
||||||
@@ -147,3 +147,5 @@ is(
|
|||||||
|
|
||||||
is( $sac->_sqlcase('from'), 'FROM', q{$sac->_sqlcase('from')} );
|
is( $sac->_sqlcase('from'), 'FROM', q{$sac->_sqlcase('from')} );
|
||||||
is( $sac->_sqlcase(undef), '', '$sac->_sqlcase(undef)' );
|
is( $sac->_sqlcase(undef), '', '$sac->_sqlcase(undef)' );
|
||||||
|
|
||||||
|
done_testing;
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
#!perl -T
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Test::More tests => 3;
|
|
||||||
|
|
||||||
sub not_in_file_ok {
|
|
||||||
my ($filename, %regex) = @_;
|
|
||||||
open( my $fh, '<', $filename ) or die "couldn't open $filename for reading: $!";
|
|
||||||
|
|
||||||
my %violated;
|
|
||||||
|
|
||||||
while (my $line = <$fh>) {
|
|
||||||
while (my ($desc, $regex) = each %regex) {
|
|
||||||
if ($line =~ $regex) {
|
|
||||||
push @{$violated{$desc}||=[]}, $.;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (%violated) {
|
|
||||||
fail("$filename contains boilerplate text");
|
|
||||||
diag "$_ appears on lines @{$violated{$_}}" for ( keys %violated );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
pass("$filename contains no boilerplate text");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub module_boilerplate_ok {
|
|
||||||
my ($module) = @_;
|
|
||||||
not_in_file_ok($module =>
|
|
||||||
'the great new $MODULENAME' => qr/ - The great new /,
|
|
||||||
'boilerplate description' => qr/Quick summary of what the module/,
|
|
||||||
'stub function definition' => qr/function[12]/,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
TODO: {
|
|
||||||
local $TODO = "Need to replace the boilerplate text";
|
|
||||||
|
|
||||||
not_in_file_ok(README =>
|
|
||||||
"The README is used..." => qr/The README is used/,
|
|
||||||
"'version information here'" => qr/to provide version information/,
|
|
||||||
);
|
|
||||||
|
|
||||||
not_in_file_ok(Changes =>
|
|
||||||
"placeholder date/time" => qr(Date/time)
|
|
||||||
);
|
|
||||||
|
|
||||||
module_boilerplate_ok('lib/SQL/Abstract/Complete.pm');
|
|
||||||
}
|
|
||||||
18
t/manifest.t
18
t/manifest.t
@@ -1,8 +1,12 @@
|
|||||||
#!perl -T
|
#!/usr/bin/env perl
|
||||||
use strict;
|
use Test::Most;
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
eval "use Test::CheckManifest 0.9";
|
eval('use Test::CheckManifest 0.9');
|
||||||
plan skip_all => "Test::CheckManifest 0.9 required" if $@;
|
plan( 'skip_all' => "Test::CheckManifest 0.9 required" ) if $@;
|
||||||
ok_manifest({filter => [qr/\.git/]});
|
ok_manifest( { 'filter' => [
|
||||||
|
qr/\.git/,
|
||||||
|
qr/\.travis\.yml$/,
|
||||||
|
qr/perl-travis-helper/,
|
||||||
|
qr/cover_db/,
|
||||||
|
] } );
|
||||||
|
done_testing();
|
||||||
|
|||||||
@@ -1,19 +1,13 @@
|
|||||||
#!perl -T
|
#!/usr/bin/env perl
|
||||||
use strict;
|
use Test::Most;
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
# Ensure a recent version of Test::Pod::Coverage
|
|
||||||
my $min_tpc = 1.08;
|
my $min_tpc = 1.08;
|
||||||
eval "use Test::Pod::Coverage $min_tpc";
|
eval("use Test::Pod::Coverage $min_tpc");
|
||||||
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
|
plan( 'skip_all' => "Test::Pod::Coverage $min_tpc required for testing POD coverage" ) if $@;
|
||||||
if $@;
|
|
||||||
|
|
||||||
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
|
|
||||||
# but older versions don't recognize some common documentation styles
|
|
||||||
my $min_pc = 0.18;
|
my $min_pc = 0.18;
|
||||||
eval "use Pod::Coverage $min_pc";
|
eval("use Pod::Coverage $min_pc");
|
||||||
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
|
plan( 'skip_all' => "Pod::Coverage $min_pc required for testing POD coverage" ) if $@;
|
||||||
if $@;
|
|
||||||
|
|
||||||
all_pod_coverage_ok();
|
all_pod_coverage_ok( { 'trustme' => ['BUILD'] } );
|
||||||
|
done_testing();
|
||||||
|
|||||||
12
t/pod.t
12
t/pod.t
@@ -1,11 +1,9 @@
|
|||||||
#!perl -T
|
#!/usr/bin/env perl
|
||||||
use strict;
|
use Test::Most;
|
||||||
use warnings;
|
|
||||||
use Test::More;
|
|
||||||
|
|
||||||
# Ensure a recent version of Test::Pod
|
|
||||||
my $min_tp = 1.22;
|
my $min_tp = 1.22;
|
||||||
eval "use Test::Pod $min_tp";
|
eval("use Test::Pod $min_tp");
|
||||||
plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
|
plan( 'skip_all' => "Test::Pod $min_tp required for testing POD" ) if $@;
|
||||||
|
|
||||||
all_pod_files_ok();
|
all_pod_files_ok();
|
||||||
|
done_testing();
|
||||||
|
|||||||
Reference in New Issue
Block a user