MANIFEST
Makefile.old
Catalyst-Controller-MovableType-*
-
+*~
NAME
Catalyst::Controller::MovableType - Run Movable Type through Catalyst
+SYNOPSIS
+ package MyApp::Controller::Mt;
+
+ use Moose; BEGIN {extends 'Catalyst::Controller::MT'; } use utf8;
+
+ 1;
+
+INSTALLATION
+ Install Movable Type by extracting the zip into your template root
+ directory. Move mt-static to root/static/mt, and configure Movable Type
+ accordingly.
+
+DESCRIPTION
+ Runs Movable Type 5 through Catalyst. Download Movable Type 5 from
+ http://www.movabletype.org/
+
+METHODS
+ run_mt_script
+ Runs the requested Movable Type .cgi script transparently with
+ cgi_to_response.
+
+ not_found
+ Sets the response to a simple 404 Not found page. You can override this
+ method with your own.
+
+BUGS
+ None known.
+
+SEE ALSO
+ Catalyst::Controller::WrapCGI
+
+AUTHOR
+ Oskari 'Okko' Ojala <perl@okko.net>
+
+CONTRIBUTORS
+ Matt S. Trout <mst@shadowcatsystems.co.uk>
+
COPYRIGHT & LICENSE
Copyright 2010 the above author(s).
This sofware is free software, and is licensed under the same terms as
Perl itself.
+
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-add-notify.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-atom.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-check.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-comments.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-config.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-feed.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-ftsearch.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-search.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-tb.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-testbg.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-upgrade.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-wizard.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt-xmlrpc.cgi";
--- /dev/null
+#!/usr/bin/env perl
+print "Content-type: text/plain\r\n\r\nThis is mt.cgi";
--- /dev/null
+package TestApp::Controller::Mt;
+
+use Moose;
+BEGIN {extends 'Catalyst::Controller::MovableType'; }
+use utf8;
+
+__PACKAGE__->config(
+ mt_home => 't/cgi-bin/' # Tests don't have a real Movable Type, so this is just to satisfy the controller.
+ );
+
+1;
+
$mech->get_ok('http://localhost/', 'get main page');
$mech->content_like(qr/it works/i, 'see if it has our text');
+foreach my $script_name qw( mt-add-notify.cgi
+ mt-atom.cgi
+ mt.cgi
+ mt-comments.cgi
+ mt-feed.cgi
+ mt-ftsearch.cgi
+ mt-search.cgi
+ mt-tb.cgi
+ mt-testbg.cgi
+ mt-upgrade.cgi
+ mt-wizard.cgi
+ mt-xmlrpc.cgi
+ ) {
+ # mt-config.cgi intentionally left out
+ my $mech = Test::WWW::Mechanize::Catalyst->new;
+ $mech->get_ok('http://localhost/mt/'.$script_name, 'get '.$script_name.' cgi');
+ $mech->content_like(qr/This is $script_name/, 'cgi script properly executed through Catalyst');
+}
+
+# TODO: test for mt-check.cgi to only work in $c->debug mode.
+
done_testing;