[Bps-public-commit] rt-extension-jsgantt branch, master, updated. 7ea3d879b28f28bb904796c4948b3a6145d11b6a

Alex Vandiver alexmv at bestpractical.com
Tue Jun 17 14:24:18 EDT 2014


The branch, master has been updated
       via  7ea3d879b28f28bb904796c4948b3a6145d11b6a (commit)
       via  dbfe41f7328350faf606567b4978091befab4305 (commit)
       via  45d78d1d104ecc3f0b171158d85b690dfcbdd087 (commit)
       via  b8e43196560c2dbbd322ced0f958e01ca87fd06b (commit)
       via  e4ef7bc419c18c27adb3a98b94f88f0c7c1109f6 (commit)
       via  cac7aa2c47107ec74efa6058d2874e8d8d4a1f1f (commit)
       via  0d3ecc43dc71ea9e2a1c243dc8fd76d75008c075 (commit)
      from  3462406afab5206a349419d887143bc41a24e356 (commit)

Summary of changes:
 .gitignore                                         |   4 +
 Changes                                            |   5 +-
 MANIFEST                                           |   1 +
 MANIFEST.SKIP                                      |   5 -
 META.yml                                           |   5 +-
 Makefile.PL                                        |   3 +
 README                                             | 109 ++++++++++------
 html/Callbacks/JSGantt/Elements/Header/Head        |  29 +++--
 html/Callbacks/JSGantt/Elements/Tabs/Privileged    |  28 ++---
 .../JSGantt/Search/Elements/ResultViews/AfterTools |  28 ++---
 .../JSGantt/Ticket/Elements/ShowSummary/LinksExtra |  29 +++--
 html/Search/JSGantt.html                           |  47 +++++++
 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                | 138 +++++++++++++++++++++
 inc/Module/Install/Win32.pm                        |   2 +-
 inc/Module/Install/WriteAll.pm                     |   2 +-
 lib/RT/Extension/JSGantt.pm                        |  97 ++++++++++++++-
 {html/NoAuth => static}/css/jsgantt.css            |   0
 24 files changed, 470 insertions(+), 143 deletions(-)
 create mode 100644 .gitignore
 delete mode 100644 MANIFEST.SKIP
 create mode 100644 inc/Module/Install/ReadmeFromPod.pm
 rename {html/NoAuth => static}/css/jsgantt.css (100%)

- Log -----------------------------------------------------------------
commit 0d3ecc43dc71ea9e2a1c243dc8fd76d75008c075
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 16:59:28 2014 -0400

    Move docs in, from README, and use modern standard form

diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index b724342..9b65371 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -50,9 +50,73 @@
 
 RT::Extension::JSGantt - Gantt charts for your tickets
 
-=head1 SYNOPSIS
+=head1 DESCRIPTION
 
-    use RT::Extension::JSGantt;
+This extension uses the Starts and Due dates, along with ticket
+dependencies, to produce Gantt charts.
+
+=head1 INSTALLATION
+
+=over
+
+=item C<perl Makefile.PL>
+
+=item C<make>
+
+=item C<make install>
+
+May need root permissions
+
+=item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
+
+If you are using RT 4.2 or greater, add this line:
+
+    Plugin('RT::Extension::JSGantt');
+
+For RT 3.8 and 4.0, add this line:
+
+    Set(@Plugins, qw(RT::Extension::JSGantt));
+
+or add C<RT::Extension::JSGantt> to your existing C<@Plugins> line.
+
+=item Clear your mason cache
+
+    rm -rf /opt/rt4/var/mason_data/obj
+
+=item Restart your webserver
+
+=back
+
+=head1 CONFIGURATION
+
+    Set(
+        %JSGanttOptions,
+        DefaultFormat => 'day', # or week or month or quarter
+        ShowOwner     => 1,
+        ShowProgress  => 1,
+        ShowDuration  => 1,
+
+        # define your own color scheme:
+        # ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', '00ffff', '0000ff'],
+
+        # we color owners consistently by default, you can disable it via:
+        # ColorSchemeByOwner => 0,
+
+        # you can specify colors to use, unspecified owners will be
+        # assigned to some color automatically:
+        # ColorSchemeByOwner => { root => 'ff0000', foo => '00ff00' },
+
+        # if can't find both start and end dates, use this color
+        NullDatesColor => 333,
+
+        # to caculate day length
+        WorkingHoursPerDay => 8,
+
+        # used to set start/end if one exists but the other does not
+        DefaultDays => 7,
+    );
+
+=head1 METHODS
 
 =cut
 
