e DBI;
use DateTime;
use Scope::Guard;
use Carp qw/croak/;
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
use Test2::Util::UUID qw/gen_uuid/;
our $VERSION = '2.000006'; # TRIAL
use Test
$subcount++;
my ($key) = keys(%$item);
my $line = encode_json($item);
print $wh $line, "\n";
}
}
$counter++;
;
my $last_run_uuid;
my $broken;
while (my $line = <$rh>) {
my $data = decode_json($line);
my ($type, @bad) = keys %$data;
die "Invalid data!" if @bad;
$s
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 :{
;
use strict;
use warnings;
our $VERSION = '2.000006'; # TRIAL
use Test2::Harness::Util::JSON qw/encode_json/;
use Test2::Harness::Util qw/mod2file/;
use Sys::Hostname qw/hostname/;
use Carp qw/cr
rl,
{
headers => {'content-type' => 'application/json'},
content => encode_json({channel => $dest, text => $text}),
},
);
warn "
ngs;
our $VERSION = '2.000006'; # TRIAL
use Carp qw/confess/;
use Test2::Harness::Util::JSON qw/decode_json/;
use Test2::Harness::Event;
use Test2::Harness::Util::HashBase qw{
<name
<fh
$self->{+BUFFER} = '';
}
my $event = decode_json($line);
push @out => Test2::Harness::Event->new(%$event);
}
per qw/Dumper/;
use POSIX();
use IO::Select();
use Test2::Harness::Util::JSON qw/encode_pretty_json encode_json encode_json_file/;
use Test2::Harness::Util qw/mod2file parse_exit/;
use Importer Imp
ss::Collector->collect($ARGV[0]))', # Run it.
encode_json_file(\%params), # json data for what to do
],
$post_fork,
);
retu
tty_json($req) . "\n" if $debug;
my $res = $handle_request->($req);
next if $req->do_not_respond;
print "Response ($trace): " . encode_pretty_json($re
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 :{
t2::Harness::Event');
$event = decode_json($event) unless ref($event);
return $self->{+EVENT} = Test2::Harness::Event->new(%$event);
}
sub TO_JSON {
my $self = shift;
my $type = ble
view test runs in a web browser" }
sub group { "server" }
sub cli_args { "[log1.jsonl[.gz|.bz2] [log2.jsonl[.gz|.bz2]]]" }
sub cli_dot { "[:: STARMAN/PLACKUP ARGS]" }
sub accepts_dot_args { 1
= shift;
my ($file, $mode, $project) = @_;
my $config = $self->{+CONFIG};
die "No .jsonl[.*] log file provided.\n" unless $file;
die "Invalid log file '$file': File not found, or no
unless($project) {
my $base = $file;
$base =~ s{^.*/}{}g;
$base =~ s{\.jsonl.*$}{}g;
$base =~ s/-\d.*$//g;
$project = $base || "devshell";
}
unless
my @NO_JSON;
BEGIN {
@NO_JSON = qw{
todo
running
complete
};
sub no_json {
my $self = shift;
return (
$self->SUPER::no_json(),
@NO_JSON,
);
}
}
use Test2::Harness::Util::HashBase(
@NO_JSON,
qw{
<results
halt
pid
},
);
sub init {
my $self = shift;
$self->SUPER::
warnings;
our $VERSION = '2.000006'; # TRIAL
use Term::Table;
use Test2::Harness::Util::JSON qw/decode_json/;
use App::Yath::Schema::Util qw/schema_config_from_settings/;
use parent 'App::Yath::Co
,
);
my $data = [];
while (my $run = $runs->next) {
push @$data => $run->TO_JSON;
}
return undef unless @$data;
return $data;
}
sub get_from_http {
my $self =
->{status}: $res->{reason}\n$res->{content}\n"
unless $res->{success};
return decode_json($res->{content});
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
App::Yath::Command::recent
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 :{
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}) {
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
::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}) {
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
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 :{
--scan-options key=val
=item --scan-options=key=val
=item --scan-options '{"json":"hash"}'
=item --scan-options='{"json":"hash"}'
=item --scan-options(?^:^--(no-)?(?^:scan-(.+))$)
=item --scan-op
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("email");
__PACKAGE__->add_columns(
"email_id",
{ data_type => "bigin
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("resource_types");
__PACKAGE__->add_columns(
"resource_type_id",
{ da
ct ipc_warn ipc_loop pid_is_running inflate set_procname/;
use Test2::Harness::Util::JSON qw/decode_json encode_json/;
use Test2::Harness::Collector::Preloaded;
use Test2::Harness::Util::HashBase qw
STDERR->autoflush(1);
my $ok = eval {
my ($json) = @ARGV;
my $self = $class->new(decode_json($json));
my $got = $self->start();
$EXIT = $go
{pkg}\::EXIT // 255)", # Run it.
encode_json(\%params), # json data for job
]);
return $pid;
}
sub ipc {
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("sessions");
__PACKAGE__->add_columns(
"session_uuid",
{ data_type =>