summaryrefslogtreecommitdiffstats
path: root/extensions/BMO
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-08-26 07:55:24 +0200
committerDylan William Hardison <dylan@hardison.net>2018-08-26 07:55:24 +0200
commit9263f397e701f25af395e8cdee48c87ee3327157 (patch)
treecc7f6b6beef8947090a108701ca34316a5c8edb8 /extensions/BMO
parent23b94e8410d90e9e15584d3a9220b6bb214f4220 (diff)
parentd57aefa118802606ea7cc424aaa62173be9eec41 (diff)
downloadbugzilla-9263f397e701f25af395e8cdee48c87ee3327157.tar.gz
bugzilla-9263f397e701f25af395e8cdee48c87ee3327157.tar.xz
Merge remote-tracking branch 'bmo/mojo'
Diffstat (limited to 'extensions/BMO')
-rw-r--r--extensions/BMO/Extension.pm9
-rw-r--r--extensions/BMO/t/bounty_attachment.t8
-rw-r--r--extensions/BMO/t/bug_format_comment.t90
-rw-r--r--extensions/BMO/template/en/default/global/choose-product.html.tmpl2
-rw-r--r--extensions/BMO/web/producticons/sync.pngbin8896 -> 0 bytes
-rw-r--r--extensions/BMO/web/producticons/telemetry.pngbin0 -> 14740 bytes
-rw-r--r--extensions/BMO/web/producticons/thunderbird.pngbin9939 -> 10521 bytes
7 files changed, 13 insertions, 96 deletions
diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm
index 743d03099..0a3389e5d 100644
--- a/extensions/BMO/Extension.pm
+++ b/extensions/BMO/Extension.pm
@@ -2747,6 +2747,15 @@ sub app_startup {
my $app = $args->{app};
my $r = $app->routes;
+ $r->get(
+ '/favicon.ico' => sub {
+ my $c = shift;
+ $c->reply->file(
+ $c->app->home->child('extensions/BMO/web/images/favicon.ico')
+ );
+ }
+ );
+
$r->any( '/:REWRITE_itrequest' => [ REWRITE_itrequest => qr{form[\.:]itrequest} ] )
->to( 'CGI#enter_bug_cgi' => { 'product' => 'Infrastructure & Operations', 'format' => 'itrequest' } );
$r->any( '/:REWRITE_mozlist' => [ REWRITE_mozlist => qr{form[\.:]mozlist} ] )
diff --git a/extensions/BMO/t/bounty_attachment.t b/extensions/BMO/t/bounty_attachment.t
index bd79b0dfe..6e596eeba 100644
--- a/extensions/BMO/t/bounty_attachment.t
+++ b/extensions/BMO/t/bounty_attachment.t
@@ -7,15 +7,13 @@
# defined by the Mozilla Public License, v. 2.0.
use strict;
use warnings;
-use lib qw( . lib );
+use lib qw( . lib local/lib/perl5 );
use Test::More;
use Bugzilla;
-use Bugzilla::Extension;
-
-my $class = Bugzilla::Extension->load('extensions/BMO/Extension.pm',
- 'extensions/BMO/Config.pm');
+BEGIN { Bugzilla->extensions }
+my $class = 'Bugzilla::Extension::BMO';
my $parse = $class->can('parse_bounty_attachment_description');
my $format = $class->can('format_bounty_attachment_description');
diff --git a/extensions/BMO/t/bug_format_comment.t b/extensions/BMO/t/bug_format_comment.t
deleted file mode 100644
index 532b8fb8d..000000000
--- a/extensions/BMO/t/bug_format_comment.t
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/usr/bin/perl -T
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
-use strict;
-use warnings;
-use lib qw( . lib );
-
-use Test::More;
-use Bugzilla;
-use Bugzilla::Extension;
-
-my $class = Bugzilla::Extension->load('extensions/BMO/Extension.pm',
- 'extensions/BMO/Config.pm');
-ok( $class->can('bug_format_comment'), 'the function exists');
-
-my $bmo = $class->new;
-ok($bmo, "got a new bmo extension");
-
-my $text = <<'END_OF_LINKS';
-# crash stats, a fake one
-bp-deadbeef-deaf-beef-beed-cafefeed1337
-
-# CVE/CAN security things
-CVE-2014-0160
-CVE-2014-0001
-CVE-2014-13579
-CVE-2014-999999999
-
-# svn
-r2424
-
-# bzr commit
-Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
-modified extensions/Review/Extension.pm
-Committed revision 9257.
-
-# git with scp-style address
-To gitolite3@git.mozilla.org:bugzilla/bugzilla.git
- 36f56bd..eab44b1 nouri -> nouri
-
-# git with uri (with login)
-To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
- 36f56bd..eab44b1 withuri -> withuri
-
-# git with uri (without login)
-To ssh://git.mozilla.org/bugzilla/bugzilla.git
- 36f56bd..eab44b1 nologin -> nologin
-END_OF_LINKS
-
-my @regexes;
-
-$bmo->bug_format_comment({ regexes => \@regexes });
-
-ok(@regexes > 0, "got some regexes to play with");
-
-foreach my $re (@regexes) {
- my ($match, $replace) = @$re{qw(match replace)};
- if (ref($replace) eq 'CODE') {
- $text =~ s/$match/$replace->({matches => [ $1, $2, $3, $4,
- $5, $6, $7, $8,
- $9, $10]})/egx;
- }
- else {
- $text =~ s/$match/$replace/egx;
- }
-}
-
-my @links = (
- '<a href="https://crash-stats.mozilla.com/report/index/deadbeef-deaf-beef-beed-cafefeed1337">bp-deadbeef-deaf-beef-beed-cafefeed1337</a>',
- '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0160">CVE-2014-0160</a>',
- '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0001">CVE-2014-0001</a>',
- '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-13579">CVE-2014-13579</a>',
- '<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-999999999">CVE-2014-999999999</a>',
- '<a href="https://viewvc.svn.mozilla.org/vc?view=rev&amp;revision=2424">r2424</a>',
- '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 withuri -> withuri</a>',
- '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 nouri -> nouri</a>',
- '<a href="https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=eab44b1">36f56bd..eab44b1 nologin -> nologin</a>',
- 'https://bzr.mozilla.org/bmo/4.2/revision/9257',
-);
-
-foreach my $link (@links) {
- ok(index($text, $link) > -1, "check for $link");
-}
-
-
-done_testing;
diff --git a/extensions/BMO/template/en/default/global/choose-product.html.tmpl b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
index 679d812e1..dfa9b5af4 100644
--- a/extensions/BMO/template/en/default/global/choose-product.html.tmpl
+++ b/extensions/BMO/template/en/default/global/choose-product.html.tmpl
@@ -116,7 +116,7 @@
%]
[% INCLUDE easyproduct
name="Data Platform and Tools"
- icon="sync.png"
+ icon="telemetry.png"
%]
<section class="product other">
<h3>
diff --git a/extensions/BMO/web/producticons/sync.png b/extensions/BMO/web/producticons/sync.png
deleted file mode 100644
index b42125ef6..000000000
--- a/extensions/BMO/web/producticons/sync.png
+++ /dev/null
Binary files differ
diff --git a/extensions/BMO/web/producticons/telemetry.png b/extensions/BMO/web/producticons/telemetry.png
new file mode 100644
index 000000000..307272d1f
--- /dev/null
+++ b/extensions/BMO/web/producticons/telemetry.png
Binary files differ
diff --git a/extensions/BMO/web/producticons/thunderbird.png b/extensions/BMO/web/producticons/thunderbird.png
index f3523183a..2abb6a532 100644
--- a/extensions/BMO/web/producticons/thunderbird.png
+++ b/extensions/BMO/web/producticons/thunderbird.png
Binary files differ