/find_job/;
use App::Yath::Schema::DateTimeFormat qw/DTF/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Util::Times qw/render_duration/;
use parent 'App::Yath::Server::Contr
h->execute($run->run_id, $ord);
return {ord => $ord, resources => [map { $_->{data} = decode_json($_->{data}); $_ } @{$sth->fetchall_arrayref({})}]};
}
sub res_ord {
my $self = shift;
my
ata = $self->get_up_to($run, $ord);
my $res = resp(200);
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
sub res_stream {
my $self = shift;
my (
00006'; # TRIAL
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase qw/-tit
[];
while (my $run = $runs->next) {
push @$data => $run->TO_JSON;
}
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
1;
__END__
=pod
=en
hare_dir/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase
t eq 'delete') {
$field->delete;
}
}
$res->content_type('application/json');
$res->raw_body($field);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAM
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
> 'Missing route') unless $route;
my $idx = $route->{idx} //= 0;
my $json = $route->{json};
my $project_name = $route->{project};
my $source = $route->{source};
il'}],
'+as' => ['job_try_id', 'job_try_ord', 'fail'],
},
);
unless($json) {
$res->content_type('text/plain');
my $body = join "\n" => map { $_->file } $fi
;
use strict;
use warnings;
our $VERSION = '2.000006'; # TRIAL
use Test2::Harness::Util::JSON qw/decode_json/;
use parent 'Getopt::Yath::Option';
use Test2::Harness::Util::HashBase qw/<split_on/;
ecode_json($input[0]); 1 }) {
my ($err) = split /[\n\r]+/, $@;
$err =~ s{at \Q$INC{'Test2/Harness/Util/JSON.pm'}\E line \d+\..*$}{};
die "Could not decode JSON stri
sub inject_default_long_examples { qq{ '["json","list"]'}, qq{='["json","list"]'} }
sub inject_default_short_examples { qq{ '["json","list"]'}, qq{='["json","list"]'} }
sub default_long_examples {
;
use strict;
use warnings;
our $VERSION = '2.000006'; # TRIAL
use Test2::Harness::Util::JSON qw/decode_json/;
use parent 'Getopt::Yath::Option';
use Test2::Harness::Util::HashBase qw/<split_on <ke
elf->_example_append(\%params, ' ', '=');
return [' key=val', '=key=val', qq[ '{"json":"hash"}'], qq[='{"json":"hash"}'], @append];
}
sub default_short_examples {
my $self = shift;
my %p
end(\%params, '', ' ', '=');
return [' key=val', 'key=value', '=key=val', qq[ '{"json":"hash"}'], qq[='{"json":"hash"}'], @append];
}
sub init {
my $self = shift;
$self->SUPER::init();
requires_autofill { 1 }
sub inject_default_long_examples { qq{='["json","list"]'} }
sub inject_default_short_examples { qq{='["json","list"]'} }
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Get
nings;
our $VERSION = '2.000006'; # TRIAL
use Text::Xslate();
use Test2::Harness::Util::JSON qw/decode_json/;
use Test2::Harness::Util qw/open_file/;
use App::Yath::Schema::Queries();
use App::Y
=> [share_dir('templates')]);
my $user = $req->user;
if ($req->parameters->{json}) {
$res->as_json($run_uuid ? (run_uuid => $run_uuid) : ());
return $res;
}
$res->add
| 'qvfd';
return $res->add_error("Unsupported file type, must be .jsonl.bz2, or .jsonl.gz")
unless $file =~ m/\.jsonl\.(bz2|gz)$/i;
my $ext = lc($1);
my ($run_uuid);
my $ok =
t be called on a blessed instance") unless ref($this);
$this->option($option, @_);
}
sub TO_JSON {
my $self = shift;
return {%$self};
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
hare_dir/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
tent_type => 'application/x-jsonl; charset=utf-8',
cache => 0,
headers => ["content-disposition" => 'attachment; filename="coverage.jsonl"'],
done => s
fetch => sub {
if (my $item = $iter->()) {
return encode_json($item) . "\n";
}
else {
$done = 1;
use Carp qw/confess croak/;
use Test2::Util::UUID qw/gen_uuid/;
use Test2::Harness::Util::JSON qw/encode_json/;
use vars qw/$STDERR_APIPE $STDOUT_APIPE/;
sub import {
my $class = shift;
co
y $json;
{
no warnings 'once';
local *UNIVERSAL::TO_JSON = sub { "$_[0]" };
$json = encode_json($event);
}
$stdout->write_message($json);
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("permissions");
__PACKAGE__->add_columns(
"permission_id",
{ data_typ
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("versions");
__PACKAGE__->add_columns(
"version",
{ data_type => "dec
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("source_files");
__PACKAGE__->add_columns(
"source_file_id",
{ data_t
w/share_dir/;
use App::Yath::Schema::Util qw/find_job is_mysql/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase qw/-tit
nt_type => 'application/x-jsonl; charset=utf-8',
done => $advance,
fetch => sub {
$advance->() unless @out;
return @out ? encode_json(shift(@out)) . "\n" : ();
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("job_try_fields");
__PACKAGE__->add_columns(
"event_uuid",
{ data_typ
"name",
{ data_type => "varchar", is_nullable => 0, size => 64 },
"data",
{ data_type => "json", is_nullable => 1 },
"details",
{ data_type => "text", is_nullable => 1 },
"raw",
{ data
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add_columns(
"test_file_id",
{ data_type
hare_dir/;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBase
t eq 'delete') {
$field->delete;
}
}
$res->content_type('application/json');
$res->raw_body($field);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAM
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json decode_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::
unless $run;
my $data = $run->rerun_data;
$res->content_type('application/json');
$res->raw_body($data);
return $res;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME