Permalink
Browse files

Implemented, ready to release.

  • Loading branch information...
0 parents commit 5b9bb1c4e603380915622633839236cbc4d712dc @theory committed Jul 23, 2010
Showing with 724 additions and 0 deletions.
  1. +7 −0 .gitignore
  2. +54 −0 Build.PL
  3. +5 −0 Changes
  4. +33 −0 MANIFEST.SKIP
  5. +60 −0 README
  6. +333 −0 lib/TAP/Parser/SourceHandler/MyTAP.pm
  7. +3 −0 t/bin/mysql
  8. +10 −0 t/pod-coverage.t
  9. +15 −0 t/pod-spelling.t
  10. +7 −0 t/pod.t
  11. +6 −0 t/source.my
  12. +191 −0 t/source_handler.t
@@ -0,0 +1,7 @@
+_build
+blib
+TAP-Parser-SourceHandler-*
+MANIFEST
+MANIFEST.bak
+*META.*
+Build
@@ -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;
@@ -0,0 +1,5 @@
+Revision history for Perl extension DBIx::Connector.
+
+3.22
+ - Initial version, with code borrowed from
+ TAP::Parser::SourceHandler::pgTAP.
@@ -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 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.
Oops, something went wrong.

0 comments on commit 5b9bb1c

Please sign in to comment.