@@ -459,4 +523,26 @@ sub _ParentTicket {
     return;
 }
 
+
+=head1 AUTHOR
+
+sunnavy <sunnavy at bestpractical.com>
+
+=head1 BUGS
+
+All bugs should be reported via email to
+L<bug-RT-Extension-JSGantt at rt.cpan.org|mailto:bug-RT-Extension-JSGantt at rt.cpan.org>
+or via the web at
+L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-JSGantt>.
+
+=head1 LICENSE AND COPYRIGHT
+
+This software is Copyright (c) 2014 by Best Practical Solutions
+
+This is free software, licensed under:
+
+  The GNU General Public License, Version 2, June 1991
+
+=cut
+
 1;

commit cac7aa2c47107ec74efa6058d2874e8d8d4a1f1f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 17:50:15 2014 -0400

    The default MANIFEST.SKIP includes these, and many others (.git, etc)

diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
deleted file mode 100644
index e849adc..0000000
--- a/MANIFEST.SKIP
+++ /dev/null
@@ -1,5 +0,0 @@
-^Makefile$
-^pm_to_blib
-^MANIFEST.SKIP
-^MANIFEST.bak
-^blib

commit e4ef7bc419c18c27adb3a98b94f88f0c7c1109f6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 17:51:14 2014 -0400

    Add a basic .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bbfdbc0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/blib/
+/pm_to_blib
+/Makefile
+/MYMETA.*

commit b8e43196560c2dbbd322ced0f958e01ca87fd06b
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 18:14:19 2014 -0400

    Use RT 4.0/4.2 static content methods for CSS
    
    The JavaScript contains mason (to decide on M/D/Y vs D/M/Y) and as such
    cannot be served from static/ and squished.  The 4.2 solution would be
    to place the preference in the JavaScript user configuration hash;
    however, this is unsuitable for 4.0.

diff --git a/html/Callbacks/JSGantt/Elements/Header/Head b/html/Callbacks/JSGantt/Elements/Header/Head
index 4a34104..84af27f 100644
--- a/html/Callbacks/JSGantt/Elements/Header/Head
+++ b/html/Callbacks/JSGantt/Elements/Header/Head
@@ -45,5 +45,4 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')%>/NoAuth/css/jsgantt.css"/>
 <script language="javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/jsgantt.js"></script>
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 9b65371..8cc8dc4 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -128,6 +128,9 @@ use warnings;
 use strict;
 use List::MoreUtils 'insert_after', 'uniq';
 
+# JS contains mason, and as such cannot use RT->AddJavaScript
+RT->AddStyleSheets('jsgantt.css');
+
 =head2 AllRelatedTickets
 
 Given a ticket, return all the relative tickets, including the original ticket.
diff --git a/html/NoAuth/css/jsgantt.css b/static/css/jsgantt.css
similarity index 100%
rename from html/NoAuth/css/jsgantt.css
rename to static/css/jsgantt.css

commit 45d78d1d104ecc3f0b171158d85b690dfcbdd087
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Jun 17 14:21:21 2014 -0400

    Update license tags

diff --git a/html/Callbacks/JSGantt/Elements/Header/Head b/html/Callbacks/JSGantt/Elements/Header/Head
index 84af27f..bb996ee 100644
--- a/html/Callbacks/JSGantt/Elements/Header/Head
+++ b/html/Callbacks/JSGantt/Elements/Header/Head
@@ -1,40 +1,40 @@
 %# BEGIN BPS TAGGED BLOCK {{{
-%# 
+%#
 %# COPYRIGHT:
