[Bps-public-commit] rt-extension-mobileui branch, master, updated. 1.05-5-g7ff5a5a

Kevin Falcone falcone at bestpractical.com
Wed Apr 23 16:31:54 EDT 2014


The branch, master has been updated
       via  7ff5a5ad731bfe81bae939ffd1688c0aede6a625 (commit)
       via  7f646ea0d68c98029fe06885bf56f937f3617820 (commit)
       via  59f52bbdf2eb9c0428fcb7fc0bad4c8cb9687186 (commit)
       via  0ced43542e9ef414450772eb53dadd76d7e5fb09 (commit)
       via  a032b732317245ad3e54c07e0484c593839c3317 (commit)
      from  9071e3a32f81ab9530203f6081accfb4d54ae99d (commit)

Summary of changes:
 Changes                             | 64 +++++++++++++++-------------------
 META.yml                            |  6 ++--
 Makefile.PL                         |  2 ++
 README                              |  7 +++-
 inc/Module/Install.pm               |  2 +-
 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      |  2 +-
 inc/Module/Install/RTx.pm           | 69 ++++++++++++++++++++++---------------
 inc/Module/Install/ReadmeFromPod.pm |  2 +-
 inc/Module/Install/Win32.pm         |  2 +-
 inc/Module/Install/WriteAll.pm      |  2 +-
 lib/RT/Extension/MobileUI.pm        |  9 +++--
 15 files changed, 96 insertions(+), 79 deletions(-)

- Log -----------------------------------------------------------------
commit a032b732317245ad3e54c07e0484c593839c3317
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 16:23:05 2014 -0400

    upgrade MI and MIRTx

diff --git a/META.yml b/META.yml
index d9970d3..cad4211 100644
--- a/META.yml
+++ b/META.yml
@@ -8,7 +8,7 @@ configure_requires:
   ExtUtils::MakeMaker: 6.36
 distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Install version 1.06'
+generated_by: 'Module::Install version 1.08'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 4ecf46b..7680c84 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.06';
+	$VERSION = '1.08';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 802844a..3e63345 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.06';
+	$VERSION = '1.08';
 }
 
 # Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 22167b8..93f248d 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '1.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index bee0c4f..ecc0d53 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 7052f36..c0978a4 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 58430f3..e4112f8 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index c9fe996..00cf565 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.31';
+our $VERSION = '0.33';
 
 use FindBin;
 use File::Glob     ();
@@ -136,6 +136,9 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
+        $has_etc{upgrade}++;
+    }
 
     $self->postamble("$postamble\n");
     unless ( $subdirs{'lib'} ) {
@@ -164,49 +167,59 @@ install ::
 .
         $self->postamble("initdb ::\n$initdb\n");
         $self->postamble("initialize-database ::\n$initdb\n");
+        if ($has_etc{upgrade}) {
+            print "To upgrade from a previous version of this extension, use 'make upgrade-database'\n";
+            my $upgradedb = qq|\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(upgrade \$(NAME) \$(VERSION)))"\n|;
+            $self->postamble("upgrade-database ::\n$upgradedb\n");
+            $self->postamble("upgradedb ::\n$upgradedb\n");
+        }
     }
 }
 
-# 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;
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::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";
+        die "\nWarning: prerequisite RT $version not found. Your installed version of RT ($RT::VERSION) is too old.\n\n";
+    }
+}
+
+sub rt_too_new {
+    my ($self,$version,$msg) = @_;
+    $msg ||= "Your version %s is too new, this extension requires a release of RT older than %s\n";
+
+    _load_rt_handle();
+    my @sorted = sort RT::Handle::cmp_version $version,$RT::VERSION;
+
+    if ($sorted[0] eq $version) {
+        die sprintf($msg,$RT::VERSION,$version);
+    }
+}
+
+# RT::Handle runs FinalizeDatabaseType which calls RT->Config->Get
+# On 3.8, this dies.  On 4.0/4.2 ->Config transparently runs LoadConfig.
+# LoadConfig requires being able to read RT_SiteConfig.pm (root) so we'd
+# like to avoid pushing that on users.
+# Fake up just enough Config to let FinalizeDatabaseType finish, and
+# anyone later calling LoadConfig will overwrite our shenanigans.
+sub _load_rt_handle {
+    unless ($RT::Config) {
+        require RT::Config;
+        $RT::Config = RT::Config->new;
+        RT->Config->Set('DatabaseType','mysql');
     }
+    require RT::Handle;
 }
 
 1;
 
 __END__
 
