[Bps-public-commit] rt-extension-announce branch, master, updated. 0.06-13-gd339496

Jim Brandt jbrandt at bestpractical.com
Mon Mar 17 15:28:56 EDT 2014


The branch, master has been updated
       via  d3394966e8cc14233c4e95d07a43599a71dcabf3 (commit)
       via  2a314fbbab63910f91cf708407ba371704e02646 (commit)
       via  fcc944b802a3744f4dfc556ae60e7d3ea456498a (commit)
       via  8aa38f448af16c42ffce7ce86679aaa78268c080 (commit)
       via  f45a4e541d03e97c7b2823c91c82c923f8598128 (commit)
      from  3bfea66d33310b83e42f9e2b1f4cc327e5c2aa1e (commit)

Summary of changes:
 .gitignore                         |   2 +-
 Changes                            |   9 +++
 MANIFEST                           |   9 ++-
 META.yml                           |   5 +-
 README                             |  38 +++++----
 doc/images/announce-screenshot.png | Bin 0 -> 59835 bytes
 inc/Module/Install/Can.pm          | 154 +++++++++++++++++++++++++++++++++++++
 inc/Module/Install/Fetch.pm        |  93 ++++++++++++++++++++++
 inc/Module/Install/Substitute.pm   | 131 +++++++++++++++++++++++++++++++
 inc/Module/Install/Win32.pm        |  64 +++++++++++++++
 inc/Module/Install/WriteAll.pm     |  63 +++++++++++++++
 lib/RT/Extension/Announce.pm       |  62 +++++++++------
 {t => xt}/basic.t                  |   0
 13 files changed, 589 insertions(+), 41 deletions(-)
 create mode 100644 Changes
 create mode 100644 doc/images/announce-screenshot.png
 create mode 100644 inc/Module/Install/Can.pm
 create mode 100644 inc/Module/Install/Fetch.pm
 create mode 100644 inc/Module/Install/Substitute.pm
 create mode 100644 inc/Module/Install/Win32.pm
 create mode 100644 inc/Module/Install/WriteAll.pm
 rename {t => xt}/basic.t (100%)

- Log -----------------------------------------------------------------
commit f45a4e541d03e97c7b2823c91c82c923f8598128
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Mar 17 15:11:05 2014 -0400

    Update docs to include versions and screenshot

diff --git a/README b/README
index 990c299..d06a9f8 100644
--- a/README
+++ b/README
@@ -1,6 +1,9 @@
 NAME
     RT-Extension-Announce - Display announcements as a banner on RT pages.
 
+RT VERSION
+    Works with RT 4.0 and 4.2.
+
 INSTALLATION
     perl Makefile.PL
     make
@@ -8,18 +11,22 @@ INSTALLATION
         May need root permissions
 
     Edit your /opt/rt4/etc/RT_SiteConfig.pm
-        Add these lines:
+        If you are using RT 4.2 or later, add this line:
 
-            Set(@Plugins, qw(RT::Extension::Announce));
-            Set(@CustomFieldValuesSources, (qw(RT::CustomFieldValues::AnnounceGroups)));
-            Set($ShowAnnouncementsInSelfService, 1); # display for selfservice home page too
-            Set(@AnnounceDefaultGroups, 'foo', 'bar'); # default groups on ticket creation
+            Plugin('RT::Extension::Announce');
 
         or add "RT::Extension::Announce" to your existing @Plugins line.
 
+        And add the following:
+
+            Set(@CustomFieldValuesSources, (qw(RT::CustomFieldValues::AnnounceGroups)));
+
+        See "CONFIGURATION" for more options.
+
     make initdb
         Run this in the install directory where you ran the previous make
-        commands.
+        commands. Only run for an initial install. Do not run when
+        upgrading.
 
     Clear your mason cache
             rm -rf /opt/rt4/var/mason_data/obj
@@ -79,19 +86,24 @@ PERMISSIONS
     in RT will also be sent to the notification list.
 
 CONFIGURATION
-    You can change the name of the queue used for announcements. First edit
-    the RTAnnounce queue in RT and change its name to your new name. Add a
-    line to your RT_SiteConfig.pm to set that new value:
+  $RTAnnounceQueue
+    Use this to change the name of the queue used for announcements. First
+    edit the RTAnnounce queue in RT and change its name to your new name.
+    Then a line to your RT_SiteConfig.pm to set that new value:
 
         Set($RTAnnounceQueue, 'Custom Announce Name');
 
