[Bps-public-commit] rtx-calendar branch, master, updated. b000c680e951204424115a57ecc3dbb9cf3e7863
Kevin Falcone
falcone at bestpractical.com
Thu Dec 8 13:01:29 EST 2011
The branch, master has been updated
via b000c680e951204424115a57ecc3dbb9cf3e7863 (commit)
via c6f88b783b5ed83a5fe1f93997c62364f4cba510 (commit)
via 819ffe5255724d4ce197ff570107531d79a791b8 (commit)
from 42d2a1279e24d64c92465a4459f47fdad2ebe8a4 (commit)
Summary of changes:
.../RTx-Calendar/Elements/Tabs/Privileged | 16 ++++++-
inc/Module/Install.pm | 4 +-
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 2 +-
inc/Module/Install/Fetch.pm | 2 +-
inc/Module/Install/Makefile.pm | 2 +-
inc/Module/Install/Metadata.pm | 9 ++--
inc/Module/Install/RTx.pm | 49 ++++++++++++++++++--
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
10 files changed, 71 insertions(+), 19 deletions(-)
- Log -----------------------------------------------------------------
commit 819ffe5255724d4ce197ff570107531d79a791b8
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Dec 8 12:04:02 2011 -0500
upgrade MI
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 8ee839d..74caf9c 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.00';
+ $VERSION = '1.01';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -467,4 +467,4 @@ sub _CLASS ($) {
1;
-# Copyright 2008 - 2010 Adam Kennedy.
+# Copyright 2008 - 2011 Adam Kennedy.
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index b55bda3..d3662c9 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 71ccc27..276409a 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -9,7 +9,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index ec1f106..093cb7a 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 5dfd0e9..4c71003 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index cfe45b3..3b01e09 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -515,6 +515,7 @@ sub __extract_license {
'GNU Free Documentation license' => 'unrestricted', 1,
'GNU Affero General Public License' => 'open_source', 1,
'(?:Free)?BSD license' => 'bsd', 1,
+ 'Artistic license 2\.0' => 'artistic_2', 1,
'Artistic license' => 'artistic', 1,
'Apache (?:Software )?license' => 'apache', 1,
'GPL' => 'gpl', 1,
@@ -550,9 +551,9 @@ sub license_from {
sub _extract_bugtracker {
my @links = $_[0] =~ m#L<(
- \Qhttp://rt.cpan.org/\E[^>]+|
- \Qhttp://github.com/\E[\w_]+/[\w_]+/issues|
- \Qhttp://code.google.com/p/\E[\w_\-]+/issues/list
+ https?\Q://rt.cpan.org/\E[^>]+|
+ https?\Q://github.com/\E[\w_]+/[\w_]+/issues|
+ https?\Q://code.google.com/p/\E[\w_\-]+/issues/list
)>#gx;
my %links;
@links{@links}=();
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 5480124..73b9cda 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
-our $VERSION = '0.25';
+our $VERSION = '0.29';
use FindBin;
use File::Glob ();
@@ -42,10 +42,10 @@ sub RTx {
$INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
} else {
local @INC = (
- @INC,
$ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
- map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
- @prefixes
+ @INC,
+ map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/rt3/lib", "$_/lib/rt3", "$_/lib" )
+ } grep $_, @prefixes
);
until ( eval { require RT; $RT::LocalPath } ) {
warn
@@ -60,6 +60,7 @@ sub RTx {
my $local_lib_path = "$RT::LocalPath/lib";
print "Using RT configuration from $INC{'RT.pm'}:\n";
unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
+ unshift @INC, $lib_path;
$RT::LocalVarPath ||= $RT::VarPath;
$RT::LocalPoPath ||= $RT::LocalLexiconPath;
@@ -185,8 +186,46 @@ sub RTxInit {
die "Cannot load RT" unless $RT::Handle and $RT::DatabaseType;
}
+# stolen from RT::Handle so we work on 3.6 (cmp_versions came in with 3.8)
+{ my %word = (
+ a => -4,
+ alpha => -4,
+ b => -3,
+ beta => -3,
+ pre => -2,
+ rc => -1,
+ head => 9999,
+);
+sub cmp_version($$) {
+ my ($a, $b) = (@_);
+ my @a = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
+ split /([^0-9]+)/, $a;
+ my @b = grep defined, map { /^[0-9]+$/? $_ : /^[a-zA-Z]+$/? $word{$_}|| -10 : undef }
+ split /([^0-9]+)/, $b;
+ @a > @b
+ ? push @b, (0) x (@a- at b)
+ : push @a, (0) x (@b- at a);
+ for ( my $i = 0; $i < @a; $i++ ) {
+ return $a[$i] <=> $b[$i] if $a[$i] <=> $b[$i];
+ }
+ return 0;
+}}
+sub requires_rt {
+ my ($self,$version) = @_;
+
+ # if we're exactly the same version as what we want, silently return
+ return if ($version eq $RT::VERSION);
+
+ my @sorted = sort cmp_version $version,$RT::VERSION;
+
+ if ($sorted[-1] eq $version) {
+ # should we die?
+ warn "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+ }
+}
+
1;
__END__
-#line 303
+#line 348
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index edc18b4..3139a63 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index d0f6599..1f724a7 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.00';
+ $VERSION = '1.01';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
commit c6f88b783b5ed83a5fe1f93997c62364f4cba510
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Dec 8 12:51:00 2011 -0500
It feels more natural to be next to Charts, not after Feeds
We really want an insert_child method that takes a key and shifts
everyone over. Or an after method given a specific child.
But that requires a core RT change and would force a dep in this module.
diff --git a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
index 5403fb2..4e26c8e 100644
--- a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
@@ -57,9 +57,22 @@ my $query_string = sub {
if ( $request_path =~ qr{^/Search/} && $m->request_args->{Query} ) {
my $tabs = PageMenu;
+ my $sort_order;
+ # we want to sort ourselves after the Charts link
+ # this involves shifting any other tabs (like feeds) off to the right
+ for my $child ($tabs->children) {
+ if ( $child->key eq 'chart' ) {
+ $sort_order = $child->sort_order + 1;
+ next;
+ }
+ if ( $sort_order ) {
+ $child->sort_order( $child->sort_order + 1 );
+ }
+ }
$tabs->child( 'calendar' => title => loc('Calendar'),
path => '/Search/Calendar.html?' . $query_string->(
- %{$m->request_args} ) );
+ %{$m->request_args} ),
+ sort_order => $sort_order );
}
my $about_me = Menu->child( 'preferences' );
commit b000c680e951204424115a57ecc3dbb9cf3e7863
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Dec 8 13:01:11 2011 -0500
Add a bit of consistency to the indenting
diff --git a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
index 4e26c8e..7ec8754 100644
--- a/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTx-Calendar/Elements/Tabs/Privileged
@@ -70,9 +70,8 @@ if ( $request_path =~ qr{^/Search/} && $m->request_args->{Query} ) {
}
}
$tabs->child( 'calendar' => title => loc('Calendar'),
- path => '/Search/Calendar.html?' . $query_string->(
- %{$m->request_args} ),
- sort_order => $sort_order );
+ path => '/Search/Calendar.html?' . $query_string->( %{$m->request_args} ),
+ sort_order => $sort_order );
}
my $about_me = Menu->child( 'preferences' );
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list