Skip to content

Commit

Permalink
Implemented, ready to release.
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 23, 2010
0 parents commit 5b9bb1c
Show file tree
Hide file tree
Showing 12 changed files with 724 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
_build
blib
TAP-Parser-SourceHandler-*
MANIFEST
MANIFEST.bak
*META.*
Build
54 changes: 54 additions & 0 deletions Build.PL
@@ -0,0 +1,54 @@
use strict;
use warnings;
use Module::Build;

my $class = Module::Build->subclass(
class => 'My::Builder',
code => q{
sub ACTION_code {
use File::Spec::Functions;
my $self = shift;
$self->SUPER::ACTION_code(@_);
# Copy the test scripts and then set the shebang line and make
# sure that they're executable.
my $to_dir = $self->localize_file_path("t/scripts");
my $from = $self->localize_file_path("t/bin/mysql");
my $to = $self->localize_file_path("$to_dir/mysql");
$self->copy_if_modified(
from => $from,
to_dir => $to_dir,
flatten => 1,
);
$self->fix_shebang_line($to);
$self->make_executable($to);
$self->add_to_cleanup($to_dir);
}
},
);

$class->new(
module_name => 'TAP::Parser::SourceHandler::MyTAP',
license => 'perl',
configure_requires => {
'Module::Build' => '0.30',
},
build_requires => {
'Module::Build' => '0.30',
'Test::More' => '0.88',
},
requires => {
'TAP::Parser::SourceHandler' => 0,
'perl' => 5.006000,
},
recommends => {
'Test::Pod' => '1.41',
'Test::Pod::Coverage' => '1.06',
},
meta_merge => {
resources => {
homepage => 'http://search.cpan.org/dist/Tap-Parser-Sourcehandler-MyTAP/',
bugtracker => 'http://github.com/theory/tap-parser-sourcehandler-mytap/issues/',
repository => 'http://github.com/theory/tap-parser-sourcehandler-mytap/tree/',
}
},
)->create_build_script;
5 changes: 5 additions & 0 deletions Changes
@@ -0,0 +1,5 @@
Revision history for Perl extension DBIx::Connector.

3.22
- Initial version, with code borrowed from
TAP::Parser::SourceHandler::pgTAP.
33 changes: 33 additions & 0 deletions MANIFEST.SKIP
@@ -0,0 +1,33 @@
# Avoid version control files.
\bRCS\b
\bCVS\b
,v$
\B\.svn\b
\B\.git

# Avoid Makemaker generated and utility files.
\bMakefile$
\bblib
\bMakeMaker-\d
\bpm_to_blib$
\bblibdirs$
^MANIFEST\.SKIP$
^MYMETA

# Avoid Module::Build generated and utility files.
\bBuild$
\b_build

# Avoid temp and backup files.
~$
\.tmp$
\.old$
\.bak$
\#$
\b\.#

# Avoid build files.
^TAP-Parser-SourceHandler

# Avoid spelling test.
pod-spelling.t$
60 changes: 60 additions & 0 deletions README
@@ -0,0 +1,60 @@
TAP/Parser/SourceHandler/MyTAP version 3.22
===========================================

This module adds support for executing [MyTAP](http://github.com/theory/mytap)
MySQL tests under Test::Harness and C<prove>. This is useful for executing
your Perl tests and your MySQL tests together, and analysing their results.

Most likely. you'll want to use it with C<prove> to execute your Perl and
MyTAP tests:

prove --source Perl \
--ext .t --ext .my \
--source MyTAP --mytap-option dbname=try \
--mytap-option username=postgres \
--mytap-option suffix=.my

Or in F<Build.PL> for your application with MyTAP tests in F<t/*.my>:

Module::Build->new(
module_name => 'MyApp',
test_file_exts => [qw(.t .my)],
use_tap_harness => 1,
tap_harness_args => {
sources => {
Perl => undef,
MyTAP => {
dbname => 'try',
username => 'root',
suffix => '.my',
},
}
},
build_requires => {
'Module::Build' => '0.30',
'TAP::Parser::SourceHandler::MyTAP' => '3.22',
},
)->create_build_script;

Installation
------------

To install this module, type the following:

perl Build.PL
./Build
./Build test
./Build install

Dependencies
------------

TAP::Parser::SourceHandler::MyTAP requires TAP::Parser::SourceHandler.

Copyright and Licence
---------------------

Copyright (c) 2010 David E. Wheeler. Some Rights Reserved.

This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

0 comments on commit 5b9bb1c

Please sign in to comment.