@@ -1,7 +1,10 @@
--- 0.102220 2010-08-10 14:04:38 EDT
-Simplified connection cache key generation.
-Removing obscure hash slice syntax since _connect_cached only returns one arg anyway.
+0.141470 2014-05-27 08:39:29EDT-0400 America/New_York
+ - simplify connection cache key generation
+ - remove obscure hash slice syntax since _connect_cached only returns one
+ arg anyway
+ - fix end_to_end.t test failure with Test::Net::RabbitMQ >= 0.07
+ - use Net::AMQP::RabbitMQ instead of the unmaintained Net::RabbitMQ
--- 0.102030 2010-07-22 08:47:59 EDT
-No Real changes to the code, just the build.
-eg: switching to a META.json file from a META.yml file.
+0.102030 2010-07-22 08:47:59 EDT
+ - no real changes to the code, just the build
+ e.g. switching to a META.json file from a META.yml file
@@ -1,4 +1,4 @@
-This software is copyright (c) 2010 by Trevor Little.
+This software is copyright (c) 2014 by Trevor Little.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,21 +12,22 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2010 by Trevor Little.
+This software is Copyright (c) 2014 by Trevor Little.
This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
- GNU GENERAL PUBLIC LICENSE
- Version 1, February 1989
+ GNU GENERAL PUBLIC LICENSE
+ Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
- Preamble
+ Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
@@ -67,7 +68,7 @@ authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
- GNU GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
@@ -185,7 +186,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
- NO WARRANTY
+ NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
@@ -207,9 +208,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
- END OF TERMS AND CONDITIONS
+ END OF TERMS AND CONDITIONS
- Appendix: How to Apply These Terms to Your New Programs
+ Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
@@ -235,8 +236,9 @@ the exclusion of warranty; and each file should have at least 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
+
Also add information on how to contact you by electronic and paper mail.
@@ -270,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2010 by Trevor Little.
+This software is Copyright (c) 2014 by Trevor Little.
This is free software, licensed under:
@@ -1,7 +1,9 @@
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.019.
Changes
LICENSE
MANIFEST
META.json
+META.yml
Makefile.PL
README
dist.ini
@@ -9,5 +11,6 @@ lib/Log/Log4perl/Appender/RabbitMQ.pm
t/author-critic.t
t/end_to_end.t
t/init_failure.t
+t/release-cpan-changes.t
t/release-pod-coverage.t
t/release-pod-syntax.t
@@ -4,7 +4,7 @@
"Trevor Little <bundacia@tjlittle.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 4.101900, CPAN::Meta::Converter version 2.101670",
+ "generated_by" : "Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.120921",
"license" : [
"perl_5"
],
@@ -16,23 +16,32 @@
"prereqs" : {
"configure" : {
"requires" : {
- "ExtUtils::MakeMaker" : "6.31"
+ "ExtUtils::MakeMaker" : "6.30"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Pod::Coverage::TrustPod" : "0",
+ "Test::CPAN::Changes" : "0.19",
+ "Test::Pod" : "1.41",
+ "Test::Pod::Coverage" : "1.08"
}
},
"runtime" : {
"requires" : {
- "Net::RabbitMQ" : 0,
- "Readonly" : 0,
- "Test::Net::RabbitMQ" : 0,
- "perl" : "5.008008"
+ "Net::AMQP::RabbitMQ" : "0.004002",
+ "Readonly" : "0",
+ "Test::Net::RabbitMQ" : "0.09",
+ "perl" : "5.008008",
+ "strict" : "0",
+ "warnings" : "0"
}
},
"test" : {
"requires" : {
- "English" : 0,
- "Log::Log4perl" : 0,
- "Test::More" : 0,
- "Test::Output" : 0
+ "Log::Log4perl" : "0",
+ "Test::More" : "0",
+ "Test::Output" : "0"
}
}
},
@@ -44,6 +53,6 @@
"web" : "http://github.com/bundacia/Log-Log4perl-Appender-RabbitMQ"
}
},
- "version" : "0.102220"
+ "version" : "0.141470"
}
@@ -0,0 +1,27 @@
+---
+abstract: 'Log to RabbitMQ'
+author:
+ - 'Trevor Little <bundacia@tjlittle.com>'
+build_requires:
+ Log::Log4perl: '0'
+ Test::More: '0'
+ Test::Output: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '6.30'
+dynamic_config: 0
+generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.120921'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Log-Log4perl-Appender-RabbitMQ
+requires:
+ Net::AMQP::RabbitMQ: '0.004002'
+ Readonly: '0'
+ Test::Net::RabbitMQ: '0.09'
+ perl: '5.008008'
+ strict: '0'
+ warnings: '0'
+resources:
+ repository: git://github.com/bundacia/Log-Log4perl-Appender-RabbitMQ.git
+version: '0.141470'
@@ -1,52 +1,59 @@
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.019.
use strict;
use warnings;
-BEGIN { require 5.008008; }
+use 5.008008;
-use ExtUtils::MakeMaker 6.31;
+use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
- 'ABSTRACT' => 'Log to RabbitMQ',
- 'AUTHOR' => 'Trevor Little <bundacia@tjlittle.com>',
- 'BUILD_REQUIRES' => {
- 'English' => '0',
- 'Log::Log4perl' => '0',
- 'Test::More' => '0',
- 'Test::Output' => '0'
+ "ABSTRACT" => "Log to RabbitMQ",
+ "AUTHOR" => "Trevor Little <bundacia\@tjlittle.com>",
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.30"
},
- 'CONFIGURE_REQUIRES' => {
- 'ExtUtils::MakeMaker' => '6.31'
+ "DISTNAME" => "Log-Log4perl-Appender-RabbitMQ",
+ "EXE_FILES" => [],
+ "LICENSE" => "perl",
+ "NAME" => "Log::Log4perl::Appender::RabbitMQ",
+ "PREREQ_PM" => {
+ "Net::AMQP::RabbitMQ" => "0.004002",
+ "Readonly" => 0,
+ "Test::Net::RabbitMQ" => "0.09",
+ "strict" => 0,
+ "warnings" => 0
},
- 'DISTNAME' => 'Log-Log4perl-Appender-RabbitMQ',
- 'EXE_FILES' => [],
- 'LICENSE' => 'perl',
- 'NAME' => 'Log::Log4perl::Appender::RabbitMQ',
- 'PREREQ_PM' => {
- 'Net::RabbitMQ' => '0',
- 'Readonly' => '0',
- 'Test::Net::RabbitMQ' => '0'
+ "TEST_REQUIRES" => {
+ "Log::Log4perl" => 0,
+ "Test::More" => 0,
+ "Test::Output" => 0
},
- 'VERSION' => '0.102220',
- 'test' => {
- 'TESTS' => 't/*.t'
+ "VERSION" => "0.141470",
+ "test" => {
+ "TESTS" => "t/*.t"
}
);
-unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
- my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
- my $pp = $WriteMakefileArgs{PREREQ_PM};
- for my $mod ( keys %$br ) {
- if ( exists $pp->{$mod} ) {
- $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
- }
- else {
- $pp->{$mod} = $br->{$mod};
- }
- }
+my %FallbackPrereqs = (
+ "Log::Log4perl" => 0,
+ "Net::AMQP::RabbitMQ" => "0.004002",
+ "Readonly" => 0,
+ "Test::More" => 0,
+ "Test::Net::RabbitMQ" => "0.09",
+ "Test::Output" => 0,
+ "strict" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}
delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
@@ -1,13 +1,15 @@
This archive contains the distribution Log-Log4perl-Appender-RabbitMQ,
-version 0.102220:
+version 0.141470:
Log to RabbitMQ
-This software is copyright (c) 2010 by Trevor Little.
+This software is copyright (c) 2014 by Trevor Little.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
+This README file was generated by Dist::Zilla::Plugin::Readme v5.019.
+
@@ -9,36 +9,24 @@ repository.web = http://github.com/bundacia/Log-Log4perl-Appender-RabbitMQ
repository.url = git://github.com/bundacia/Log-Log4perl-Appender-RabbitMQ.git
repository.type = git
-[GatherDir]
-[PruneCruft]
-[ManifestSkip]
+[@Basic]
[MetaJSON]
-[License]
-[Readme]
-[ExtraTests]
-[ExecDir]
-[ShareDir]
-[MakeMaker]
-[Manifest]
-[TestRelease]
-[ConfirmRelease]
-[UploadToCPAN]
; Update the Changes file with the release number
[NextRelease]
-format = -- %-9v %{yyyy-MM-dd HH:mm:ss VVV}d
; Add release/author tests
-[CriticTests]
+[Test::Perl::Critic]
[PodCoverageTests]
[PodSyntaxTests]
+[Test::CPAN::Changes]
; Find Prereqs Automagically
-[AutoPrereq]
+[AutoPrereqs]
; Prereqs missed by AutoPrereq
-[Prereq]
-Test::Net::RabbitMQ = 0
+[Prereqs]
+Test::Net::RabbitMQ = 0.09
; Pick a version Number based on the day
[AutoVersion]
@@ -47,3 +35,8 @@ major = 0
; Update Version and POD in code
[PkgVersion]
[PodWeaver]
+
+; Automate Release to CPAN
+[TestRelease]
+[ConfirmRelease]
+[UploadToCPAN]
@@ -5,18 +5,15 @@ use strict;
use warnings;
package Log::Log4perl::Appender::RabbitMQ;
-BEGIN {
- $Log::Log4perl::Appender::RabbitMQ::VERSION = '0.102220';
-}
-
+$Log::Log4perl::Appender::RabbitMQ::VERSION = '0.141470';
our @ISA = qw/ Log::Log4perl::Appender /;
-use Net::RabbitMQ;
+use Net::AMQP::RabbitMQ 0.004002;
use Readonly;
Readonly my $CHANNEL => 1;
-my $RabbitMQClass = 'Net::RabbitMQ';
+my $RabbitMQClass = 'Net::AMQP::RabbitMQ';
##################################################
sub new {
@@ -140,7 +137,7 @@ sub log {
my $mq = $self->{mq};
- # do nothing if the Net::RabbitMQ object is missing
+ # do nothing if the Net::AMQP::RabbitMQ object is missing
return unless $mq;
# customize the routing key for this message by
@@ -158,7 +155,7 @@ sub log {
1;
} or do {
# If you got an error warn about it and clear the
- # Net::RabbitMQ object so we don't keep trying
+ # Net::AMQP::RabbitMQ object so we don't keep trying
warn "ERROR logging to RabbitMQ via ".ref($self).": $@\n";
$self->{mq} = undef;
};
@@ -168,17 +165,19 @@ sub log {
1;
-
+__END__
=pod
+=encoding UTF-8
+
=head1 NAME
Log::Log4perl::Appender::RabbitMQ - Log to RabbitMQ
=head1 VERSION
-version 0.102220
+version 0.141470
=head1 SYNOPSIS
@@ -201,18 +200,23 @@ version 0.102220
=head1 DESCRIPTION
-This is a L<Log::Log4perl> appender for publishing log messages to RabbitMQ group using L<Net::RabbitMQ>.
-Defaults for unspecified options are provided by L<Net::RabbitMQ> and can be found in it's documentation.
+This is a L<Log::Log4perl> appender for publishing log messages to RabbitMQ
+using L<Net::AMQP::RabbitMQ>.
+Defaults for unspecified options are provided by L<Net::AMQP::RabbitMQ> and
+can be found in it's documentation.
=head1 CONFIG OPTIONS
-All of the following options can be passed to the constructor, or be specified in the Log4perl config file. Unless otherwise
-stated, any options not specified will get whatever defaults L<Net::RabbitMQ> provides. See the documentation for that module
-for more details.
+All of the following options can be passed to the constructor, or be
+specified in the Log4perl config file. Unless otherwise stated, any options
+not specified will get whatever defaults L<Net::AMQP::RabbitMQ> provides.
+See the documentation for that module for more details.
=head3 Connection Options
-These options are used in the call to L<Net::RabbitMQ::connect()|Net::RabbitMQ/"methods"> when the appender is created.
+These options are used in the call to
+L<Net::AMQP::RabbitMQ::connect()|Net::AMQP::RabbitMQ/"Methods"> when the
+appender is created.
=over 4
@@ -238,19 +242,23 @@ Defaults to localhost.
=head3 Exchange Options
-Except for L<declare_exchange>, these options are used in a call to L<Net::RabbitMQ::exchange_declare()|Net::RabbitMQ/"methods"> to declare the
-exchange specified on the L<exchange> option (See L<Publish Options>).
-If L<declare_exchange> is false (the default) the exchange will not be declared and must already exist.
+Except for L<declare_exchange>, these options are used in a call to
+L<Net::AMQP::RabbitMQ::exchange_declare()|Net::AMQP::RabbitMQ/"Methods"> to
+declare the exchange specified on the L<exchange> option
+(See L<Publish Options>).
+If L<declare_exchange> is false (the default) the exchange will not be
+declared and must already exist.
=over 4
=item declare_exchange
-Declare the exchange, or just trust that it already exists? Boolean, defaults to 0.
+Declare the exchange, or just trust that it already exists?
+Boolean, defaults to 0.
=item exchange_type
-'direct, 'topic', etc. Boolean, defaults to 0.
+'direct, 'topic', etc.
=item durable_exchange
@@ -264,21 +272,25 @@ Delete the exchange when this proccess disconnects? Boolean, defaults to 1.
=head3 Publish Options
-These options are used in the call to L<Net::RabbitMQ::publish()|Net::RabbitMQ/"methods"> for each message.
+These options are used in the call to
+L<Net::AMQP::RabbitMQ::publish()|Net::AMQP::RabbitMQ/"Methods"> for each
+message.
=over 4
=item routing_key
-The routing key for messages. If the routing key contains a C<%c> or a C<%p> it will
-be interpolated for each message. C<%c> will be replaced with the Log4perl category.
+The routing key for messages. If the routing key contains a C<%c> or a C<%p>
+it will be interpolated for each message. C<%c> will be replaced with the
+Log4perl category.
C<%p> will be replaces with the Log4perl priority.
Defaults to C<%C>
=item exchange
-The exchange to publish the message too. This exchange must already exist.
+The exchange to publish the message too. This exchange must already exist
+unless declare_exchange is set to true.
=item mandatory
@@ -292,7 +304,8 @@ boolean. Flag published messages immediate.
=head1 METHODS
-This is a subclass of L<Log::Log4perl::Appender>. It overrides the following methods:
+This is a subclass of L<Log::Log4perl::Appender>. It overrides the following
+methods:
=over 4
@@ -308,13 +321,9 @@ Trevor Little <bundacia@tjlittle.com>
=head1 COPYRIGHT AND LICENSE
-This software is copyright (c) 2010 by Trevor Little.
+This software is copyright (c) 2014 by Trevor Little.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
-
-
-__END__
-
@@ -16,4 +16,5 @@ use English qw(-no_match_vars);
eval "use Test::Perl::Critic";
plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
+Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
all_critic_ok();
@@ -53,7 +53,27 @@ $logger->debug("debugging message 1 ");
ok(! defined $mq->recv(), "debug lvl ignored as per config");
$logger->info("info message 1 ");
-is($mq->recv(), "INFO>info message 1 \n", "info message sent to Rabbit with proper format");
+is_deeply(
+ $mq->recv(),
+ {
+ body => "INFO>info message 1 \n",
+ routing_key => 'myqueue',
+ exchange => 'myexchange',
+ delivery_tag => 1,
+ consumer_tag => '',
+ props => undef,
+ },
+ "info message sent to Rabbit with proper format");
$logger->warn("warning message 1 ");
-is($mq->recv(), "WARN>warning message 1 \n", "warn message sent to Rabbit with proper format");
+is_deeply(
+ $mq->recv(),
+ {
+ body => "WARN>warning message 1 \n",
+ routing_key => 'myqueue',
+ exchange => 'myexchange',
+ delivery_tag => 2,
+ consumer_tag => '',
+ props => undef,
+ },
+ "warn message sent to Rabbit with proper format");
@@ -0,0 +1,19 @@
+#!perl
+
+BEGIN {
+ unless ($ENV{RELEASE_TESTING}) {
+ require Test::More;
+ Test::More::plan(skip_all => 'these tests are for release candidate testing');
+ }
+}
+
+
+use strict;
+use warnings;
+
+use Test::More 0.96 tests => 2;
+use_ok('Test::CPAN::Changes');
+subtest 'changes_ok' => sub {
+ changes_file_ok('Changes');
+};
+done_testing();
@@ -7,15 +7,9 @@ BEGIN {
}
}
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.08";
-plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage"
- if $@;
-
-eval "use Pod::Coverage::TrustPod";
-plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage"
- if $@;
+use Test::Pod::Coverage 1.08;
+use Pod::Coverage::TrustPod;
all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -7,9 +7,8 @@ BEGIN {
}
}
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
use Test::More;
-
-eval "use Test::Pod 1.41";
-plan skip_all => "Test::Pod 1.41 required for testing POD" if $@;
+use Test::Pod 1.41;
all_pod_files_ok();