onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("reporting");
__PACKAGE__->add_columns(
"reporting_id",
{ data_type =
onents(
"InflateColumn::DateTime",
"InflateColumn::Serializer",
"InflateColumn::Serializer::JSON",
);
__PACKAGE__->table("versions");
__PACKAGE__->add_columns(
"version",
{ data_type => "dec
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" : ();
;
use Test2::Harness::IPC::Util qw/pid_is_running set_procname/;
use Test2::Harness::Util::JSON qw/encode_json/;
use File::Path qw/remove_tree/;
use parent 'App::Yath::Command';
use Test2::Harness::
;
return $self->{+LOG_FILE} //= File::Spec->catfile($self->settings->workspace->workdir, 'log.jsonl');
}
sub collector {
my $self = shift;
return $self->{+COLLECTOR} if $self->{+COLLECTO
> 1,
output => sub {
for my $e (@_) {
print $log encode_json($e), "\n";
return unless $renderers;
$_->render_event($e) for @$r
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
on::List;
use strict;
use warnings;
our $VERSION = '2.000004';
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 {
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
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 warnings;
our $VERSION = '2.000004';
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 =
ion::Map;
use strict;
use warnings;
our $VERSION = '2.000004';
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();
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);
eeper;
use App::Yath::Server::Response qw/resp error/;
use Test2::Harness::Util::JSON qw/encode_json encode_pretty_json/;
use parent 'App::Yath::Server::Controller';
use Test2::Harness::Util::HashBas
tent_type($ct);
if ($ct eq 'application/json') {
$res->raw_body($purged);
}
else {
$res->raw_body("<pre>" . encode_pretty_json($purged) . "</pre>");
}
return $res
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
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
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::
JSON {
my $self = shift;
my $class = blessed($self);
return {
%$self,
job_class => $class,
};
}
sub process_info {
my $self = shift;
my $out = $self->TO_JSON
se warnings;
our $VERSION = '2.000004';
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);
}
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
N = '2.000004';
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