-    By default, all the user defined groups will be listed in "Announcement
-    Groups", you can customize the group list by setting @AnnounceGroups in
-    your RT_SiteConfig.pm:
+  @AnnounceGroups
+    By default, all user defined groups will be listed in "Announcement
+    Groups". If you have a large number of groups in your RT, this can make
+    for a long list, so you can customize the group list by setting
+    @AnnounceGroups in your RT_SiteConfig.pm:
 
         Set(@AnnounceGroups, 'foo', 'bar', 'baz');
 
-    Then clear your mason cache and restart your server.
+  $ShowAnnouncementsInSelfService
+    Set this to true to show announcements on the self service page as well
+    as the regular privileged RT page.
 
 AUTHOR
     Jim Brandt <jbrandt at bestpractical.com>
diff --git a/doc/images/announce-screenshot.png b/doc/images/announce-screenshot.png
new file mode 100644
index 0000000..51d28db
Binary files /dev/null and b/doc/images/announce-screenshot.png differ
diff --git a/lib/RT/Extension/Announce.pm b/lib/RT/Extension/Announce.pm
index d837838..abfa7d4 100644
--- a/lib/RT/Extension/Announce.pm
+++ b/lib/RT/Extension/Announce.pm
@@ -88,6 +88,10 @@ sub GetAnnouncements {
 
 RT-Extension-Announce - Display announcements as a banner on RT pages.
 
+=head1 RT VERSION
+
+Works with RT 4.0 and 4.2.
+
 =head1 INSTALLATION
 
 =over
@@ -102,18 +106,22 @@ May need root permissions
 
 =item Edit your /opt/rt4/etc/RT_SiteConfig.pm
 
-Add these lines:
+If you are using RT 4.2 or later, add this line:
 
-    Set(@Plugins, qw(RT::Extension::Announce));
-    Set(@CustomFieldValuesSources, (qw(RT::CustomFieldValues::AnnounceGroups)));
-    Set($ShowAnnouncementsInSelfService, 1); # display for selfservice home page too
-    Set(@AnnounceDefaultGroups, 'foo', 'bar'); # default groups on ticket creation
+    Plugin('RT::Extension::Announce');
 
 or add C<RT::Extension::Announce> to your existing C<@Plugins> line.
 
+And add the following:
+
+    Set(@CustomFieldValuesSources, (qw(RT::CustomFieldValues::AnnounceGroups)));
+
+See L</CONFIGURATION> for more options.
+
 =item make initdb
 
 Run this in the install directory where you ran the previous make commands.
+Only run for an initial install. Do not run when upgrading.
 
 =item Clear your mason cache
 
@@ -125,17 +133,19 @@ Run this in the install directory where you ran the previous make commands.
 
 =head1 DESCRIPTION
 
-The Announce extension gives you an easy way to insert announcements on the RT homepage
-so all users can see the message. You may want to display a banner during maintenance or
-an unscheduled outage to make sure the people fielding customer tickets know that
-something is going on.
+The Announce extension gives you an easy way to insert announcements on the RT
+homepage so all users can see the message. You may want to display a banner
+during maintenance or an unscheduled outage to make sure the people fielding
+customer tickets know that something is going on.
+
+=for html <p><img src="https://raw.github.com/bestpractical/rt-extension-announce/master/doc/images/announce-screenshot.png" alt="RT Announcement on Homepage" /></p>
 
 =head1 DETAILS
 
 When you install the extension, a new queue is created called RTAnnounce.
-To post an announcement, create a ticket in that queue.
-The extension displays on the RT homepage the subject and most recent correspondence
-on active tickets in the RTAnnounce queue. As the incident or maintenance progresses,
+To post an announcement, create a ticket in that queue. The extension displays
+on the RT homepage the subject and most recent correspondence on active
+tickets in the RTAnnounce queue. As the incident or maintenance progresses,
 just reply to the ticket and the announcement will be updated with the latest
 information.
 
@@ -143,8 +153,8 @@ When multiple announcements are active, they are ordered by
 the last update time with the announcement with the most recent
 update coming first.
 
-When the incident is over, resolve the ticket and the
-announcement will be removed.
+When the incident is over, resolve the ticket and the announcement will be
+removed.
 
 Comments on announce tickets are not shown in the announcement. However,
 comments are visible on the ticket for users who have permission to view
@@ -179,19 +189,27 @@ notification list.
 
 =head1 CONFIGURATION
 
-You can change the name of the queue used for announcements. First edit the
-RTAnnounce queue in RT and change its name to your new name. Add a line
+=head2 C<$RTAnnounceQueue>
+
+Use this to change the name of the queue used for announcements. First edit the
+RTAnnounce queue in RT and change its name to your new name. Then a line
 to your RT_SiteConfig.pm to set that new value:
 
     Set($RTAnnounceQueue, 'Custom Announce Name');
 
-By default, all the user defined groups will be listed in "Announcement
-Groups", you can customize the group list by setting @AnnounceGroups in
-your RT_SiteConfig.pm:
+=head2 C<@AnnounceGroups>
+
+By default, all user defined groups will be listed in "Announcement
+Groups". If you have a large number of groups in your RT, this can make for
+a long list, so you can customize the group list by setting C<@AnnounceGroups>
+in your RT_SiteConfig.pm:
 
     Set(@AnnounceGroups, 'foo', 'bar', 'baz');
 
-Then clear your mason cache and restart your server.
+=head2 C<$ShowAnnouncementsInSelfService>
+
+Set this to true to show announcements on the self service page as well as
+the regular privileged RT page.
 
 =head1 AUTHOR
 
@@ -201,7 +219,7 @@ Jim Brandt <jbrandt at bestpractical.com>
 
 All bugs should be reported via
 L<http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-Announce>
-or L<bug-RT-Extension-Announce at rt.cpan.org>.
+or bug-RT-Extension-Announce at rt.cpan.org.
 
 
 =head1 LICENSE AND COPYRIGHT

commit 8aa38f448af16c42ffce7ce86679aaa78268c080
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Mar 17 15:12:59 2014 -0400

    Add Module::Install files

diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
new file mode 100644
index 0000000..22167b8
--- /dev/null
+++ b/inc/Module/Install/Can.pm
@@ -0,0 +1,154 @@
+#line 1
+package Module::Install::Can;
+
+use strict;
+use Config                ();
+use ExtUtils::MakeMaker   ();
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '1.06';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+# check if we can load some module
+### Upgrade this to not have to load the module if possible
+sub can_use {
+	my ($self, $mod, $ver) = @_;
+	$mod =~ s{::|\\}{/}g;
+	$mod .= '.pm' unless $mod =~ /\.pm$/i;
+
+	my $pkg = $mod;
+	$pkg =~ s{/}{::}g;
+	$pkg =~ s{\.pm$}{}i;
+
+	local $@;
+	eval { require $mod; $pkg->VERSION($ver || 0); 1 };
+}
+
+# Check if we can run some command
+sub can_run {
+	my ($self, $cmd) = @_;
+
+	my $_cmd = $cmd;
+	return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
+
+	for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
+		next if $dir eq '';
+		require File::Spec;
+		my $abs = File::Spec->catfile($dir, $cmd);
+		return $abs if (-x $abs or $abs = MM->maybe_command($abs));
+	}
+
+	return;
+}
+
+# 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;
+
+	# $Config{cc} may contain args; try to find out the program part
+	while (@chunks) {
+		return $self->can_run("@chunks") || (pop(@chunks), next);
+	}
+
+	return;
+}
+
+# Fix Cygwin bug on maybe_command();
+if ( $^O eq 'cygwin' ) {
+	require ExtUtils::MM_Cygwin;
+	require ExtUtils::MM_Win32;
+	if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
+		*ExtUtils::MM_Cygwin::maybe_command = sub {
+			my ($self, $file) = @_;
+			if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
+				ExtUtils::MM_Win32->maybe_command($file);
+			} else {
+				ExtUtils::MM_Unix->maybe_command($file);
+			}
+		}
+	}
+}
+
+1;
+
+__END__
+
+#line 236
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
new file mode 100644
index 0000000..bee0c4f
--- /dev/null
+++ b/inc/Module/Install/Fetch.pm
@@ -0,0 +1,93 @@
+#line 1
+package Module::Install::Fetch;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '1.06';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+sub get_file {
+    my ($self, %args) = @_;
+    my ($scheme, $host, $path, $file) =
+        $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
+
+    if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
+        $args{url} = $args{ftp_url}
+            or (warn("LWP support unavailable!\n"), return);
+        ($scheme, $host, $path, $file) =
+            $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
+    }
+
+    $|++;
+    print "Fetching '$file' from $host... ";
+
+    unless (eval { require Socket; Socket::inet_aton($host) }) {
+        warn "'$host' resolve failed!\n";
+        return;
+    }
+
+    return unless $scheme eq 'ftp' or $scheme eq 'http';
+
+    require Cwd;
+    my $dir = Cwd::getcwd();
+    chdir $args{local_dir} or return if exists $args{local_dir};
+
+    if (eval { require LWP::Simple; 1 }) {
+        LWP::Simple::mirror($args{url}, $file);
+    }
+    elsif (eval { require Net::FTP; 1 }) { eval {
+        # use Net::FTP to get past firewall
+        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
+        $ftp->login("anonymous", 'anonymous at example.com');
+        $ftp->cwd($path);
+        $ftp->binary;
+        $ftp->get($file) or (warn("$!\n"), return);
+        $ftp->quit;
+    } }
+    elsif (my $ftp = $self->can_run('ftp')) { eval {
+        # no Net::FTP, fallback to ftp.exe
+        require FileHandle;
+        my $fh = FileHandle->new;
+
+        local $SIG{CHLD} = 'IGNORE';
+        unless ($fh->open("|$ftp -n")) {
+            warn "Couldn't open ftp: $!\n";
+            chdir $dir; return;
+        }
+
+        my @dialog = split(/\n/, <<"END_FTP");
+open $host
+user anonymous anonymous\@example.com
+cd $path
+binary
+get $file $file
+quit
+END_FTP
+        foreach (@dialog) { $fh->print("$_\n") }
+        $fh->close;
+    } }
+    else {
+        warn "No working 'ftp' program available!\n";
+        chdir $dir; return;
+    }
+
+    unless (-f $file) {
+        warn "Fetching failed: $@\n";
+        chdir $dir; return;
+    }
+
+    return if exists $args{size} and -s $file != $args{size};
+    system($args{run}) if exists $args{run};
+    unlink($file) if $args{remove};
+
+    print(((!exists $args{check_for} or -e $args{check_for})
+        ? "done!" : "failed! ($!)"), "\n");
+    chdir $dir; return !$?;
+}
+
+1;
diff --git a/inc/Module/Install/Substitute.pm b/inc/Module/Install/Substitute.pm
new file mode 100644
index 0000000..56af7fe
--- /dev/null
+++ b/inc/Module/Install/Substitute.pm
@@ -0,0 +1,131 @@
+#line 1
+package Module::Install::Substitute;
+
+use strict;
+use warnings;
+use 5.008; # I don't care much about earlier versions
+
+use Module::Install::Base;
+our @ISA = qw(Module::Install::Base);
+
+our $VERSION = '0.03';
+
+require File::Temp;
+require File::Spec;
+require Cwd;
+
+#line 89
+
+sub substitute
+{
+	my $self = shift;
+	$self->{__subst} = shift;
+	$self->{__option} = {};
+	if( UNIVERSAL::isa( $_[0], 'HASH' ) ) {
+		my $opts = shift;
+		while( my ($k,$v) = each( %$opts ) ) {
+			$self->{__option}->{ lc( $k ) } = $v || '';
+		}
+	}
+	$self->_parse_options;
+
+	my @file = @_;
+	foreach my $f (@file) {
+		$self->_rewrite_file( $f );
+	}
+
+	return;
+}
+
+sub _parse_options
+{
+	my $self = shift;
+	my $cwd = Cwd::getcwd();
+	foreach my $t ( qw(from to) ) {
+        $self->{__option}->{$t} = $cwd unless $self->{__option}->{$t};
+		my $d = $self->{__option}->{$t};
+		die "Couldn't read directory '$d'" unless -d $d && -r _;
+	}
+}
+
+sub _rewrite_file
+{
+	my ($self, $file) = @_;
+	my $source = File::Spec->catfile( $self->{__option}{from}, $file );
+	$source .= $self->{__option}{sufix} if $self->{__option}{sufix};
+	unless( -f $source && -r _ ) {
+		print STDERR "Couldn't find file '$source'\n";
+		return;
+	}
+	my $dest = File::Spec->catfile( $self->{__option}{to}, $file );
+	return $self->__rewrite_file( $source, $dest );
+}
+
+sub __rewrite_file
+{
+	my ($self, $source, $dest) = @_;
+
+	my $mode = (stat($source))[2];
+
+	open my $sfh, "<$source" or die "Couldn't open '$source' for read";
+	print "Open input '$source' file for substitution\n";
+
+	my ($tmpfh, $tmpfname) = File::Temp::tempfile('mi-subst-XXXX', UNLINK => 1);
+	$self->__process_streams( $sfh, $tmpfh, ($source eq $dest)? 1: 0 );
+	close $sfh;
+
+	seek $tmpfh, 0, 0 or die "Couldn't seek in tmp file";
+
+	open my $dfh, ">$dest" or die "Couldn't open '$dest' for write";
+	print "Open output '$dest' file for substitution\n";
+
+	while( <$tmpfh> ) {
+		print $dfh $_;
+	}
+	close $dfh;
+	chmod $mode, $dest or "Couldn't change mode on '$dest'";
+}
+
+sub __process_streams
+{
+	my ($self, $in, $out, $replace) = @_;
+	
+	my @queue = ();
+	my $subst = $self->{'__subst'};
+	my $re_subst = join('|', map {"\Q$_"} keys %{ $subst } );
+
+	while( my $str = <$in> ) {
+		if( $str =~ /^###\s*(before|replace|after)\:\s?(.*)$/s ) {
+			my ($action, $nstr) = ($1,$2);
+			$nstr =~ s/\@($re_subst)\@/$subst->{$1}/ge;
+
+			die "Replace action is bad idea for situations when dest is equal to source"
+                if $replace && $action eq 'replace';
+			if( $action eq 'before' ) {
+				die "no line before 'before' action" unless @queue;
+				# overwrite prev line;
+				pop @queue;
+				push @queue, $nstr;
+				push @queue, $str;
+			} elsif( $action eq 'replace' ) {
+				push @queue, $nstr;
+			} elsif( $action eq 'after' ) {
+				push @queue, $str;
+				push @queue, $nstr;
+				# skip one line;
+				<$in>;
+			}
+		} else {
+			push @queue, $str;
+		}
+		while( @queue > 3 ) {
+			print $out shift(@queue);
+		}
+	}
+	while( scalar @queue ) {
+		print $out shift(@queue);
+	}
+}
+
+1;
+
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
new file mode 100644
index 0000000..eeaa3fe
--- /dev/null
+++ b/inc/Module/Install/Win32.pm
@@ -0,0 +1,64 @@
+#line 1
+package Module::Install::Win32;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '1.06';
+	@ISA     = 'Module::Install::Base';
+	$ISCORE  = 1;
+}
+
+# determine if the user needs nmake, and download it if needed
+sub check_nmake {
+	my $self = shift;
+	$self->load('can_run');
+	$self->load('get_file');
+
+	require Config;
+	return unless (
+		$^O eq 'MSWin32'                     and
+		$Config::Config{make}                and
+		$Config::Config{make} =~ /^nmake\b/i and
+		! $self->can_run('nmake')
+	);
+
+	print "The required 'nmake' executable not found, fetching it...\n";
+
+	require File::Basename;
+	my $rv = $self->get_file(
+		url       => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe',
+		ftp_url   => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe',
+		local_dir => File::Basename::dirname($^X),
+		size      => 51928,
+		run       => 'Nmake15.exe /o > nul',
+		check_for => 'Nmake.exe',
+		remove    => 1,
+	);
+
+	die <<'END_MESSAGE' unless $rv;
+
+-------------------------------------------------------------------------------
+
+Since you are using Microsoft Windows, you will need the 'nmake' utility
+before installation. It's available at:
+
+  http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
+      or
+  ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe
+
+Please download the file manually, save it to a directory in %PATH% (e.g.
+C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to
+that directory, and run "Nmake15.exe" from there; that will create the
+'nmake.exe' file needed by this module.
+
+You may then resume the installation process described in README.
+
+-------------------------------------------------------------------------------
+END_MESSAGE
+
+}
+
+1;
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
new file mode 100644
index 0000000..85d8018
--- /dev/null
+++ b/inc/Module/Install/WriteAll.pm
@@ -0,0 +1,63 @@
+#line 1
+package Module::Install::WriteAll;
+
+use strict;
+use Module::Install::Base ();
+
+use vars qw{$VERSION @ISA $ISCORE};
+BEGIN {
+	$VERSION = '1.06';
+	@ISA     = qw{Module::Install::Base};
+	$ISCORE  = 1;
+}
+
+sub WriteAll {
+	my $self = shift;
+	my %args = (
+		meta        => 1,
+		sign        => 0,
+		inline      => 0,
+		check_nmake => 1,
+		@_,
+	);
+
+	$self->sign(1)                if $args{sign};
+	$self->admin->WriteAll(%args) if $self->is_admin;
+
+	$self->check_nmake if $args{check_nmake};
+	unless ( $self->makemaker_args->{PL_FILES} ) {
+		# XXX: This still may be a bit over-defensive...
+		unless ($self->makemaker(6.25)) {
+			$self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL';
+		}
+	}
+
+	# Until ExtUtils::MakeMaker support MYMETA.yml, make sure
+	# we clean it up properly ourself.
+	$self->realclean_files('MYMETA.yml');
+
+	if ( $args{inline} ) {
+		$self->Inline->write;
+	} else {
+		$self->Makefile->write;
+	}
+
+	# The Makefile write process adds a couple of dependencies,
+	# so write the META.yml files after the Makefile.
+	if ( $args{meta} ) {
+		$self->Meta->write;
+	}
+
+	# Experimental support for MYMETA
+	if ( $ENV{X_MYMETA} ) {
+		if ( $ENV{X_MYMETA} eq 'JSON' ) {
+			$self->Meta->write_mymeta_json;
+		} else {
+			$self->Meta->write_mymeta_yaml;
+		}
+	}
+
+	return 1;
+}
+
+1;

commit fcc944b802a3744f4dfc556ae60e7d3ea456498a
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Mar 17 15:20:34 2014 -0400

    Add Changes doc

diff --git a/Changes b/Changes
new file mode 100644
index 0000000..b47cf5e
--- /dev/null
+++ b/Changes
@@ -0,0 +1,9 @@
+Revision history for RT-Extension-TimeTracking
+
+0.07    2014-03-17
+        * Make compatible with RT 4.2 (thanks Lars Thegler)
+        * Make @AnnounceGroups configurable
+        * Add $ShowAnnouncementsInSelfService to show announcements on
+          Self Service pages
+        * Doc updates
+        * Access the plain text version of posts rather than HTML

commit 2a314fbbab63910f91cf708407ba371704e02646
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Mar 17 15:23:10 2014 -0400

    Move tests to xt to avoid failures on cpan install

diff --git a/.gitignore b/.gitignore
index 6fb9039..b8b045c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,4 @@ pod2htm*.tmp
 *.swp
 /MYMETA.*
 /lib/RT/Extension/Announce/Test.pm
-/t/tmp
+/xt/tmp
diff --git a/t/basic.t b/xt/basic.t
similarity index 100%
rename from t/basic.t
rename to xt/basic.t

commit d3394966e8cc14233c4e95d07a43599a71dcabf3
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Mar 17 15:27:35 2014 -0400

    Prep for 0.07 release

diff --git a/MANIFEST b/MANIFEST
index f6e4bc8..a7abe96 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,11 +1,12 @@
+Changes
+doc/images/announce-screenshot.png
 etc/initialdata
 html/Callbacks/RT-Extension-Announce/Elements/PageLayout/BeforeBody
 html/Callbacks/RT-Extension-Announce/m/_elements/menu/MassageMenu
+html/Callbacks/RT-Extension-Announce/Ticket/Create.html/AfterOwner
 html/m/announcements
 html/NoAuth/css/announce.css
 html/NoAuth/js/announce.js
-static/css/announce.css
-static/js/announce.js
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
@@ -25,4 +26,6 @@ Makefile.PL
 MANIFEST			This list of files
 META.yml
 README
-t/basic.t
+static/css/announce.css
+static/js/announce.js
+xt/basic.t
diff --git a/META.yml b/META.yml
index 9e94a35..d674b8c 100644
--- a/META.yml
+++ b/META.yml
@@ -19,7 +19,8 @@ no_index:
     - etc
     - html
     - inc
-    - t
+    - static
+    - xt
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 0.06
+version: 0.07
diff --git a/lib/RT/Extension/Announce.pm b/lib/RT/Extension/Announce.pm
index abfa7d4..14a8925 100644
--- a/lib/RT/Extension/Announce.pm
+++ b/lib/RT/Extension/Announce.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RT::Extension::Announce;
 
-our $VERSION = '0.06';
+our $VERSION = '0.07';
 
 RT->AddJavaScript('announce.js');
 RT->AddStyleSheets('announce.css');

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



More information about the Bps-public-commit mailing list