Catalyst-Plugin-ErrorCatcher

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

  Catalyst::Plugin::StackTrace: '0.10'
  Catalyst::Runtime: '5.80'
  Catalyst::Test: '0'
  Config::General: '0'
  DateTime: '0'
  File::Find::Rule: '0'
  File::Path: '0'
  File::Slurp: '0'
  File::Spec::Functions: '0'
  FindBin::libs: '0'
  HTTP::Request::Common: '0'
  IO::File: '0'
  MIME::Lite: '0'
  MRO::Compat: '0'
  Path::Class: '0'
  Sys::Hostname: '0'
  Test::Exception: '0'
  Test::More: '0.92'
  Test::UseAllModules: '0'
  base: '0'
  namespace::autoclean: '0'

Makefile.PL  view on Meta::CPAN

    "Catalyst::Plugin::StackTrace" => "0.10",
    "Catalyst::Runtime" => "5.80",
    "Catalyst::Test" => 0,
    "Config::General" => 0,
    "DateTime" => 0,
    "File::Find::Rule" => 0,
    "File::Path" => 0,
    "File::Slurp" => 0,
    "File::Spec::Functions" => 0,
    "FindBin::libs" => 0,
    "HTTP::Request::Common" => 0,
    "IO::File" => 0,
    "MIME::Lite" => 0,
    "MRO::Compat" => 0,
    "Path::Class" => 0,
    "Sys::Hostname" => 0,
    "Test::Exception" => 0,
    "Test::More" => "0.92",
    "Test::UseAllModules" => 0,
    "base" => 0,
    "namespace::autoclean" => 0,

Makefile.PL  view on Meta::CPAN

  "Config::General" => 0,
  "Data::Dump" => 0,
  "DateTime" => 0,
  "ExtUtils::MakeMaker" => 0,
  "File::Find::Rule" => 0,
  "File::Path" => 0,
  "File::Slurp" => 0,
  "File::Spec::Functions" => 0,
  "File::Type" => 0,
  "FindBin::libs" => 0,
  "HTTP::Request::Common" => 0,
  "IO::File" => 0,
  "MIME::Lite" => 0,
  "MRO::Compat" => 0,
  "Module::Pluggable::Object" => 0,
  "Moose" => 0,
  "Path::Class" => 0,
  "Sys::Hostname" => 0,
  "Test::Exception" => 0,
  "Test::More" => "0.92",
  "Test::UseAllModules" => 0,

t/04.trace.t  view on Meta::CPAN

    # we should have the get header and lines with the key-value pairs
    _has_QUERY_output($ec_msg);
    # we should have keys and values for each query param
    _has_keys_for_section('QUERY', [qw(one went long_thingy)], $ec_msg);
}
# test output with BODY params
{
    # we still need to get to $c
    ok ( my (undef,$c) = ctx_request('http://localhost/ok'), 'setup $c for BODY');
    # make a request with BODY data
    use HTTP::Request::Common;
    my $response = request POST '/foo/referer', [
        bar         => 'baz',
        something   => 'else'
    ];

    my $ec_msg;
    eval{ $ec_msg = $c->_errorcatcher_msg };
    ok( defined $ec_msg, 'parsed error message ok' );

    # we should have some referer information

t/04.trace.t  view on Meta::CPAN

    # we should have the get header and lines with the key-value pairs
    _has_BODY_output($ec_msg);
    # we should have keys and values for each query param
    _has_keys_for_section('BODY', [qw(bar something)], $ec_msg);
}
# test output with both QUERY and BODY params
{
    # we still need to get to $c; this appears to be the only way
    ok ( my (undef,$c) = ctx_request('http://localhost/ok'), 'setup $c for BODY');
    # make a request with BODY data
    use HTTP::Request::Common;
    my $response = request POST '/foo/referer?fruit=banana&animal=kangaroo', [
        vampire     => 'joe random',
        slayer      => 'kendra'
    ];

    my $ec_msg;
    eval{ $ec_msg = $c->_errorcatcher_msg };
    ok( defined $ec_msg, 'parsed error message ok' );

    # we should have some referer information

t/04.trace.t  view on Meta::CPAN

    _has_BODY_output($ec_msg);
    # we should have keys and values for each query param
    _has_keys_for_section('BODY', [qw(vampire slayer)], $ec_msg);
}
# test output with both QUERY and BODY params
# - test with a case where we don't set the referer
{
    # we still need to get to $c; this appears to be the only way
    ok ( my (undef,$c) = ctx_request('http://localhost/ok'), 'setup $c for POST');
    # make a request with BODY data
    use HTTP::Request::Common;
    my $response = request POST '/foo/not_ok?fruit=banana&animal=kangaroo', [
        vampire     => 'joe random',
        slayer      => 'kendra'
    ];

    my $ec_msg;
    eval{ $ec_msg = $c->_errorcatcher_msg };
    ok( defined $ec_msg, 'parsed error message ok' );

    # we should have some referer information

t/04.trace.t  view on Meta::CPAN

    # we should have the get header and lines with the key-value pairs
    _has_BODY_output($ec_msg);
    # we should have keys and values for each query param
    _has_keys_for_section('BODY', [qw(vampire slayer)], $ec_msg);
}
# test output with long values in parameters
{
    # we still need to get to $c; this appears to be the only way
    ok ( my (undef,$c) = ctx_request('http://localhost/ok'), 'setup $c for POST');
    # make a request with BODY data
    use HTTP::Request::Common;
    my $response = request POST '/foo/not_ok?integer=69&fruit=' . 'banana' x 10, [
        long_text => 'kangaroo' x 8,
        normal    => 'short_thing',
        evil      => "two\nlines",
        # pad out the file types we're fakng so we aren't short enough to just
        # return
        image_gif => 'GIF87a'   . 'Z' x 100,
        image_png => "\x89PNG"  . 'Z' x 100,
        pdf_file  => '%PDF-'    . 'Z' x 100,
    ];



( run in 0.486 second using v1.01-cache-2.11-cpan-de7293f3b23 )