[Bps-public-commit] rt-extension-onetimeto branch, master, updated. 0.02-8-gf4bb69c

Thomas Sibley trs at bestpractical.com
Tue Jan 22 18:56:52 EST 2013


The branch, master has been updated
       via  f4bb69caa9d5b4feea113001f30e9d3aa478f6b1 (commit)
       via  28a6851ebd543dcbd81b3e440b2a0d1eaef77050 (commit)
       via  9905b5f9c93b2a3baee4890e2281d7986a5091da (commit)
       via  877556d437a63451c7c29c13a7301ad0dd6a56e7 (commit)
       via  152a8f1ba5609c378d532a5d513432c9df62fb11 (commit)
       via  5ea81980224b1697a7bda5ecbc5311b93e345b8b (commit)
       via  52d23b01162d28016fd0f3bfb67e487026304c1f (commit)
       via  87b6266544dccf31ffb53f9c38de59cbfab80590 (commit)
      from  5636115781fb45652b61306b016fa1e22e201d62 (commit)

Summary of changes:
 .gitignore                                         |  3 +-
 Changes                                            |  7 ++
 MANIFEST                                           | 22 +++++
 MANIFEST.SKIP                                      | 59 +++++++++++++
 META.yml                                           | 24 ++++++
 Makefile.PL                                        | 16 ++++
 README                                             | 52 ++++++++++++
 .../OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc    |  5 +-
 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                          | 30 ++-----
 inc/Module/Install/Win32.pm                        |  2 +-
 inc/Module/Install/WriteAll.pm                     |  2 +-
 lib/RT/Extension/OneTimeTo.pm                      | 96 ++++++++++++++--------
 ...-headers-used-for-one-time-recipient-sugg.patch | 35 ++++++++
 19 files changed, 400 insertions(+), 97 deletions(-)
 create mode 100644 Changes
 create mode 100644 MANIFEST
 create mode 100644 META.yml
 create mode 100644 README
 create mode 100644 patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch

- Log -----------------------------------------------------------------
commit 87b6266544dccf31ffb53f9c38de59cbfab80590
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 13:04:04 2013 -0800

    Update M::I

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..ce01018 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.29';
+our $VERSION = '0.30';
 
 use FindBin;
 use File::Glob     ();
@@ -129,18 +129,7 @@ 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}++;
@@ -164,28 +153,19 @@ 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");
     }
 }
 
-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,
@@ -228,4 +208,4 @@ sub requires_rt {
 
 __END__
 
-#line 348
+#line 328
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 52d23b01162d28016fd0f3bfb67e487026304c1f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:12:53 2013 -0800

    Use the standard EscapeJS in 4.0.6 or 4.0.0+security patches

diff --git a/Makefile.PL b/Makefile.PL
index 6030bd1..a1259b3 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,5 +3,20 @@ use inc::Module::Install;
 RTx('RT-Extension-OneTimeTo');
 all_from('lib/RT/Extension/OneTimeTo.pm');
 
+requires_rt("4.0.6");
+
+# Check that EscapeJS is available
+{
+    require RT::Interface::Web;
+    die <<EOT unless RT::Interface::Web->can("EscapeJS");
+
+Your RT install must be:
+
+  a) version 4.0.6 or newer, OR
+  b) version 4.0.0 or newer *and* have the 22 May 2012 security patches applied.
+
+EOT
+}
+
 sign;
 &WriteAll;
diff --git a/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc b/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
index 83dd399..2c4576b 100644
--- a/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
+++ b/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
@@ -18,8 +18,7 @@ $ARGSRef
     class="onetime onetimeto"
     type="checkbox"
 % my $clean_addr = $txn_addresses{$addr}->format;
-% $clean_addr =~ s/'/\\'/g;
-    onClick="checkboxToInput('UpdateTo', 'UpdateTo-<%$addr%>','<%$clean_addr%>' );"
+    onClick="checkboxToInput('UpdateTo', <% "UpdateTo-$addr" |n,j%>, <%$clean_addr|n,j%> );"
     <% $ARGS{'UpdateTo-'.$addr} ? 'checked="checked"' : ''%> > <& /Elements/ShowUser, Address => $txn_addresses{$addr}&>
 %}
 </td></tr>

commit 5ea81980224b1697a7bda5ecbc5311b93e345b8b
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:16:21 2013 -0800

    %ARGS never contains the submitted form values; $ARGSRef does
    
    This fixes a bug where the One-time To checkboxes reverted to unchecked
    when an attachment was added or article included.  By flipping to
    uncheck, they invert the state of the checkbox when next toggled.

diff --git a/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc b/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
index 2c4576b..a78ce2a 100644
--- a/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
+++ b/html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
@@ -19,6 +19,6 @@ $ARGSRef
     type="checkbox"
 % my $clean_addr = $txn_addresses{$addr}->format;
     onClick="checkboxToInput('UpdateTo', <% "UpdateTo-$addr" |n,j%>, <%$clean_addr|n,j%> );"
-    <% $ARGS{'UpdateTo-'.$addr} ? 'checked="checked"' : ''%> > <& /Elements/ShowUser, Address => $txn_addresses{$addr}&>
+    <% $ARGSRef->{'UpdateTo-'.$addr} ? 'checked="checked"' : ''%> > <& /Elements/ShowUser, Address => $txn_addresses{$addr}&>
 %}
 </td></tr>

commit 152a8f1ba5609c378d532a5d513432c9df62fb11
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:30:02 2013 -0800

    Grab one-time recipient suggestions from RT-Send-To as well

diff --git a/lib/RT/Extension/OneTimeTo.pm b/lib/RT/Extension/OneTimeTo.pm
index 55ee612..af9bda9 100644
--- a/lib/RT/Extension/OneTimeTo.pm
+++ b/lib/RT/Extension/OneTimeTo.pm
@@ -6,6 +6,13 @@ no warnings 'redefine';
 our $VERSION = '0.02';
 RT->AddJavaScript('onetimeto.js');
 