-%# 
+%#
 %# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
+%#                                          <sales 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/licenses/old-licenses/gpl-2.0.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
@@ -43,6 +43,6 @@
 %# 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 }}}
 <script language="javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/jsgantt.js"></script>
diff --git a/html/Callbacks/JSGantt/Elements/Tabs/Privileged b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
index 6960553..b8745a4 100644
--- a/html/Callbacks/JSGantt/Elements/Tabs/Privileged
+++ b/html/Callbacks/JSGantt/Elements/Tabs/Privileged
@@ -1,40 +1,40 @@
 %# BEGIN BPS TAGGED BLOCK {{{
-%# 
+%#
 %# COPYRIGHT:
-%# 
+%#
 %# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
+%#                                          <sales 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/licenses/old-licenses/gpl-2.0.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
@@ -43,7 +43,7 @@
 %# 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 $request_path = $HTML::Mason::Commands::r->path_info;
diff --git a/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools b/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
index ade2dc5..6657de3 100644
--- a/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
+++ b/html/Callbacks/JSGantt/Search/Elements/ResultViews/AfterTools
@@ -1,40 +1,40 @@
 %# BEGIN BPS TAGGED BLOCK {{{
-%# 
+%#
 %# COPYRIGHT:
-%# 
+%#
 %# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
+%#                                          <sales 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/licenses/old-licenses/gpl-2.0.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
@@ -43,7 +43,7 @@
 %# 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 }}}
 <li><a
 href="<%RT->Config->Get('WebPath')%>/Search/JSGantt.html<%$ARGS{QueryString}%>"><&|/l&>Gantt Chart</&></a></li>
diff --git a/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra b/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
index 4d580eb..c0dbf77 100644
--- a/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
+++ b/html/Callbacks/JSGantt/Ticket/Elements/ShowSummary/LinksExtra
@@ -1,40 +1,40 @@
 %# BEGIN BPS TAGGED BLOCK {{{
-%# 
+%#
 %# COPYRIGHT:
-%# 
+%#
 %# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
-%#                                          <jesse at bestpractical.com>
-%# 
+%#                                          <sales 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/licenses/old-licenses/gpl-2.0.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
@@ -43,9 +43,8 @@
 %# 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 %hash = @$extra;
 $hash{titleright_raw} ||= '';
diff --git a/html/Search/JSGantt.html b/html/Search/JSGantt.html
index 473d8c6..3234a11 100644
--- a/html/Search/JSGantt.html
+++ b/html/Search/JSGantt.html
@@ -1,3 +1,50 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+%#                                          <sales 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/licenses/old-licenses/gpl-2.0.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 }}}
 <& /Elements/Header, Title => $title,
     Refresh => $session{'tickets_refresh_interval'} || RT->Config->Get('SearchResultsRefreshInterval', $session{'CurrentUser'} ),
     &>
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 8cc8dc4..2de4c19 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -3,7 +3,7 @@
 # COPYRIGHT:
 #
 # This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
-#                                          <jesse at bestpractical.com>
+#                                          <sales at bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
 #

commit dbfe41f7328350faf606567b4978091befab4305
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 17:47:32 2014 -0400

    release 0.21

diff --git a/Changes b/Changes
index d744445..5fb0b3c 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,9 @@
 Revision history for RT-Extension-JSGantt
 
-0.21
+0.21 Wed Jun 16 23:32:17 EDT 2014
+
+    * Packaging updates; no code change.  This includes serving the CSS
+      from static/ under RT 4.2
 
 0.20 Mon Feb 10 19:25:33 CST 2014
 
diff --git a/MANIFEST b/MANIFEST
index af04f47..a0ecd40 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -13,6 +13,7 @@ inc/Module/Install/Can.pm
 inc/Module/Install/Fetch.pm
 inc/Module/Install/Makefile.pm
 inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
 inc/Module/Install/RTx.pm
 inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
diff --git a/META.yml b/META.yml
index dd808e7..3588721 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: gplv2
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,9 +19,10 @@ no_index:
     - etc
     - html
     - inc
