[rt-viewer commit] r6 - in trunk: bin html

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 8, 2008, 9:37:31 AM1/8/08
to rt-viewe...@googlegroups.com
Author: jerry.gay
Date: Tue Jan 8 06:36:45 2008
New Revision: 6

Modified:
trunk/bin/get_tickets.pl
trunk/html/rt.js

Log:
vim formatting commands and ws cleanup

Modified: trunk/bin/get_tickets.pl
==============================================================================
--- trunk/bin/get_tickets.pl (original)
+++ trunk/bin/get_tickets.pl Tue Jan 8 06:36:45 2008
@@ -18,7 +18,7 @@
my %cache;
for my $output (`rt ls '$base_query'`) {
if ($output =~ m/^(\d+)+:\s+(.*)/) {
- $cache{$1} = $2;
+ $cache{$1} = $2;
}
}

@@ -26,7 +26,7 @@
# to return an array ref of ticket numbers.

my $queries = {
- 'perl6' => sub {
+ 'perl6' => sub {
my @out = `rt show -f DependsOn ticket/49171/links`;
return grep {$_ ne ""} map {
m{perl.org/ticket/(\d+)} && $1;
@@ -69,16 +69,16 @@
# If this is a promise, collect on it.
if (ref $tickets eq 'CODE') {
$tickets = [ &$tickets() ];
- }
+ }

# Get all the ticket information for these tickets.
my $json = { 'tickets' => [ map {get_ticket($_)} @$tickets ] };

open my $fh, '>', $filename;
print {$fh} to_json( $json );
-
+
close $fh;
-}
+}


sub get_ticket {
@@ -94,7 +94,7 @@
next;
}
if ($key eq "id") {
- $value =~ s{.*/}{};
+ $value =~ s{.*/}{};
}
$retval->{$key} = $value;
}
@@ -106,7 +106,7 @@
# This will become less naive at some point. For now, get the first
# non-empty content and use that.
sub get_summary {
- my $ticket = shift;
+ my $ticket = shift;
my $out = `rt show -f Content ticket/$ticket/history`;

my @chunks = split(/--/, $out);
@@ -114,9 +114,9 @@
foreach my $chunk (@chunks) {
$chunk =~ s/.*?Content://ms;
$chunk =~ s/^id:.*//ms;
-
+
if ($chunk =~ m/This transaction appears to have no content/) {
- next;
+ next;
}

$chunk =~ s/\n/<br>/g;
@@ -124,3 +124,4 @@
}
}

+# vim: expandtab shiftwidth=2:

Modified: trunk/html/rt.js
==============================================================================
--- trunk/html/rt.js (original)
+++ trunk/html/rt.js Tue Jan 8 06:36:45 2008
@@ -136,7 +136,7 @@
listeners: {
click: function(n) {
if (! n.isLeaf())
- return;
+ return;

open_tab(n.attributes.text);
}
@@ -146,13 +146,13 @@
region: 'center',
xtype: 'tabpanel',
activeTab: 0,
- items: [{
- title: 'Instructions',
- html: 'Click on queries to the left to open new tabs',
- closable: true
- }]
+ items: [{
+ title: 'Instructions',
+ html: 'Click on queries to the left to open new tabs',
+ closable: true
+ }]
}, {
- region: 'south',
+ region: 'south',
title: 'TODO',
collapsible: true,
html: '<ul>' +
@@ -171,3 +171,5 @@

});

+
+# vim: expandtab shiftwidth=2:

codesite...@google.com

unread,
Jan 8, 2008, 9:37:31 AM1/8/08
to rt-viewe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages