From 9fbef3a9385c1198af9809b1cb517b55a5017cb7 Mon Sep 17 00:00:00 2001 From: Matthew Connelly Date: Thu, 19 Nov 2015 19:47:21 +0000 Subject: [PATCH] v0.02 The CPAN Edition --- Changes | 8 ++ MANIFEST | 6 ++ MANIFEST.SKIP | 9 +++ Makefile.PL | 41 ++++++++++ README.pod | 78 +++++++++++++++++++ {App => lib/App}/NoPaste/Service/WerePaste.pm | 31 +++++++- t/00-load.t | 9 +++ 7 files changed, 179 insertions(+), 3 deletions(-) create mode 100644 Changes create mode 100644 MANIFEST create mode 100644 MANIFEST.SKIP create mode 100644 Makefile.PL create mode 100644 README.pod rename {App => lib/App}/NoPaste/Service/WerePaste.pm (63%) create mode 100644 t/00-load.t diff --git a/Changes b/Changes new file mode 100644 index 0000000..74c7501 --- /dev/null +++ b/Changes @@ -0,0 +1,8 @@ +Revision history for Perl module App::Nopaste::Service::WerePaste + +0.02 2015-11-19 + - Minor layout changes, preparation for submission to CPAN + - Testing added + +0.01 2015-04-13 + - Initial release \ No newline at end of file diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..bed6af4 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,6 @@ +Changes +Makefile.PL +MANIFEST +MANIFEST.SKIP +t/00-load.t +lib/App/Nopaste/Service/WerePaste.pm \ No newline at end of file diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..b9976bc --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,9 @@ +^blib +^pm_to_blib +^\.git +^MYMETA +^Makefile$ +\.old$ +\.tar\.gz$ +README\.pod + diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..5f0e4d3 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,41 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use ExtUtils::MakeMaker; + +my ($mm) = $ExtUtils::MakeMaker::VERSION =~ /^([^_]+)/; + +WriteMakefile( + NAME => 'App::Nopaste::Service::WerePaste', + VERSION_FROM => 'lib/App/Nopaste/Service/WerePaste.pm', + ABSTRACT_FROM => 'lib/App/Nopaste/Service/WerePaste.pm', + AUTHOR => 'Matthew Connelly ', + PREREQ_PM => { + 'App::Nopaste' => '0.91', + }, + ( $mm >= 6.31 + ? ( LICENSE => 'mit' ) + : () + ), + ( $mm < 6.46 + ? () + : ( META_MERGE => { + resources => { + license => 'http://dev.perl.org/licenses/', + repository => 'https://github.com/Maffsie/App-Nopaste-Service-WerePaste', + bugtracker => 'https://github.com/Maffsie/App-Nopaste-Service-WerePaste/issues', + }, + no_index => {directory => [qw/t/]}, + }, + META_ADD => { + build_requires => {}, + configure_requires => {}, + test_requires => { + 'Test::More' => '0.47', + }, + }, + ) + ), + test => { TESTS => 't/*.t' } +); + diff --git a/README.pod b/README.pod new file mode 100644 index 0000000..cf02aea --- /dev/null +++ b/README.pod @@ -0,0 +1,78 @@ +=pod + +=head1 NAME + +App::Nopaste::Service::WerePaste - nopaste service for L + +=head1 VERSION + +version 0.004 + +=head1 SYNOPSIS + +L Service for L. + +To use, simple use: + + $ echo "text" | nopaste -s WerePaste + +By default it pastes to L, but you can +override this be setting the C environment variable. + +You can set HTTP Basic Auth credentials to use for the nopaste service +if necessary by using: + + WEREPASTE_USER=username + WEREPASTE_PASS=password + +The expiration of the post can be modified by setting the C +environment variable. Acceptable values are things like: + + WEREPASTE_EXP=weeks:1 + WEREPASTE_EXP=years:1:months:2 + WEREPASTE_EXP=weeks:1:days:2:hours:12:minutes:10:seconds:5 + WEREPASTE_EXP=never:1 # Never Expire + +=head1 AUTHOR + +Matthew Connelly +based on work by +William Wolf + +=head1 COPYRIGHT AND LICENSE + +The MIT License (MIT) + +Copyright (c) 2015 Matthew Connelly + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +This work was originally based on works by William Wolf. +The license for the original work (CC0) is as follows: + + +William Wolf has dedicated the work to the Commons by waiving all of his +or her rights to the work worldwide under copyright law and all related or +neighboring legal rights he or she had in the work, to the extent allowable by +law. + +Works under CC0 do not require attribution. When citing the work, you should +not imply endorsement by the author. + +=cut \ No newline at end of file diff --git a/App/NoPaste/Service/WerePaste.pm b/lib/App/NoPaste/Service/WerePaste.pm similarity index 63% rename from App/NoPaste/Service/WerePaste.pm rename to lib/App/NoPaste/Service/WerePaste.pm index 8396074..280a434 100644 --- a/App/NoPaste/Service/WerePaste.pm +++ b/lib/App/NoPaste/Service/WerePaste.pm @@ -2,7 +2,7 @@ use strict; use warnings; package App::Nopaste::Service::WerePaste; { - $App::Nopaste::Service::WerePaste::VERSION = '0.001'; + $App::Nopaste::Service::WerePaste::VERSION = '0.02'; } use Encode qw/decode_utf8/; @@ -62,13 +62,13 @@ version 0.004 =head1 SYNOPSIS -L Service for L. +L Service for L. To use, simple use: $ echo "text" | nopaste -s WerePaste -By default it pastes to L, but you can +By default it pastes to L, but you can override this be setting the C environment variable. You can set HTTP Basic Auth credentials to use for the nopaste service @@ -93,6 +93,31 @@ William Wolf =head1 COPYRIGHT AND LICENSE +The MIT License (MIT) + +Copyright (c) 2015 Matthew Connelly + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +This work was originally based on works by William Wolf. +The license for the original work (CC0) is as follows: + William Wolf has dedicated the work to the Commons by waiving all of his or her rights to the work worldwide under copyright law and all related or diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..705d328 --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,9 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use Test::More qw( no_plan ); + +BEGIN { + use_ok('App::Nopaste::Service::WerePaste'); +} \ No newline at end of file