Catalyst-Controller-ElasticSearch
view release on metacpan or search on metacpan
"recursive_test_files" => 1,
"requires" => {
"Catalyst" => "5.9",
"ElasticSearch" => "0.64",
"List::MoreUtils" => "0.33",
"MooseX::Attribute::Chained" => "v1.0.1"
},
"script_files" => [],
"test_requires" => {
"Catalyst::View::JSON" => 0,
"HTTP::Request::Common" => 0,
"Test::More" => "0.88"
}
);
unless ( eval { Module::Build->VERSION(0.4004) } ) {
my $tr = delete $module_build_args{test_requires};
my $br = $module_build_args{build_requires};
for my $mod ( keys %$tr ) {
if ( exists $br->{$mod} ) {
"requires" : {
"Catalyst" : "5.9",
"ElasticSearch" : "0.64",
"List::MoreUtils" : "0.33",
"MooseX::Attribute::Chained" : "v1.0.1"
}
},
"test" : {
"requires" : {
"Catalyst::View::JSON" : "0",
"HTTP::Request::Common" : "0",
"Test::More" : "0.88"
}
}
},
"provides" : {
"Catalyst::Controller::ElasticSearch" : {
"file" : "lib/Catalyst/Controller/ElasticSearch.pm",
"version" : "v0.1.0"
}
},
---
abstract: 'Thin proxy for ElasticSearch with some protection'
author:
- 'Moritz Onken <onken@netcubed.de>'
build_requires:
Catalyst::View::JSON: 0
HTTP::Request::Common: 0
Module::Build: 0.3601
Test::More: 0.88
configure_requires:
Module::Build: 0.3601
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300032, CPAN::Meta::Converter version 2.120921'
license: mit
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
requires "Catalyst" => "5.9";
requires "ElasticSearch" => "0.64";
requires "MooseX::Attribute::Chained" => "1.0.1";
requires "List::MoreUtils" => "0.33";
test_requires "HTTP::Request::Common";
test_requires "Catalyst::View::JSON";
t/000-report-versions-tiny.t view on Meta::CPAN
}
}
# So, we should be good, right?
return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n");
}
eval { $v .= pmver('Catalyst','5.9') };
eval { $v .= pmver('Catalyst::View::JSON','any version') };
eval { $v .= pmver('ElasticSearch','0.64') };
eval { $v .= pmver('HTTP::Request::Common','any version') };
eval { $v .= pmver('List::MoreUtils','0.33') };
eval { $v .= pmver('Module::Build','0.3601') };
eval { $v .= pmver('MooseX::Attribute::Chained','v1.0.1') };
eval { $v .= pmver('Pod::Coverage::TrustPod','any version') };
eval { $v .= pmver('Test::More','0.88') };
eval { $v .= pmver('Test::Pod','1.41') };
eval { $v .= pmver('Test::Pod::Coverage','1.08') };
eval { $v .= pmver('version','0.9901') };
t/lib/MyTest.pm view on Meta::CPAN
#
# This software is Copyright (c) 2013 by Moritz Onken.
#
# This is free software, licensed under:
#
# The MIT (X11) License
#
package MyTest;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;
use JSON;
use base 'Exporter';
our @EXPORT = qw(test_json GET POST encode_json);
my $app = require MyApp;
sub POST {
my ($target, %args) = @_;
return HTTP::Request::Common::POST($target, %args, "Content-Type" => "application/json");
}
sub test_json {
my ($req, $json, $msg) = @_;
test_psgi $app, sub {
my $cb = shift;
my $res = $cb->($req);
is($res->code, $json->{code} || 200);
# warn $res->content;
is_deeply( decode_json($res->content), $json, $msg );
( run in 0.571 second using v1.01-cache-2.11-cpan-de7293f3b23 )