-#line 329
+#line 362
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
index 6a80818..b5e03c3 100644
--- a/inc/Module/Install/ReadmeFromPod.pm
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -7,7 +7,7 @@ use warnings;
 use base qw(Module::Install::Base);
 use vars qw($VERSION);
 
-$VERSION = '0.20';
+$VERSION = '0.22';
 
 sub readme_from {
   my $self = shift;
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index eeaa3fe..e529382 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.06';
+	$VERSION = '1.08';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 85d8018..2c74308 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.06';
+	$VERSION = '1.08';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

commit 0ced43542e9ef414450772eb53dadd76d7e5fb09
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 16:23:09 2014 -0400

    Die if installed on newer RTs

diff --git a/Makefile.PL b/Makefile.PL
index f62d098..e2c385d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,4 +4,6 @@ RTx('RT-Extension-MobileUI');
 all_from('lib/RT/Extension/MobileUI.pm');
 readme_from('lib/RT/Extension/MobileUI.pm');
 
+rt_too_new('4.0.0');
+
 &WriteAll;

commit 59f52bbdf2eb9c0428fcb7fc0bad4c8cb9687186
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 16:24:24 2014 -0400

    Mark as deprecated

diff --git a/META.yml b/META.yml
index cad4211..4293237 100644
--- a/META.yml
+++ b/META.yml
@@ -1,5 +1,5 @@
 ---
-abstract: 'A phone friendly web interface for RT'
+abstract: 'DEPRECATED A phone friendly web interface for RT'
 author:
   - 'Jesse Vincent <jesse at bestpractical.com>'
 build_requires:
diff --git a/README b/README
index 54fe9cc..db18644 100644
--- a/README
+++ b/README
@@ -1,5 +1,10 @@
 NAME
-    RT::Extension::MobileUI - A phone friendly web interface for RT
+    RT::Extension::MobileUI - DEPRECATED A phone friendly web interface for
+    RT
+
+DEPRECATED
+    A version of this module was integrated into RT in 4.0.0. RT will
+    automatically serve a mobile-friendly web interface on 4.0.0 or greater.
 
 DESCRIPTION
     This RT extension adds a mobile interface for RT.
diff --git a/lib/RT/Extension/MobileUI.pm b/lib/RT/Extension/MobileUI.pm
index f01af8d..e17b5e1 100644
--- a/lib/RT/Extension/MobileUI.pm
+++ b/lib/RT/Extension/MobileUI.pm
@@ -26,7 +26,12 @@ sub EscapeJS {
 
 =head1 NAME
 
-RT::Extension::MobileUI - A phone friendly web interface for RT
+RT::Extension::MobileUI - DEPRECATED A phone friendly web interface for RT
+
+=head1 DEPRECATED
+
+A version of this module was integrated into RT in 4.0.0.  RT will
+automatically serve a mobile-friendly web interface on 4.0.0 or greater.
 
 =head1 DESCRIPTION
 

commit 7f646ea0d68c98029fe06885bf56f937f3617820
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 16:24:45 2014 -0400

    bump version for 1.06

diff --git a/META.yml b/META.yml
index 4293237..c791694 100644
--- a/META.yml
+++ b/META.yml
@@ -20,4 +20,4 @@ no_index:
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.05
+version: 1.06
diff --git a/lib/RT/Extension/MobileUI.pm b/lib/RT/Extension/MobileUI.pm
index e17b5e1..b08986c 100644
--- a/lib/RT/Extension/MobileUI.pm
+++ b/lib/RT/Extension/MobileUI.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::MobileUI;
 
-our $VERSION = "1.05";
+our $VERSION = "1.06";
 
 sub _encode_surrogates {
     my $uni = $_[0] - 0x10000;

commit 7ff5a5ad731bfe81bae939ffd1688c0aede6a625
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 23 16:26:26 2014 -0400

    Fix Changes and bump version for 1.07

diff --git a/Changes b/Changes
index 2e9165d..88abb1c 100644
--- a/Changes
+++ b/Changes
@@ -1,67 +1,59 @@
-1.05    Tue Aug 13 11:04:53 PDT 2013
+1.07
+ - Re-release with proper Changes update
 
-* Re-release 1.04 with a proper Changes section for 1.04
+1.06
+ - Mark as deprecated
 
-1.04
+1.05 2013-08-13T11:04:53Z
+ - Re-release 1.04 with a proper Changes section for 1.04
 
-* Backport May 2013 security patches from 4.0 versions
-* Document that clearing the Mason cache is necessary
+1.04
+ - Backport May 2013 security patches from 4.0 versions
+ - Document that clearing the Mason cache is necessary
 
 1.03
-
-* whitelist /m/tickets/search from RT's CSRF protection in case someone
-  bookmarks a search from their mobile device and wants to rerun it.
+ - whitelist /m/tickets/search from RT's CSRF protection in case someone
+   bookmarks a search from their mobile device and wants to rerun it.
 
 1.02
-
-* Apply a number of XSS security fixes from 4.0-trunk, which resolve
-  CVE-2012-2769.
+ - Apply a number of XSS security fixes from 4.0-trunk, which resolve
+   CVE-2012-2769.
 
 1.01
-
-* Corrected the "Reply" link to default to reply rather than comment
+ - Corrected the "Reply" link to default to reply rather than comment
 
 1.00
-
-* Fixed redirection from mobile UI to normal ticket display
+ - Fixed redirection from mobile UI to normal ticket display
 
 0.99
+ - Fixed redirection from normal ticket display to mobile ticket display
 
-* Fixed redirection from normal ticket display to mobile ticket display
-
-0.98 
-
-* Avoid a double slash after the $WebURL when redirecting to some mobile pages
+0.98
+ - Avoid a double slash after the $WebURL when redirecting to some mobile
+   pages
 
 0.97
-
-* Added S60 as a mobile user agent. Thanks to Kristian Rikvold-Jess.
+ - Added S60 as a mobile user agent. Thanks to Kristian Rikvold-Jess.
 
 0.96
-
-* Added WebOS as a valid mobile user agent. Thanks to Jason Smith.
+ - Added WebOS as a valid mobile user agent. Thanks to Jason Smith.
 
 0.95
-
-* Additional fixes for RT instances running at subpaths, rather than the root ofa server.
+ - Additional fixes for RT instances running at subpaths, rather than the
+   root ofa server.
 
 0.94
-
-* Handle RT not located at / when redirecting from a ticket URL
+ - Handle RT not located at / when redirecting from a ticket URL
 
 0.93
-
-* Avoid redirect loops with /m/ and dhandler
+ - Avoid redirect loops with /m/ and dhandler
 
 0.92
-
-* an attempt at a fix for the homepage title
+ - an attempt at a fix for the homepage title
 
 0.91
-
-* Minor CSS styling, an attempt at a fix for the homepage title
-
+ - Minor CSS styling, an attempt at a fix for the homepage title
 
 0.9
+ - Initial release
 
-* Initial release
diff --git a/META.yml b/META.yml
index c791694..3147d15 100644
--- a/META.yml
+++ b/META.yml
@@ -20,4 +20,4 @@ no_index:
     - inc
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 1.06
+version: 1.07
diff --git a/lib/RT/Extension/MobileUI.pm b/lib/RT/Extension/MobileUI.pm
index b08986c..4351902 100644
--- a/lib/RT/Extension/MobileUI.pm
+++ b/lib/RT/Extension/MobileUI.pm
@@ -3,7 +3,7 @@ use strict;
 
 package RT::Extension::MobileUI;
 
-our $VERSION = "1.06";
+our $VERSION = "1.07";
 
 sub _encode_surrogates {
     my $uni = $_[0] - 0x10000;

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



More information about the Bps-public-commit mailing list