est_name/;
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;
my $json = $req->content;
my $stats = decode_json($json);
my $res = resp(200);
$res->stream(
env => $req->env,
content_type => 'application/x-jsonl; charse
{
my $data = $self->build_stat($project => shift(@$stats));
return encode_json($data) . "\n";
},
);
return $res;
}
my %VALID_TYPES = (
run_list
qw/IS_WIN32/;
use Test2::Harness::Util qw/parse_exit mod2file/;
use Test2::Harness::Util::JSON qw/encode_json/;
use Test2::Harness::IPC::Util qw/pid_is_running/;
use Test2::Harness::Preload();
use T
;
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 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
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("users");
__PACKAGE__->add_columns(
"user_id",
{ data_type => "bigint
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("log_files");
__PACKAGE__->add_columns(
"log_file_id",
{ data_type =>
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
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("runs");
__PACKAGE__->add_columns(
"run_uuid",
{ data_type => "uuid",
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
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 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
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("test_files");
__PACKAGE__->add_columns(
"test_file_id",
{
data_t
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("binaries");
__PACKAGE__->add_columns(
"event_uuid",
{ data_type => "
use Test2::Harness::IPC::Util qw/start_process/;
use Test2::Harness::Util::JSON qw/encode_json_file encode_json decode_json_file/;
use Test2::Util::UUID qw/gen_uuid/;
use parent 'App::Yath::Renderer
project;
my $project;
if (my $meta_json = find_in_updir('META.json')) {
my $json = decode_json_file($meta_json);
$project = $json->{name};
}
elsif (my $meta_yml = fin
cessor->process_csnb(
Getopt::Yath::Settings->FROM_JSON_FILE(\$ARGV[0], unlink => 1),
)
);
EOT
encode_json_file($self->{+SETTINGS}), # Pass settings
::Harness::Util qw/hub_truth apply_encoding mod2file fqmod/;
use Test2::Harness::Util::JSON qw/encode_pretty_json/;
use File::Spec();
use IO::Handle;
use Scalar::Util qw/blessed/;
use Storable qw/dcl
sh @{$f->{info}} => {
tag => 'RUN INFO',
details => encode_pretty_json($run),
};
}
if ($self->{+SHOW_RUN_FIELDS}) {
if (my $fields = $f->{harne
fo}} => {
tag => 'RUN FLD',
details => encode_pretty_json($field),
};
}
}
}
if ($f->{harness_job_launch}) {
se POSIX qw/strftime/;
use Test2::Harness::Util qw/clean_path/;
use Test2::Harness::Util::JSON qw/encode_json/;
use parent 'App::Yath::Renderer';
use Test2::Harness::Util::HashBase qw{
<file
[qw/YATH_LOG_FILE_FORMAT TEST2_HARNESS_LOG_FORMAT/],
default => '%!P%Y-%m-%d_%H:%M:%S_%!U.jsonl',
description => 'Specify the format for automatically-generated log files. Overridden
mplies -L (Default: \$YATH_LOG_FILE_FORMAT, if that is set, or else "%!P%Y-%m-%d~%H:%M:%S~%!U~%!p.jsonl"). This is a string in which percent-escape sequences will be replaced as per POSIX::strftime. T
e strict;
use warnings;
our $VERSION = '2.000006'; # TRIAL
use Test2::Harness::Util::JSON qw/encode_pretty_json/;
use Test2::Harness::Util qw/mod2file fqmod/;
use Storable qw/dclone/;
use Getopt::Y
sh @{$f->{info}} => {
tag => 'RUN INFO',
details => encode_pretty_json($run),
};
}
if ($self->{+SHOW_RUN_FIELDS}) {
if (my $fields = $f->{harne
fo}} => {
tag => 'RUN FLD',
details => encode_pretty_json($field),
};
}
}
}
if ($f->{harness_job_launch}) {
item --ipc-dir-order ARG
=item --ipc-dir-order=ARG
=item --ipc-dir-order '["json","list"]'
=item --ipc-dir-order='["json","list"]'
=item --ipc-dir-order :{ ARG1 ARG2 ... }:
=item --ipc-dir-order=
lp information
=item -p key=val
=item -p=key=val
=item -pkey=value
=item -p '{"json":"hash"}'
=item -p='{"json":"hash"}'
=item -p:{ KEY1 VAL KEY2 :{ VAL1 VAL2 ... }: ... }:
=item -p :{ KEY1 VA
l
=item --plugins=key=val
=item --plugin '{"json":"hash"}'
=item --plugin='{"json":"hash"}'
=item --plugins '{"json":"hash"}'
=item --plugins='{"json":"hash"}'
=item --plugin :{ KEY1 VAL KEY2 :{
::Term qw/USE_COLOR/;
use Test2::Harness::Util qw/clean_path/;
use Test2::Harness::Util::JSON qw/json_true json_false/;
use List::Util qw/max/;
our $VERSION = '2.000006'; # TRIAL
use parent 'App::Y
,
autofill => sub { 'summary.json' },
description => "Write out a summary json file, if no path is provided 'summary.json' will be used. The .json extension is added automatically if
long_examples => ['', '=/path/to/summary.json'],
normalize => sub {
my $val = shift;
$val .= '.json' unless $val =~ m/\.json$/;
return clean_path($val);