Skip to content

Commit

Permalink
Initial skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
dorward committed Dec 3, 2009
0 parents commit c18b7f9
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
@@ -0,0 +1,10 @@
cover_db
META.yml
Makefile
blib
inc
pm_to_blib
MANIFEST
Makefile.old
Catalyst-TraitFor-View-MarkupValidation-*

Empty file added Changes
Empty file.
11 changes: 11 additions & 0 deletions MANIFEST.SKIP
@@ -0,0 +1,11 @@
.git/
blib
pm_to_blib
MANIFEST.bak
MANIFEST.SKIP~
cover_db
Makefile$
Makefile.old$
^Catalyst-TraitFor-View-MarkupValidation-
^.gitignore

29 changes: 29 additions & 0 deletions Makefile.PL
@@ -0,0 +1,29 @@
use strict;
use warnings;
use inc::Module::Install 0.91;
use Module::Install::AuthorRequires;
use Module::Install::AuthorTests;

name 'Catalyst-TraitFor-View-MarkupValidation';
all_from 'lib/Catalyst/TraitFor/View/MarkupValidation.pm';

requires 'Moose';
requires 'namespace::autoclean';

build_requires 'Catalyst::Runtime' => '5.80015';
build_requires 'Test::WWW::Mechanize::Catalyst';
build_requires 'Test::More' => '0.88';

author_requires 'Test::Pod::Coverage' => '1.04';
author_requires 'Test::Pod' => '1.14';

author_tests 't/author';

resources repository => 'git://somewhere.com/myproject.git';

if ($Module::Install::AUTHOR) {
system("pod2text lib/Catalyst/TraitFor/View/MarkupValidation.pm > README")
and die $!;
}

WriteAll();
Empty file added README
Empty file.
26 changes: 26 additions & 0 deletions lib/Catalyst/TraitFor/View/MarkupValidation.pm
@@ -0,0 +1,26 @@
package Catalyst::TraitFor::View::MarkupValidation;
use Moose;
use namespace::autoclean;

1;

=head1 NAME
Catalyst::TraitFor::View::MarkupValidation -
=head1 DESCRIPTION
=head1 METHODS
=head1 BUGS
=head1 AUTHOR
=head1 COPYRIGHT & LICENSE
Copyright 2009 the above author(s).
This sofware is free software, and is licensed under the same terms as perl itself.
=cut

8 changes: 8 additions & 0 deletions t/00-load.t
@@ -0,0 +1,8 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use_ok 'Catalyst::TraitFor::View::MarkupValidation';

done_testing;
7 changes: 7 additions & 0 deletions t/author/pod-coverage.t
@@ -0,0 +1,7 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use Test::Pod::Coverage 1.04;
all_pod_coverage_ok();
7 changes: 7 additions & 0 deletions t/author/pod.t
@@ -0,0 +1,7 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use Test::Pod 1.14;
all_pod_files_ok();
Empty file added t/lib/Makefile.PL
Empty file.
11 changes: 11 additions & 0 deletions t/lib/TestApp.pm
@@ -0,0 +1,11 @@
package TestApp;
use Moose;
use namespace::autoclean;

use Catalyst;

extends 'Catalyst';

__PACKAGE__->setup;

1;
17 changes: 17 additions & 0 deletions t/lib/TestApp/Controller/Root.pm
@@ -0,0 +1,17 @@
package TestApp::Controller::Root;
use Moose;
use namespace::autoclean;

BEGIN { extends 'Catalyst::Controller' }

__PACKAGE__->config(namespace => q{});

sub base : Chained('/') PathPart('') CaptureArgs(0) {}

# your actions replace this one
sub main : Chained('base') PathPart('') Args(0) {
my ($self, $ctx) = @_;
$ctx->res->body('<h1>It works</h1>');
}

__PACKAGE__->meta->make_immutable;
10 changes: 10 additions & 0 deletions t/lib/script/testapp_server.pl
@@ -0,0 +1,10 @@
#!/usr/bin/env perl

BEGIN {
$ENV{CATALYST_SCRIPT_GEN} = 40;
}

use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('TestApp', 'Server');

1;
12 changes: 12 additions & 0 deletions t/lib/script/testapp_test.pl
@@ -0,0 +1,12 @@
#!/usr/bin/env perl

use strict;
use warnings;

use FindBin;
use lib "$FindBin::Bin/..";
use Catalyst::Test 'TestApp';

print request($ARGV[0])->content . "\n";

1;
20 changes: 20 additions & 0 deletions t/live-test.t
@@ -0,0 +1,20 @@
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;

# setup library path
use FindBin qw($Bin);
use lib "$Bin/lib";

# make sure testapp works
use ok 'TestApp';

# a live test against TestApp, the test application
use Test::WWW::Mechanize::Catalyst 'TestApp';
my $mech = Test::WWW::Mechanize::Catalyst->new;
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');

done_testing;

0 comments on commit c18b7f9

Please sign in to comment.