[Bps-public-commit] rtx-ticketlist-transactions branch, master, updated. 6aa445d413291d405025f31fd4848e113d83af7e

Thomas Sibley trs at bestpractical.com
Tue Sep 27 11:32:49 EDT 2011


The branch, master has been updated
       via  6aa445d413291d405025f31fd4848e113d83af7e (commit)
       via  dbb91c0dc15b81cd45fbcba2b3e87a46195468bb (commit)
       via  6e359a22709918dbc4cd04374b1a1851beb511f4 (commit)
      from  f39c12551008f0d45d04a06f2d3a441508d73660 (commit)

Summary of changes:
 MANIFEST                            |    3 ++
 META.yml                            |    4 ++-
 Makefile.PL                         |    3 ++
 inc/Module/Install/ReadmeFromPod.pm |   48 ++++++++++++++++++++++++++++
 lib/RTx/TicketlistTransactions.pm   |   60 +++++++++++++++++++++++++++++++++-
 5 files changed, 115 insertions(+), 3 deletions(-)
 create mode 100644 inc/Module/Install/ReadmeFromPod.pm

- Log -----------------------------------------------------------------
commit 6e359a22709918dbc4cd04374b1a1851beb511f4
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Sep 27 11:31:27 2011 -0400

    Add POD and generate a README

diff --git a/META.yml b/META.yml
index 115380d..0bf79ce 100644
--- a/META.yml
+++ b/META.yml
@@ -1,5 +1,7 @@
 ---
-abstract: 'RT TicketlistTransactions Extension'
+abstract: 'Adds LastTransactionContent as a search display column'
+author:
+  - 'Best Practical Solutions.'
 build_requires:
   ExtUtils::MakeMaker: 6.42
 configure_requires:
diff --git a/Makefile.PL b/Makefile.PL
index 298b197..46d51e7 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,3 +1,6 @@
 use inc::Module::Install;
 RTx('RTx-TicketlistTransactions');
+all_from('lib/RTx/TicketlistTransactions.pm');
+readme_from('lib/RTx/TicketlistTransactions.pm');
+sign;
 &WriteAll;
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
new file mode 100644
index 0000000..348531e
--- /dev/null
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -0,0 +1,48 @@
+#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.12';
+
+sub readme_from {
+  my $self = shift;
+  return unless $self->is_admin;
+
+  my $file = shift || $self->_all_from
+    or die "Can't determine file to make readme_from";
+  my $clean = shift;
+
+  print "Writing README from $file\n";
+
+  require Pod::Text;
+  my $parser = Pod::Text->new();
+  open README, '> README' or die "$!\n";
+  $parser->output_fh( *README );
+  $parser->parse_file( $file );
+  if ($clean) {
+    $self->clean_files('README');
+  }
+  return 1;
+}
+
+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 112
+
diff --git a/lib/RTx/TicketlistTransactions.pm b/lib/RTx/TicketlistTransactions.pm
index 0a52dee..2d8b5f0 100644
--- a/lib/RTx/TicketlistTransactions.pm
+++ b/lib/RTx/TicketlistTransactions.pm
@@ -2,4 +2,60 @@ package RTx::Ticketlist::Transactions;
 
 our $VERSION = 0.01;
 
+=head1 NAME
+
+RTx::TicketlistTransactions - Adds LastTransactionContent as a search display column
+
+=head1 INSTALLATION 
+
+=over
+
+=item perl Makefile.PL
+
+=item make
+
+=item make install
+
+May need root permissions
+
+=item Edit your /opt/rt4/etc/RT_SiteConfig.pm
+
+Add this line:
+
+    Set(@Plugins, qw(RTx::TicketlistTransactions));
+
+or add C<RTx::TicketlistTransactions> 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 TIPS
+
+This display column tends to work best when given its own row and a
+multi-column span, something like this advanced format:
+
+    '   <b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
+    '<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
+    '__Status__',
+    '__QueueName__',
+    '__LastUpdatedBy__',
+    '__NEWLINE__',
+    '',
+    '__LastTransactionContent__/SPAN:4'
+
+=head1 CAVEATS
+
+Only textual content is displayed, any formatting will be stripped.
+
+=head1 LICENCE AND COPYRIGHT
+
+This software is copyright (c) 2011 by Best Practical Solutions.
+
+=cut
+
 1;

commit dbb91c0dc15b81cd45fbcba2b3e87a46195468bb
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Sep 27 11:32:15 2011 -0400

    Update MANIFEST

diff --git a/MANIFEST b/MANIFEST
index 74bf07a..0ac39b9 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,10 +1,12 @@
 html/Callbacks/RTx-TicketlistTransactions/Elements/RT__Ticket/ColumnMap/Once
+html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/SetFieldsOnce
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 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
@@ -13,3 +15,4 @@ Makefile.PL
 MANIFEST			This list of files
 MANIFEST.SKIP
 META.yml
+README

commit 6aa445d413291d405025f31fd4848e113d83af7e
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Sep 27 11:32:35 2011 -0400

    Bump the version and make the package name match the file

diff --git a/lib/RTx/TicketlistTransactions.pm b/lib/RTx/TicketlistTransactions.pm
index 2d8b5f0..b7cc10f 100644
--- a/lib/RTx/TicketlistTransactions.pm
+++ b/lib/RTx/TicketlistTransactions.pm
@@ -1,6 +1,6 @@
-package RTx::Ticketlist::Transactions;
+package RTx::TicketlistTransactions;
 
-our $VERSION = 0.01;
+our $VERSION = 0.02;
 
 =head1 NAME
 

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



More information about the Bps-public-commit mailing list