From: Tomas Doran Date: Mon, 26 Dec 2011 23:01:56 +0000 (+0000) Subject: Skeleton X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalystX-UriFor-Curried.git;a=commitdiff_plain;h=a42fd357039a10977791f835eaa47c40e6dcea6b Skeleton --- a42fd357039a10977791f835eaa47c40e6dcea6b diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b85eda --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +MANIFEST.bak +cover_db +META.yml +Makefile +blib +inc +pm_to_blib +MANIFEST +Makefile.old +CatalystX-UriFor-Curried-* + diff --git a/Changes b/Changes new file mode 100644 index 0000000..e69de29 diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..952b0d3 --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,11 @@ +.git/ +blib +pm_to_blib +MANIFEST.bak +MANIFEST.SKIP~ +cover_db +Makefile$ +Makefile.old$ +^CatalystX-UriFor-Curried- +^.gitignore + diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..37a96e9 --- /dev/null +++ b/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 'CatalystX-UriFor-Curried'; +all_from 'lib/CatalystX/UriFor/Curried.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/CatalystX/UriFor/Curried.pm > README") + and die $!; +} + +WriteAll(); diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/lib/CatalystX/UriFor/Curried.pm b/lib/CatalystX/UriFor/Curried.pm new file mode 100644 index 0000000..3de3487 --- /dev/null +++ b/lib/CatalystX/UriFor/Curried.pm @@ -0,0 +1,26 @@ +package CatalystX::UriFor::Curried; +use Moose; +use namespace::autoclean; + +1; + +=head1 NAME + +CatalystX::UriFor::Curried - + +=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 + diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..883aa8f --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use_ok 'CatalystX::UriFor::Curried'; + +done_testing; diff --git a/t/author/pod-coverage.t b/t/author/pod-coverage.t new file mode 100644 index 0000000..83b1a5d --- /dev/null +++ b/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(); diff --git a/t/author/pod.t b/t/author/pod.t new file mode 100644 index 0000000..08d2afd --- /dev/null +++ b/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(); diff --git a/t/lib/Makefile.PL b/t/lib/Makefile.PL new file mode 100644 index 0000000..e69de29 diff --git a/t/lib/TestApp.pm b/t/lib/TestApp.pm new file mode 100644 index 0000000..a18a1ef --- /dev/null +++ b/t/lib/TestApp.pm @@ -0,0 +1,11 @@ +package TestApp; +use Moose; +use namespace::autoclean; + +use Catalyst; + +extends 'Catalyst'; + +__PACKAGE__->setup; + +1; diff --git a/t/lib/TestApp/Controller/Root.pm b/t/lib/TestApp/Controller/Root.pm new file mode 100644 index 0000000..6bbaa52 --- /dev/null +++ b/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('

It works

'); +} + +__PACKAGE__->meta->make_immutable; diff --git a/t/lib/script/testapp_server.pl b/t/lib/script/testapp_server.pl new file mode 100644 index 0000000..b42c26f --- /dev/null +++ b/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; diff --git a/t/lib/script/testapp_test.pl b/t/lib/script/testapp_test.pl new file mode 100644 index 0000000..1cc8d04 --- /dev/null +++ b/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; diff --git a/t/live-test.t b/t/live-test.t new file mode 100644 index 0000000..4ca1c81 --- /dev/null +++ b/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;