[Bps-public-commit] RT-Extension-rt_cpan_org branch, rt4, updated. 17b7571d6d610e279257ac378d256e72bdd8514d

Thomas Sibley trs at bestpractical.com
Thu Apr 11 00:47:28 EDT 2013


The branch, rt4 has been updated
       via  17b7571d6d610e279257ac378d256e72bdd8514d (commit)
      from  fbb75e7f9e54f4b1bcda4bba0882c9d8527687ee (commit)

Summary of changes:
 html/{Public/bugs-per-dist.tsv => NoAuth/dhandler} | 36 ++++++++++------------
 1 file changed, 17 insertions(+), 19 deletions(-)
 copy html/{Public/bugs-per-dist.tsv => NoAuth/dhandler} (74%)
 mode change 100644 => 100755

- Log -----------------------------------------------------------------
commit 17b7571d6d610e279257ac378d256e72bdd8514d
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Apr 10 21:36:40 2013 -0700

    Revert "Remove support for pre-2006 public dist/bug pages"
    
    The latest releases of at least 542 distributions point to some of these
    old-school URLs in their META files [1].  There's also a lot of POD
    pointing at them [2].  It's far too optimistic to remove these URLs
    anytime in the future, even if the tools which may be using them as
    defaults are updated [3].  First rule of the internet: don't break links!
    So we're stuck with 'em.
    
    This reverts commit 2630ea4bd54f9915c6185a9845ca234073ebd3c8.
    
    [1] See __END__ below.  MetaCPAN is awesome.
    [2] http://grep.cpan.me/?q=%5CQrt.cpan.org%2FNoAuth%5CE
    [3] Including, but not limited to:
    
        • Module::Build
        • Dist::Zilla
        • ExtUtils::MakeMaker
        • Module::Install
        • Module::Build::Bundle
    
    __END__
    use strict;
    use warnings;
    use List::Util 'max';
    
    use ElasticSearch;
    my $es = ElasticSearch->new(
        servers     => 'api.metacpan.org',
        no_refresh  => 1,
        transport   => 'http',
    );
    my $scroller = $es->scrolled_search(
        query       => { match_all => {} },
        size        => 100,
        search_type => 'scan',
        scroll      => '5m',
        index       => 'v0',
        type        => 'release',
        fields  => [ "name" , "resources.bugtracker.web", "metadata.generated_by" ],
        filter  => {
            and => [
                { exists    => { field  => "resources.bugtracker.web" }},
                { term      => { status => "latest" }},
            ],
        },
    ) or die "Connecting to api.metacpan.org failed";
    
    my %dist;
    while ( my $result = $scroller->next ) {
        my ($name, $bugs) = @{$result->{fields}}{"name", "resources.bugtracker.web"};
        next unless $bugs =~ m{\Qrt.cpan.org/NoAuth\E}i;
        $dist{$name} = $bugs;
    }
    
    my $max_length = max map { length } keys %dist;
    
    printf "%-*s %s\n", $max_length, $_, $dist{$_}
        for sort keys %dist;

diff --git a/html/NoAuth/dhandler b/html/NoAuth/dhandler
new file mode 100755
index 0000000..a502cd0
--- /dev/null
+++ b/html/NoAuth/dhandler
@@ -0,0 +1,70 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%#  
+%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC 
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/copyleft/gpl.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<%init>
+my $path = $m->dhandler_arg;
+
+if    ($path =~ m|^ReportBug.html|) {
+    $m->redirect( RT->Config->Get("WebPath") .'/Public/Bug/Report.html?Queue=' . $ARGS{Queue});
+}
+elsif ($path =~ m|^Bugs.html|) {
+    $m->redirect( RT->Config->Get("WebPath") .'/Public/Dist/Display.html?Name=' . $ARGS{Dist});
+}
+elsif ($path =~ m|^Dists.html|) {
+    $m->redirect( RT->Config->Get("WebPath") .'/Public/Search/Simple.html?q=' . $ARGS{Queue});
+}
+elsif ($path =~ m|^Bug.html|) {
+    $m->redirect( RT->Config->Get("WebPath") .'/Public/Bug/Display.html?id=' . $ARGS{id});
+}
+elsif ($path =~ m|^bugs.tsv|) {
+    $m->redirect( RT->Config->Get("WebPath") .'/Public/Dist/bugs.tsv?Dist=' . $ARGS{Dist});
+}
+else {
+    $m->decline;
+}
+</%init>
+

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list