This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:event-metadata {:event-date nil, | |
:lab-name "Unknown", | |
:grower nil, | |
:farm nil, | |
:field nil, | |
:modus-path nil, | |
:event-id nil, | |
:source "samples"}, | |
:event-samples [{:sample-number "NA", | |
:geometry {:type "Polygon", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$r->websocket('/news')->to(cb => sub { | |
my $self = shift; | |
$self->on(message => sub { | |
my ($self, $msg) = @_; | |
$msg = decode_json($msg); | |
if ($msg->{type} eq 'ready'){ | |
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); | |
my $headline = 'Bingo at 5 today!'; | |
my $description = 'This message is really long and demonstrates the scrolling ability of the banner text. Go to Bingo at 5PM tonight in the cafeteria! Dinner is at 7PM tonight, meatloaf will be served.'; | |
my $expiration = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Mojo::Base; | |
use FindBin; | |
BEGIN { unshift @INC, "$FindBin::Bin/../../lib" } | |
use Test::More; | |
use Test::Mojo; | |
my $t = Test::Mojo->new('Ama'); |