+    - static
 requires:
   JSON: 0
   List::MoreUtils: 0
 resources:
   repository: git://github.com/bestpractical/rt-extension-jsgantt.git
-version: 0.21
+version: '0.21'
diff --git a/Makefile.PL b/Makefile.PL
index b06ef59..bb83b3e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -5,6 +5,7 @@ RTx('RT-Extension-JSGantt');
 
 author ('sunnavy <sunnavy at bestpractical.com>');
 abstract_from('lib/RT/Extension/JSGantt.pm');
+readme_from('lib/RT/Extension/JSGantt.pm');
 license('GPLv2');
 
 repository 'git://github.com/bestpractical/rt-extension-jsgantt.git';
@@ -12,4 +13,6 @@ repository 'git://github.com/bestpractical/rt-extension-jsgantt.git';
 requires( 'JSON' );
 requires( 'List::MoreUtils' );
 
+requires_rt('4.0.0');
+
 &WriteAll;
diff --git a/README b/README
index c609a7e..febd37f 100644
--- a/README
+++ b/README
@@ -1,51 +1,88 @@
-RT-Extension-JSGantt version 0.21
+NAME
+    RT::Extension::JSGantt - Gantt charts for your tickets
 
-CAVEAT: please use version 0.18 if you are running RT 3.
+DESCRIPTION
+    This extension uses the Starts and Due dates, along with ticket
+    dependencies, to produce Gantt charts.
 
-How to install:
+INSTALLATION
+    "perl Makefile.PL"
+    "make"
+    "make install"
+        May need root permissions
 
-1. perl Makefile.PL
-2. make
-3. make install ( you may need root permission )
-4. config items in etc/RT_SiteConfig.pm
-    # add RT::Extension::JSGantt to @Plugins: e.g.
-        Set(@Plugins,'RT::Extension::JSGantt');
-    # customize JSGantt as you wish:
+    Edit your /opt/rt4/etc/RT_SiteConfig.pm
+        If you are using RT 4.2 or greater, add this line:
 
-    Set(
-        %JSGanttOptions,
-        DefaultFormat => 'day', # or week or month or quarter
-        ShowOwner     => 1,
-        ShowProgress  => 1,
-        ShowDuration  => 1,
+            Plugin('RT::Extension::JSGantt');
 
-        # define your own color scheme:
-        # ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', '00ffff', '0000ff'],
+        For RT 3.8 and 4.0, add this line:
 
-        # we color owners consistently by default, you can disable it via:
-        # ColorSchemeByOwner => 0,
+            Set(@Plugins, qw(RT::Extension::JSGantt));
 
-        # you can specify colors to use, unspecified owners will be
-        # assigned to some color automatically:
-        # ColorSchemeByOwner => { root => 'ff0000', foo => '00ff00' },
+        or add "RT::Extension::JSGantt" to your existing @Plugins line.
 
-        # if can't find both start and end dates, use this color
-        NullDatesColor => 333,
+    Clear your mason cache
+            rm -rf /opt/rt4/var/mason_data/obj
 
-        # to caculate day length
-        WorkingHoursPerDay => 8,
+    Restart your webserver
 
-        # used to set start/end if one exists but the other does not
-        DefaultDays => 7,
-    );
+CONFIGURATION
+        Set(
+            %JSGanttOptions,
+            DefaultFormat => 'day', # or week or month or quarter
+            ShowOwner     => 1,
+            ShowProgress  => 1,
+            ShowDuration  => 1,
 
-6. restart RT
+            # define your own color scheme:
+            # ColorScheme => ['ff0000', 'ffff00', 'ff00ff', '00ff00', '00ffff', '0000ff'],
 
-How to update jsgantt.js and jsgantt.css:
+            # we color owners consistently by default, you can disable it via:
+            # ColorSchemeByOwner => 0,
 
-To make it work better with RT, we changed original jsgantt.js and jsgantt.css,
-which can be found in jsgantt.diff.
+            # you can specify colors to use, unspecified owners will be
+            # assigned to some color automatically:
+            # ColorSchemeByOwner => { root => 'ff0000', foo => '00ff00' },
 
-If you want to update jsgantt.js and jsgantt.css to a new version, please 
-review the diff to see what have been changed and maybe do the same change too.
+            # if can't find both start and end dates, use this color
+            NullDatesColor => 333,
+
+            # to caculate day length
+            WorkingHoursPerDay => 8,
+
+            # used to set start/end if one exists but the other does not
+            DefaultDays => 7,
+        );
+
+METHODS
+  AllRelatedTickets
+    Given a ticket, return all the relative tickets, including the original
+    ticket.
+
+  TicketsInfo
+    Given tickets, resolve useful info for jsgantt.js Returns a 2 elements
+    array, 1st is the ids arrayref, 2nd is the info hashref.
+
+  GetTimeRange
+    Given a ticket, resolve it's start/end. Returns an array like (
+    $start_obj, $start, $end_obj, $end ) $start and $end are strings like
+    3/21/2011
+
+AUTHOR
+    sunnavy <sunnavy at bestpractical.com>
+
+BUGS
+    All bugs should be reported via email to
+    bug-RT-Extension-JSGantt at rt.cpan.org
+    <mailto:bug-RT-Extension-JSGantt at rt.cpan.org> or via the web at
+    rt.cpan.org
+    <http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-JSGantt>.
+
+LICENSE AND COPYRIGHT
+    This software is Copyright (c) 2014 by Best Practical Solutions
+
+    This is free software, licensed under:
+
+      The GNU General Public License, Version 2, June 1991
 
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 ac04c79..f9ead18 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.32';
+our $VERSION = '0.34';
 
 use FindBin;
 use File::Glob     ();