+{
+    # Includes RT-Send-To in the list of headers used to grab
+    # one-time recipient suggestions
+    require RT::Attachment;
+    push @RT::Attachment::ADDRESS_HEADERS, "RT-Send-To";
+}
+
 use RT::Interface::Web;
 my $orig_process = HTML::Mason::Commands->can('_ProcessUpdateMessageRecipients');
 *HTML::Mason::Commands::_ProcessUpdateMessageRecipients = sub {
diff --git a/patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch b/patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch
new file mode 100644
index 0000000..28e508b
--- /dev/null
+++ b/patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch
@@ -0,0 +1,35 @@
+From 398e3e73eee4f2430650bb9e217eeb6d50f893f1 Mon Sep 17 00:00:00 2001
+From: Thomas Sibley <trs at bestpractical.com>
+Date: Tue, 22 Jan 2013 15:26:06 -0800
+Subject: [PATCH] Let list of headers used for one-time recipient suggestions
+ be adjusted
+
+Extensions or local customizations may want to add RT-Send-To or
+Reply-To, or remove Bcc, From, etc.
+---
+ lib/RT/Attachment.pm | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/RT/Attachment.pm b/lib/RT/Attachment.pm
+index 35387eb..54217b3 100644
+--- a/lib/RT/Attachment.pm
++++ b/lib/RT/Attachment.pm
+@@ -499,12 +499,14 @@ L<Email::Address> objects.
+ 
+ =cut
+ 
++our @ADDRESS_HEADERS = qw(From To Cc Bcc RT-Send-Cc RT-Send-Bcc);
++
+ sub Addresses {
+     my $self = shift;
+ 
+     my %data = ();
+     my $current_user_address = lc $self->CurrentUser->EmailAddress;
+-    foreach my $hdr (qw(From To Cc Bcc RT-Send-Cc RT-Send-Bcc)) {
++    foreach my $hdr (@ADDRESS_HEADERS) {
+         my @Addresses;
+         my $line = $self->GetHeader($hdr);
+         
+-- 
+1.7.11.3
+

commit 877556d437a63451c7c29c13a7301ad0dd6a56e7
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:43:20 2013 -0800

    Overhaul the doc to include the install process

diff --git a/Makefile.PL b/Makefile.PL
index a1259b3..6613ad4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,6 +2,7 @@ use inc::Module::Install;
 
 RTx('RT-Extension-OneTimeTo');
 all_from('lib/RT/Extension/OneTimeTo.pm');
+readme_from('lib/RT/Extension/OneTimeTo.pm');
 
 requires_rt("4.0.6");
 
diff --git a/README b/README
new file mode 100644
index 0000000..aa5d05b
--- /dev/null
+++ b/README
@@ -0,0 +1,52 @@
+NAME
+    RT::Extension::OneTimeTo - Adds a One-time To: box next to the One-time
+    Cc/Bcc boxes
+
+INSTALLATION
+    This extension requires an RT version equal to or newer than 4.0.6. You
+    may be able to get away with RT version 4.0.0 provided you have the 22
+    May 2012 security patches applied to your RT install.
+
+    perl Makefile.PL
+    make
+    make install
+        May need root permissions
+
+    Optionally, patch your RT install
+        This enables one-time recipient suggestions from past One-time To
+        addresses (i.e. the checkboxes that appear under One-time
+        To/Cc/Bcc):
+
+            patch -p1 -d /opt/rt4 < patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch
+
+    Edit your /opt/rt4/etc/RT_SiteConfig.pm
+        Add this line:
+
+            Set(@Plugins, qw(RT::Extension::OneTimeTo));
+
+        or add "RT::Extension::OneTimeTo" to your existing @Plugins line.
+
+    Clear your mason cache
+            rm -rf /opt/rt4/var/mason_data/obj
+
+    Restart your webserver
+
+AUTHORS
+    Shawn M Moore, Alex Vandiver, and Thomas Sibley
+
+BUGS
+    All bugs should be reported via email to
+    bug-RT-Extension-OneTimeTo at rt.cpan.org
+    <mailto:bug-RT-Extension-OneTimeTo at rt.cpan.org> or via the web at
+    rt.cpan.org
+    <http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-OneTimeTo
+    >.
+
+LICENSE AND COPYRIGHT
+    This software is Copyright (c) 2010-2013 by Best Practical Solutions,
+    LLC.
+
+    This is free software, licensed under:
+
+      The GNU General Public License, Version 2, June 1991
+
diff --git a/lib/RT/Extension/OneTimeTo.pm b/lib/RT/Extension/OneTimeTo.pm
index af9bda9..8db12f0 100644
--- a/lib/RT/Extension/OneTimeTo.pm
+++ b/lib/RT/Extension/OneTimeTo.pm
@@ -96,47 +96,68 @@ my $orig_recipients = RT::Action::Notify->can('SetRecipients');
     }
 };
 
-1;
+=head1 NAME
 
-__END__
+RT::Extension::OneTimeTo - Adds a One-time To: box next to the One-time Cc/Bcc boxes
 
-=head1 NAME
+=head1 INSTALLATION 
+
+This extension requires an RT version equal to or newer than 4.0.6.  You may be
+able to get away with RT version 4.0.0 provided you have the 22 May 2012
+security patches applied to your RT install.
+
+=over
+
+=item perl Makefile.PL
+
+=item make
+
+=item make install
+
+May need root permissions
+
+=item Optionally, patch your RT install
+
+This enables one-time recipient suggestions from past One-time To addresses
+(i.e. the checkboxes that appear under One-time To/Cc/Bcc):
+
+    patch -p1 -d /opt/rt4 < patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch
 
-RT::Extension::OneTimeTo - add one-time To box to Update page
+=item Edit your /opt/rt4/etc/RT_SiteConfig.pm
 
-=head1 AUTHOR
+Add this line:
 
-Shawn M Moore C<< <sartak at bestpractical.com> >>
+    Set(@Plugins, qw(RT::Extension::OneTimeTo));
+
+or add C<RT::Extension::OneTimeTo> 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 AUTHORS
+
+Shawn M Moore, Alex Vandiver, and Thomas Sibley
+
+=head1 BUGS
+
+All bugs should be reported via email to
+L<bug-RT-Extension-OneTimeTo at rt.cpan.org|mailto:bug-RT-Extension-OneTimeTo at rt.cpan.org>
+or via the web at
+L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-OneTimeTo>.
 
 =head1 LICENSE AND COPYRIGHT
 
-Copyright (c) 2010, Best Practical Solutions, LLC.  All rights reserved.
-
-This module is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself. See L<perlartistic>.
-
-=head1 DISCLAIMER OF WARRANTY
-
-BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
-ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
-YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
-NECESSARY SERVICING, REPAIR, OR CORRECTION.
-
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
-LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
-OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
-THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
+This software is Copyright (c) 2010-2013 by Best Practical Solutions, LLC.
+
+This is free software, licensed under:
+
+  The GNU General Public License, Version 2, June 1991
 
 =cut
 
+1;

commit 9905b5f9c93b2a3baee4890e2281d7986a5091da
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:51:26 2013 -0800

    Document changes

diff --git a/Changes b/Changes
new file mode 100644
index 0000000..f7c541f
--- /dev/null
+++ b/Changes
@@ -0,0 +1,7 @@
+0.03    Tue Jan 22 15:48:33 PST 2013
+
+    • Overhaul the doc
+    • Grab one-time recipient suggestions from previous One-time To addresses
+    • Bug fix: Ensure the One-time To suggestion checkboxes remain checked
+    • Use the RT standard EscapeJS function which is bulletproof compared
+      to the previous manual escaping

commit 28a6851ebd543dcbd81b3e440b2a0d1eaef77050
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:53:21 2013 -0800

    Start tracking a useful MANIFEST and MANIFEST.SKIP

diff --git a/.gitignore b/.gitignore
index 25685ad..617a9db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
-MANIFEST
 MANIFEST.bak
+MANIFEST.SKIP.bak
 META.yml
 Makefile
 Makefile.old
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..6aef882
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,22 @@
+Changes
+html/Callbacks/OneTimeTo/Ticket/Elements/ShowTransactionAttachments/MassageDisplayHeaders
+html/Callbacks/OneTimeTo/Ticket/Elements/UpdateCc/BeforeCc
+html/NoAuth/js/onetimeto.js
+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
+lib/RT/Extension/OneTimeTo.pm
+Makefile.PL
+MANIFEST			This list of files
+META.yml
+patches/0001-Let-list-of-headers-used-for-one-time-recipient-sugg.patch
+README
+t/basic.t
+t/empty-update.t
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
index 8cc34e2..f3fbe30 100644
--- a/MANIFEST.SKIP
+++ b/MANIFEST.SKIP
@@ -1,3 +1,62 @@
+
+#!start included /opt/perlbrew/perls/perl-5.16.2/lib/5.16.2/ExtUtils/MANIFEST.SKIP
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+\bSCCS\b
+,v$
+\B\.svn\b
+\B\.git\b
+\B\.gitignore\b
+\b_darcs\b
+\B\.cvsignore$
+
+# Avoid VMS specific MakeMaker generated files
+\bDescrip.MMS$
+\bDESCRIP.MMS$
+\bdescrip.mms$
+
+# Avoid Makemaker generated and utility files.
+\bMANIFEST\.bak
+\bMakefile$
+\bblib/
+\bMakeMaker-\d
+\bpm_to_blib\.ts$
+\bpm_to_blib$
+\bblibdirs\.ts$         # 6.18 through 6.25 generated this
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build/
+\bBuild.bat$
+\bBuild.COM$
+\bBUILD.COM$
+\bbuild.com$
+
+# Avoid temp and backup files.
+~$
+\.old$
+\#$
+\b\.#
+\.bak$
+\.tmp$
+\.#
+\.rej$
+
+# Avoid OS-specific files/dirs
+# Mac OSX metadata
+\B\.DS_Store
+# Mac OSX SMB mount metadata files
+\B\._
+
+# Avoid Devel::Cover and Devel::CoverX::Covered files.
+\bcover_db\b
+\bcovered\b
+
+# Avoid MYMETA files
+^MYMETA\.
+#!end included /opt/perlbrew/perls/perl-5.16.2/lib/5.16.2/ExtUtils/MANIFEST.SKIP
+
 .git
 Makefile$
 ^blib

commit f4bb69caa9d5b4feea113001f30e9d3aa478f6b1
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue Jan 22 15:54:40 2013 -0800

    Bump version and start tracking META.yml so we can track version bumps

diff --git a/.gitignore b/.gitignore
index 617a9db..42daa1f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
 MANIFEST.bak
 MANIFEST.SKIP.bak
-META.yml
 Makefile
 Makefile.old
 SIGNATURE
diff --git a/META.yml b/META.yml
new file mode 100644
index 0000000..f39e431
--- /dev/null
+++ b/META.yml
@@ -0,0 +1,24 @@
+---
+abstract: 'Adds a One-time To: box next to the One-time Cc/Bcc boxes'
+author:
+  - 'Shawn M Moore, Alex Vandiver, and Thomas Sibley'
+build_requires:
+  ExtUtils::MakeMaker: 6.36
+configure_requires:
+  ExtUtils::MakeMaker: 6.36
+distribution_type: module
+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
+name: RT-Extension-OneTimeTo
+no_index:
+  directory:
+    - html
+    - inc
+    - t
+resources:
+  license: http://opensource.org/licenses/gpl-license.php
+version: 0.03
diff --git a/lib/RT/Extension/OneTimeTo.pm b/lib/RT/Extension/OneTimeTo.pm
index 8db12f0..9bae638 100644
--- a/lib/RT/Extension/OneTimeTo.pm
+++ b/lib/RT/Extension/OneTimeTo.pm
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 no warnings 'redefine';
 
-our $VERSION = '0.02';
+our $VERSION = '0.03';
 RT->AddJavaScript('onetimeto.js');
 
 {

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



More information about the Bps-public-commit mailing list