From 2397c5e491cc626a90e4f65bfd86044831121570 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Tue, 31 Jul 2018 21:37:33 -0400 Subject: add version --- Bugzilla/Quantum.pm | 14 ++++++++++++++ Bugzilla/Quantum/Stdout.pm | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm index 083dcaf55..135ff94a9 100644 --- a/Bugzilla/Quantum.pm +++ b/Bugzilla/Quantum.pm @@ -63,6 +63,20 @@ sub startup { }, ); + $r->get( + '/__version__' => sub { + my $c = shift; + $c->reply->file( $c->app->home->child('version.json') ); + }, + ); + + $r->get( + '/version.json' => sub { + my $c = shift; + $c->reply->file( $c->app->home->child('version.json') ); + }, + ); + $r->get('/__heartbeat__')->to('CGI#heartbeat_cgi'); $r->get('/robots.txt')->to('CGI#robots_cgi'); diff --git a/Bugzilla/Quantum/Stdout.pm b/Bugzilla/Quantum/Stdout.pm index 699ec164a..be7b546ea 100644 --- a/Bugzilla/Quantum/Stdout.pm +++ b/Bugzilla/Quantum/Stdout.pm @@ -41,7 +41,7 @@ sub PRINT { ## no critic (unpack) if ( $self->_encoding ) { $bytes = encode( $self->_encoding, $bytes ); } - $c->write($bytes); + $c->write($bytes.$\); } sub BINMODE { -- cgit v1.2.3-24-g4f1b