[libmessage-passing-zeromq-perl] 14/78: Add author side tests

Jonas Smedegaard js at alioth.debian.org
Mon Sep 30 09:28:18 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libmessage-passing-zeromq-perl.

commit 61250fe63039cb3c96bf90dcac39681f08d56c6a
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Sun Mar 4 17:54:46 2012 +0000

    Add author side tests
---
 Makefile.PL            |   14 +++++++++
 README                 |   78 ++++++++++++++++++++++++++++++++++++++++++++++++
 t/author/notabs.t      |   10 +++++++
 t/author/pod.t         |    8 +++++
 t/author/podcoverage.t |   20 +++++++++++++
 t/author/spelling.t    |   29 ++++++++++++++++++
 6 files changed, 159 insertions(+)

diff --git a/Makefile.PL b/Makefile.PL
index d763888..45d4148 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -18,5 +18,19 @@ requires 'Log::Stash' => '0.001';
 
 test_requires 'Test::More' => '0.88';
 
+author_requires 'Test::Pod' => '1.14';
+author_requires 'Test::NoTabs';
+author_requires 'Test::Pod::Coverage' => '1.04';
+author_requires 'Pod::Coverage' => '0.19';
+author_requires 'Pod::Coverage::TrustPod';
+author_requires 'Test::Spelling';
+
+author_tests 't/author';
+
+if ($Module::Install::AUTHOR) {
+    system("pod2text lib/Log/Stash/ZeroMQ.pm > README")
+        and die $!;
+}
+
 WriteAll;
 
diff --git a/README b/README
new file mode 100644
index 0000000..44a5697
--- /dev/null
+++ b/README
@@ -0,0 +1,78 @@
+NAME
+    Log::Stash::ZeroMQ - input and output logstash messages to ZeroMQ.
+
+SYNOPSIS
+        # Terminal 1:
+        $ logstash --input STDIN --output ZeroMQ --output_options '{"connect":"tcp://127.0.0.1:5558"}'
+        {"data":{"some":"data"},"@metadata":"value"}
+
+        # Terminal 2:
+        $ logstash --output STDOUT --input ZeroMQ --input_options '{"socket_bind":"tcp://*:5558"}'
+        {"data":{"some":"data"},"@metadata":"value"}
+
+DESCRIPTION
+    A ZeroMQ transport for Log::Stash.
+
+    Designed for use as a log transport and aggregation mechanism for perl
+    applications, allowing you to aggregate structured and non-structured
+    log messages across the network in a non-blocking manor.
+
+    Clients (I.e. users of the Log::Stash::Output::ZeroMQ class) connect to
+    a server (I.e. a user of the "sub sockets. These are setup to be lossy
+    and non-blocking, meaning that if the log-receiver process is down or
+    slow, then the application will queue a small (and configurable) amount
+    of logs on it's side, and after that log messages will be dropped." in
+    Log::Stash::Input::ZeroMQ class) via ZeroMQ's pub
+
+    Whilst throwing away log messages isn't a good thing to do, or something
+    that you want to happen regularly, in many (especially web application)
+    contexts, network logging being a single point of failure is
+    unaccaptable from a reliablilty and graceful degredation standpoint.
+
+    The application grinding to a halt as a non-essential centralised
+    resource is unavailable (e.g. the log aggregation server) is
+    significnalty less acceptable than the loss of non-essential logging
+    data.
+
+HOW TO USE
+    In your application emitting messages, you can either use
+    Log::Stash::Output::ZeroMQ directly, of you can use it via
+    Log::Dispatch::Log::Stash.
+
+        # FIXME - Example code, including overriding IP to connect to here
+
+    On your log aggregation server, just run the logstash utility:
+
+        # FIXME - Example command line here
+
+SEE ALSO
+    Log::Stash::Output::ZeroMQ
+    Log::Stash::Input::ZeroMQ
+    Log::Stash
+    ZeroMQ
+    <http://www.zeromq.org/>
+
+AUTHOR
+    Tomas (t0m) Doran <bobtfish at bobtfish.net>
+
+SPONSORSHIP
+    This module exists due to the wonderful people at Suretec Systems
+    <http://www.suretecsystems.com/> who sponsored it's development.
+
+COPYRIGHT
+    Copyright Suretec Systems 2012.
+
+LICENSE
+    GNU Affero General Public License, Version 3
+
+    If you feel this is too restrictive to be able to use this software,
+    please talk to us as we'd be willing to consider relicensing under less
+    restrictive terms.
+
+POD ERRORS
+    Hey! The above document had some coding errors, which are explained
+    below:
+
+    Around line 56:
+        Unterminated L<...> sequence
+
diff --git a/t/author/notabs.t b/t/author/notabs.t
new file mode 100644
index 0000000..5cd3ae0
--- /dev/null
+++ b/t/author/notabs.t
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+
+use File::Spec;
+use FindBin ();
+use Test::More;
+use Test::NoTabs;
+
+all_perl_files_ok(qw/lib/);
+
diff --git a/t/author/pod.t b/t/author/pod.t
new file mode 100644
index 0000000..f908f73
--- /dev/null
+++ b/t/author/pod.t
@@ -0,0 +1,8 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Test::Pod 1.14;
+
+all_pod_files_ok();
+
diff --git a/t/author/podcoverage.t b/t/author/podcoverage.t
new file mode 100644
index 0000000..4d703ed
--- /dev/null
+++ b/t/author/podcoverage.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Pod::Coverage 0.19;
+use Test::Pod::Coverage 1.04;
+
+my @modules = all_modules;
+our @private = ( 'BUILD' );
+foreach my $module (@modules) {
+    local @private = (@private, 'expand_class_name', 'make') if $module =~ /^Log::Stash::DSL::Factory$/;
+
+    pod_coverage_ok($module, {
+        also_private   => \@private,
+        coverage_class => 'Pod::Coverage::TrustPod',
+    });
+}
+
+done_testing;
+
diff --git a/t/author/spelling.t b/t/author/spelling.t
new file mode 100644
index 0000000..1e30bd9
--- /dev/null
+++ b/t/author/spelling.t
@@ -0,0 +1,29 @@
+use strict;
+use warnings;
+use Test::More;
+use Test::Spelling;
+
+add_stopwords(qw(
+    Starman
+    ZeroMQ
+    API
+    Affero
+    FCGI
+    JSON
+    Tomas
+    Doran
+    t0m
+    Jorden
+    Logstash
+    Sissel
+    Suretec
+    TODO
+    STDIN
+    STDOUT
+    STDERR
+    logstash
+));
+set_spell_cmd('aspell list -l en');
+all_pod_files_spelling_ok();
+
+done_testing();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmessage-passing-zeromq-perl.git



More information about the Pkg-perl-cvs-commits mailing list