@@ -88,6 +88,11 @@ sub RTx {
             ."Upgrade to RT 3.8.1 or newer.\n" if $RT::VERSION =~ /^3\.8\.0/;
         $path{$_} = $RT::LocalPluginPath . "/$original_name/$_"
             foreach @DIRS;
+
+        # Copy RT 4.2.0 static files into NoAuth; insufficient for
+        # images, but good enough for css and js.
+        $path{static} = "$path{html}/NoAuth/"
+            unless $RT::StaticPath;
     } else {
         foreach ( @DIRS ) {
             no strict 'refs';
@@ -136,7 +141,9 @@ install ::
         $has_etc{acl}++;
     }
     if ( -e 'etc/initialdata' ) { $has_etc{initialdata}++; }
-    if ( -d 'etc/upgrade/' )    { $has_etc{upgrade}++; }
+    if ( grep { /\d+\.\d+\.\d+.*$/ } glob('etc/upgrade/*.*.*') ) {
+        $has_etc{upgrade}++;
+    }
 
     $self->postamble("$postamble\n");
     unless ( $subdirs{'lib'} ) {
@@ -174,46 +181,50 @@ install ::
     }
 }
 
-# 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 336
+#line 367
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
new file mode 100644
index 0000000..b5e03c3
--- /dev/null
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -0,0 +1,138 @@
+#line 1
+package Module::Install::ReadmeFromPod;
+
+use 5.006;
+use strict;
+use warnings;
+use base qw(Module::Install::Base);
+use vars qw($VERSION);
+
+$VERSION = '0.22';
+
+sub readme_from {
+  my $self = shift;
+  return unless $self->is_admin;
+
+  # Input file
+  my $in_file  = shift || $self->_all_from
+    or die "Can't determine file to make readme_from";
+
+  # Get optional arguments
+  my ($clean, $format, $out_file, $options);
+  my $args = shift;
+  if ( ref $args ) {
+    # Arguments are in a hashref
+    if ( ref($args) ne 'HASH' ) {
+      die "Expected a hashref but got a ".ref($args)."\n";
+    } else {
+      $clean    = $args->{'clean'};
+      $format   = $args->{'format'};
+      $out_file = $args->{'output_file'};
+      $options  = $args->{'options'};
+    }
+  } else {
+    # Arguments are in a list
+    $clean    = $args;
+    $format   = shift;
+    $out_file = shift;
+    $options  = \@_;
+  }
+
+  # Default values;
+  $clean  ||= 0;
+  $format ||= 'txt';
+
+  # Generate README
+  print "readme_from $in_file to $format\n";
+  if ($format =~ m/te?xt/) {
+    $out_file = $self->_readme_txt($in_file, $out_file, $options);
+  } elsif ($format =~ m/html?/) {
+    $out_file = $self->_readme_htm($in_file, $out_file, $options);
+  } elsif ($format eq 'man') {
+    $out_file = $self->_readme_man($in_file, $out_file, $options);
+  } elsif ($format eq 'pdf') {
+    $out_file = $self->_readme_pdf($in_file, $out_file, $options);
+  }
+
+  if ($clean) {
+    $self->clean_files($out_file);
+  }
+
+  return 1;
+}
+
+
+sub _readme_txt {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README';
+  require Pod::Text;
+  my $parser = Pod::Text->new( @$options );
+  open my $out_fh, '>', $out_file or die "Could not write file $out_file:\n$!\n";
+  $parser->output_fh( *$out_fh );
+  $parser->parse_file( $in_file );
+  close $out_fh;
+  return $out_file;
+}
+
+
+sub _readme_htm {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.htm';
+  require Pod::Html;
+  Pod::Html::pod2html(
+    "--infile=$in_file",
+    "--outfile=$out_file",
+    @$options,
+  );
+  # Remove temporary files if needed
+  for my $file ('pod2htmd.tmp', 'pod2htmi.tmp') {
+    if (-e $file) {
+      unlink $file or warn "Warning: Could not remove file '$file'.\n$!\n";
+    }
+  }
+  return $out_file;
+}
+
+
+sub _readme_man {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.1';
+  require Pod::Man;
+  my $parser = Pod::Man->new( @$options );
+  $parser->parse_from_file($in_file, $out_file);
+  return $out_file;
+}
+
+
+sub _readme_pdf {
+  my ($self, $in_file, $out_file, $options) = @_;
+  $out_file ||= 'README.pdf';
+  eval { require App::pod2pdf; }
+    or die "Could not generate $out_file because pod2pdf could not be found\n";
+  my $parser = App::pod2pdf->new( @$options );
+  $parser->parse_from_file($in_file);
+  open my $out_fh, '>', $out_file or die "Could not write file $out_file:\n$!\n";
+  select $out_fh;
+  $parser->output;
+  select STDOUT;
+  close $out_fh;
+  return $out_file;
+}
+
+
+sub _all_from {
+  my $self = shift;
+  return unless $self->admin->{extensions};
+  my ($metadata) = grep {
+    ref($_) eq 'Module::Install::Metadata';
+  } @{$self->admin->{extensions}};
+  return unless $metadata;
+  return $metadata->{values}{all_from} || '';
+}
+
+'Readme!';
+
+__END__
+
+#line 254
+
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 7ea3d879b28f28bb904796c4948b3a6145d11b6a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 11 17:52:58 2014 -0400

    bump version to 0.22

diff --git a/META.yml b/META.yml
index 3588721..04bc085 100644
--- a/META.yml
+++ b/META.yml
@@ -25,4 +25,4 @@ requires:
   List::MoreUtils: 0
 resources:
   repository: git://github.com/bestpractical/rt-extension-jsgantt.git
-version: '0.21'
+version: '0.22'
diff --git a/lib/RT/Extension/JSGantt.pm b/lib/RT/Extension/JSGantt.pm
index 2de4c19..be74bc7 100644
--- a/lib/RT/Extension/JSGantt.pm
+++ b/lib/RT/Extension/JSGantt.pm
@@ -122,7 +122,7 @@ or add C<RT::Extension::JSGantt> to your existing C<@Plugins> line.
 
 package RT::Extension::JSGantt;
 
-our $VERSION = '0.21';
+our $VERSION = '0.22';
 
 use warnings;
 use strict;

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


More information about the Bps-public-commit mailing list