[Bps-public-commit] rtx-ticketlist-transactions branch, master, updated. 0.02-7-ge7e1d7a
Kevin Falcone
falcone at bestpractical.com
Fri Mar 7 16:10:28 EST 2014
The branch, master has been updated
via e7e1d7ae3d598eb47fb46a0fb9abdb7eeb26d697 (commit)
via 2332ef305bca3827ad55b69035c4c4319a9ef6f8 (commit)
via 67cb8d58af4afdec280f26c33c4748d8850a3b41 (commit)
via a3ba54ddc32508e8cbcb97153248afc2d63ec4cd (commit)
via 881116df2d379fc139b85de1d66c603bc2a01535 (commit)
via 26531b78df5b7f14e834fe43ff1f293a7ae7d446 (commit)
via 4ecf5a1874f033de29a9f666a125c40f6aeea46a (commit)
from f7a1d71ca596dc29ba4dec82242d7be43d5f72af (commit)
Summary of changes:
.gitignore | 14 +++
.shipit | 10 --
Changes | 9 ++
MANIFEST | 4 +-
MANIFEST.SKIP | 11 --
META.yml | 17 ++--
Makefile.PL | 1 +
README | 52 ++++++++++
.../BuildFormatString/{SetFieldsOnce => Default} | 0
inc/Module/Install.pm | 6 +-
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 85 ++++++++++++++--
inc/Module/Install/Fetch.pm | 2 +-
inc/Module/Install/Makefile.pm | 27 ++---
inc/Module/Install/Metadata.pm | 22 ++--
inc/Module/Install/RTx.pm | 106 +++++++++----------
inc/Module/Install/ReadmeFromPod.pm | 112 +++++++++++++++++++--
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
lib/RTx/TicketlistTransactions.pm | 18 +++-
20 files changed, 370 insertions(+), 132 deletions(-)
delete mode 100644 .shipit
create mode 100644 Changes
delete mode 100644 MANIFEST.SKIP
create mode 100644 README
rename html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/{SetFieldsOnce => Default} (100%)
- Log -----------------------------------------------------------------
commit 4ecf5a1874f033de29a9f666a125c40f6aeea46a
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 15:04:18 2014 -0500
ignore things
diff --git a/.gitignore b/.gitignore
index e69de29..201b9ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,14 @@
+blib*
+Makefile
+Makefile.old
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+cover_db
+pod2htm*.tmp
+/RTx-TicketList*
+*.bak
+*.swp
+/MYMETA.*
+/t/tmp
+/xt/tmp
commit 26531b78df5b7f14e834fe43ff1f293a7ae7d446
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 15:04:20 2014 -0500
Upgrade Module::Install and ::RTx
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 74caf9c..4ecf46b 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.01';
+ $VERSION = '1.06';
# Storage for the pseudo-singleton
$MAIN = undef;
@@ -451,7 +451,7 @@ sub _version ($) {
}
sub _cmp ($$) {
- _version($_[0]) <=> _version($_[1]);
+ _version($_[1]) <=> _version($_[2]);
}
# Cloned from Params::Util::_CLASS
@@ -467,4 +467,4 @@ sub _CLASS ($) {
1;
-# Copyright 2008 - 2011 Adam Kennedy.
+# Copyright 2008 - 2012 Adam Kennedy.
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index d3662c9..802844a 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.01';
+ $VERSION = '1.06';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 276409a..22167b8 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -3,13 +3,12 @@ package Module::Install::Can;
use strict;
use Config ();
-use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.01';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -29,7 +28,7 @@ sub can_use {
eval { require $mod; $pkg->VERSION($ver || 0); 1 };
}
-# check if we can run some command
+# Check if we can run some command
sub can_run {
my ($self, $cmd) = @_;
@@ -38,14 +37,88 @@ sub can_run {
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
- my $abs = File::Spec->catfile($dir, $_[1]);
+ require File::Spec;
+ my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
return;
}
-# can we locate a (the) C compiler
+# Can our C compiler environment build XS files
+sub can_xs {
+ my $self = shift;
+
+ # Ensure we have the CBuilder module
+ $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
+
+ # Do we have the configure_requires checker?
+ local $@;
+ eval "require ExtUtils::CBuilder;";
+ if ( $@ ) {
+ # They don't obey configure_requires, so it is
+ # someone old and delicate. Try to avoid hurting
+ # them by falling back to an older simpler test.
+ return $self->can_cc();
+ }
+
+ # Do we have a working C compiler
+ my $builder = ExtUtils::CBuilder->new(
+ quiet => 1,
+ );
+ unless ( $builder->have_compiler ) {
+ # No working C compiler
+ return 0;
+ }
+
+ # Write a C file representative of what XS becomes
+ require File::Temp;
+ my ( $FH, $tmpfile ) = File::Temp::tempfile(
+ "compilexs-XXXXX",
+ SUFFIX => '.c',
+ );
+ binmode $FH;
+ print $FH <<'END_C';
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+int boot_sanexs() {
+ return 1;
+}
+
+END_C
+ close $FH;
+
+ # Can the C compiler access the same headers XS does
+ my @libs = ();
+ my $object = undef;
+ eval {
+ local $^W = 0;
+ $object = $builder->compile(
+ source => $tmpfile,
+ );
+ @libs = $builder->link(
+ objects => $object,
+ module_name => 'sanexs',
+ );
+ };
+ my $result = $@ ? 0 : 1;
+
+ # Clean up all the build files
+ foreach ( $tmpfile, $object, @libs ) {
+ next unless defined $_;
+ 1 while unlink;
+ }
+
+ return $result;
+}
+
+# Can we locate a (the) C compiler
sub can_cc {
my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return;
@@ -78,4 +151,4 @@ if ( $^O eq 'cygwin' ) {
__END__
-#line 156
+#line 236
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index 093cb7a..bee0c4f 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.01';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 4c71003..7052f36 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.01';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -215,18 +215,22 @@ sub write {
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
- # MakeMaker can complain about module versions that include
- # an underscore, even though its own version may contain one!
- # Hence the funny regexp to get rid of it. See RT #35800
- # for details.
- my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
- $self->build_requires( 'ExtUtils::MakeMaker' => $v );
- $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
+ # This previous attempted to inherit the version of
+ # ExtUtils::MakeMaker in use by the module author, but this
+ # was found to be untenable as some authors build releases
+ # using future dev versions of EU:MM that nobody else has.
+ # Instead, #toolchain suggests we use 6.59 which is the most
+ # stable version on CPAN at time of writing and is, to quote
+ # ribasushi, "not terminally fucked, > and tested enough".
+ # TODO: We will now need to maintain this over time to push
+ # the version up as new versions are released.
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005.
- $self->build_requires( 'ExtUtils::MakeMaker' => 6.42 );
- $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+ $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
+ $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
}
# Generate the MakeMaker params
@@ -241,7 +245,6 @@ in a module, and provide its file path via 'version_from' (or
'all_from' if you prefer) in Makefile.PL.
EOT
- $DB::single = 1;
if ( $self->tests ) {
my @tests = split ' ', $self->tests;
my %seen;
@@ -412,4 +415,4 @@ sub postamble {
__END__
-#line 541
+#line 544
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 3b01e09..58430f3 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.01';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
@@ -151,15 +151,21 @@ sub install_as_site { $_[0]->installdirs('site') }
sub install_as_vendor { $_[0]->installdirs('vendor') }
sub dynamic_config {
- my $self = shift;
- unless ( @_ ) {
- warn "You MUST provide an explicit true/false value to dynamic_config\n";
- return $self;
+ my $self = shift;
+ my $value = @_ ? shift : 1;
+ if ( $self->{values}->{dynamic_config} ) {
+ # Once dynamic we never change to static, for safety
+ return 0;
}
- $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+ $self->{values}->{dynamic_config} = $value ? 1 : 0;
return 1;
}
+# Convenience command
+sub static_config {
+ shift->dynamic_config(0);
+}
+
sub perl_version {
my $self = shift;
return $self->{values}->{perl_version} unless @_;
@@ -170,7 +176,7 @@ sub perl_version {
# Normalize the version
$version = $self->_perl_version($version);
- # We don't support the reall old versions
+ # We don't support the really old versions
unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
}
@@ -582,7 +588,7 @@ sub bugtracker_from {
sub requires_from {
my $self = shift;
my $content = Module::Install::_readperl($_[0]);
- my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+ my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
while ( @requires ) {
my $module = shift @requires;
my $version = shift @requires;
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 73b9cda..469eb42 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,13 +8,13 @@ no warnings 'once';
use Module::Install::Base;
use base 'Module::Install::Base';
-our $VERSION = '0.29';
+our $VERSION = '0.32_02';
use FindBin;
use File::Glob ();
use File::Basename ();
-my @DIRS = qw(etc lib html bin sbin po var);
+my @DIRS = qw(etc lib html static bin sbin po var);
my @INDEX_DIRS = qw(lib bin sbin);
sub RTx {
@@ -62,10 +62,11 @@ sub RTx {
unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
unshift @INC, $lib_path;
- $RT::LocalVarPath ||= $RT::VarPath;
- $RT::LocalPoPath ||= $RT::LocalLexiconPath;
- $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
- $RT::LocalLibPath ||= "$RT::LocalPath/lib";
+ $RT::LocalVarPath ||= $RT::VarPath;
+ $RT::LocalPoPath ||= $RT::LocalLexiconPath;
+ $RT::LocalHtmlPath ||= $RT::MasonComponentRoot;
+ $RT::LocalStaticPath ||= $RT::StaticPath;
+ $RT::LocalLibPath ||= "$RT::LocalPath/lib";
my $with_subdirs = $ENV{WITH_SUBDIRS};
@ARGV = grep { /WITH_SUBDIRS=(.*)/ ? ( ( $with_subdirs = $1 ), 0 ) : 1 }
@@ -129,23 +130,15 @@ install ::
my %has_etc;
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/schema.*") ) {
-
- # got schema, load factory module
$has_etc{schema}++;
- $self->load('RTxFactory');
- $self->postamble(<< ".");
-factory ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name))"
-
-dropdb ::
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxFactory(qw($RTx $name drop))"
-
-.
}
if ( File::Glob::bsd_glob("$FindBin::Bin/etc/acl.*") ) {
$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,68 +157,69 @@ dropdb ::
print "For first-time installation, type 'make initdb'.\n";
my $initdb = '';
$initdb .= <<"." if $has_etc{schema};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(schema \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{acl};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(acl \$(NAME) \$(VERSION)))"
.
$initdb .= <<"." if $has_etc{initialdata};
-\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert))"
+\t\$(NOECHO) \$(PERL) -Ilib -I"$local_lib_path" -I"$lib_path" -Minc::Module::Install -e"RTxInitDB(qw(insert \$(NAME) \$(VERSION)))"
.
$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");
+ }
}
}
-sub RTxInit {
- unshift @INC, substr( delete( $INC{'RT.pm'} ), 0, -5 ) if $INC{'RT.pm'};
- require RT;
- RT::LoadConfig();
- RT::ConnectToDatabase();
-
- 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;
+ _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 348
+#line 362
diff --git a/inc/Module/Install/ReadmeFromPod.pm b/inc/Module/Install/ReadmeFromPod.pm
index 348531e..b5e03c3 100644
--- a/inc/Module/Install/ReadmeFromPod.pm
+++ b/inc/Module/Install/ReadmeFromPod.pm
@@ -7,29 +7,119 @@ use warnings;
use base qw(Module::Install::Base);
use vars qw($VERSION);
-$VERSION = '0.12';
+$VERSION = '0.22';
sub readme_from {
my $self = shift;
return unless $self->is_admin;
- my $file = shift || $self->_all_from
+ # Input file
+ my $in_file = shift || $self->_all_from
or die "Can't determine file to make readme_from";
- my $clean = shift;
- print "Writing README from $file\n";
+ # 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);
+ }
- 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');
+ $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};
@@ -44,5 +134,5 @@ sub _all_from {
__END__
-#line 112
+#line 254
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index 3139a63..eeaa3fe 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.01';
+ $VERSION = '1.06';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 1f724a7..85d8018 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.01';
+ $VERSION = '1.06';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
commit 881116df2d379fc139b85de1d66c603bc2a01535
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 15:04:37 2014 -0500
Update README
diff --git a/README b/README
new file mode 100644
index 0000000..4880236
--- /dev/null
+++ b/README
@@ -0,0 +1,52 @@
+NAME
+ RTx::TicketlistTransactions - Adds LastTransactionContent as a search
+ display column
+
+RT VERSION
+ Works with RT 4.0 and 4.2
+
+INSTALLATION
+ perl Makefile.PL
+ make
+ make install
+ May need root permissions
+
+ Edit your /opt/rt4/etc/RT_SiteConfig.pm
+ If you are using RT 4.2 or greater, add this line:
+
+ Plugin('RTx::TicketlistTransactions');
+
+ For RT 4.0, add this line:
+
+ Set(@Plugins, qw(RTx::TicketlistTransactions));
+
+ or add "RTx::TicketlistTransactions" to your existing @Plugins line.
+
+ Clear your mason cache
+ rm -rf /opt/rt4/var/mason_data/obj
+
+ Restart your webserver
+
+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'
+
+CAVEATS
+ Only textual content is displayed, any formatting will be stripped.
+
+LICENCE AND COPYRIGHT
+ This software is copyright (c) 2011-2014 by Best Practical Solutions.
+
+ This is free software, licensed under:
+
+ The GNU General Public License, Version 2, June 1991
+
diff --git a/lib/RTx/TicketlistTransactions.pm b/lib/RTx/TicketlistTransactions.pm
index b7cc10f..80a4d09 100644
--- a/lib/RTx/TicketlistTransactions.pm
+++ b/lib/RTx/TicketlistTransactions.pm
@@ -6,6 +6,10 @@ our $VERSION = 0.02;
RTx::TicketlistTransactions - Adds LastTransactionContent as a search display column
+=head1 RT VERSION
+
+Works with RT 4.0 and 4.2
+
=head1 INSTALLATION
=over
@@ -20,7 +24,11 @@ May need root permissions
=item Edit your /opt/rt4/etc/RT_SiteConfig.pm
-Add this line:
+If you are using RT 4.2 or greater, add this line:
+
+ Plugin('RTx::TicketlistTransactions');
+
+For RT 4.0, add this line:
Set(@Plugins, qw(RTx::TicketlistTransactions));
@@ -54,7 +62,11 @@ Only textual content is displayed, any formatting will be stripped.
=head1 LICENCE AND COPYRIGHT
-This software is copyright (c) 2011 by Best Practical Solutions.
+This software is copyright (c) 2011-2014 by Best Practical Solutions.
+
+This is free software, licensed under:
+
+ The GNU General Public License, Version 2, June 1991
=cut
commit a3ba54ddc32508e8cbcb97153248afc2d63ec4cd
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 15:05:32 2014 -0500
Specify a perl version and regen META.yml
diff --git a/META.yml b/META.yml
index 2645707..d53f3bc 100644
--- a/META.yml
+++ b/META.yml
@@ -1,14 +1,15 @@
---
abstract: 'Adds LastTransactionContent as a search display column'
author:
- - 'Best Practical Solutions.'
+ - '-2014 by Best Practical Solutions.'
build_requires:
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
configure_requires:
- ExtUtils::MakeMaker: 6.42
+ ExtUtils::MakeMaker: 6.59
distribution_type: module
-generated_by: 'Module::Install version 1.01'
-license: unknown
+dynamic_config: 1
+generated_by: 'Module::Install version 1.06'
+license: gpl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
@@ -17,4 +18,8 @@ no_index:
directory:
- html
- inc
+requires:
+ perl: 5.8.3
+resources:
+ license: http://opensource.org/licenses/gpl-license.php
version: 0.02
diff --git a/Makefile.PL b/Makefile.PL
index 46d51e7..61cdb22 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,5 @@
use inc::Module::Install;
+perl_version('5.008003');
RTx('RTx-TicketlistTransactions');
all_from('lib/RTx/TicketlistTransactions.pm');
readme_from('lib/RTx/TicketlistTransactions.pm');
commit 67cb8d58af4afdec280f26c33c4748d8850a3b41
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 15:05:48 2014 -0500
SetFieldsOnce really only sets the field once
When added, @fields was cached in a %once block and adding more than
once would lead to repeated instances of the format field. Shortly
afterward, we noticed that it cached the Custom Fields that were added
in BuildFormatString and removed the %once block, breaking
SetFieldsOnce. Worked in d77874ed broken in c07d62ad when fixing other
bugs. Hasn't worked in a single released version of RT.
diff --git a/html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/SetFieldsOnce b/html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/Default
similarity index 100%
rename from html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/SetFieldsOnce
rename to html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/Default
commit 2332ef305bca3827ad55b69035c4c4319a9ef6f8
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 16:08:51 2014 -0500
Remove shipit and MANIFEST.SKIP, update MANIFEST
diff --git a/.shipit b/.shipit
deleted file mode 100644
index 44c02c1..0000000
--- a/.shipit
+++ /dev/null
@@ -1,10 +0,0 @@
-# auto-generated shipit config file.
-steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN, Twitter
-
-git.tagpattern = %v
-twitter.config = ~/.twitterrc
-
-# svn.tagpattern = MyProj-%v
-# svn.tagpattern = http://code.example.com/svn/tags/MyProj-%v
-
-# CheckChangeLog.files = ChangeLog, MyProj.CHANGES
diff --git a/MANIFEST b/MANIFEST
index 0ac39b9..dc78224 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,6 @@
+Changes
html/Callbacks/RTx-TicketlistTransactions/Elements/RT__Ticket/ColumnMap/Once
-html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/SetFieldsOnce
+html/Callbacks/RTx-TicketlistTransactions/Search/Elements/BuildFormatString/Default
inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
@@ -13,6 +14,5 @@ inc/Module/Install/WriteAll.pm
lib/RTx/TicketlistTransactions.pm
Makefile.PL
MANIFEST This list of files
-MANIFEST.SKIP
META.yml
README
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
deleted file mode 100644
index 7fca686..0000000
--- a/MANIFEST.SKIP
+++ /dev/null
@@ -1,11 +0,0 @@
-TODO
-^Makefile$
-blib
-pm_to_blib
-.swp$
-~$
-.tmp$
-.bak$
-.git/
-.gitignore$
-.shipit$
commit e7e1d7ae3d598eb47fb46a0fb9abdb7eeb26d697
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Mar 7 16:07:51 2014 -0500
Bump version for 0.03 and add Changes
diff --git a/Changes b/Changes
new file mode 100644
index 0000000..1791ab2
--- /dev/null
+++ b/Changes
@@ -0,0 +1,9 @@
+Revision history for perl module Foo::Bar
+
+0.03 2014-03-07
+ - Fix bug with SetFieldsOnce #93547
+ - Fix warnings from Makefile.PL #93546
+
+0.02 2011-09-27
+ - Release to CPAN
+
diff --git a/META.yml b/META.yml
index d53f3bc..0f6d6b0 100644
--- a/META.yml
+++ b/META.yml
@@ -22,4 +22,4 @@ requires:
perl: 5.8.3
resources:
license: http://opensource.org/licenses/gpl-license.php
-version: 0.02
+version: 0.03
diff --git a/lib/RTx/TicketlistTransactions.pm b/lib/RTx/TicketlistTransactions.pm
index 80a4d09..651492e 100644
--- a/lib/RTx/TicketlistTransactions.pm
+++ b/lib/RTx/TicketlistTransactions.pm
@@ -1,6 +1,6 @@
package RTx::TicketlistTransactions;
-our $VERSION = 0.02;
+our $VERSION = 0.03;
=head1 NAME
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list