Skip to content

Commit

Permalink
Misc2 (#152)
Browse files Browse the repository at this point in the history
* t/12: encapsulate test cleanups
* promote Marc to author
* add cleanup for sqlite tests
* t/17 fixed
* update PSL
* remove test DB between runs
* META update
* DEVELOP: remove ref to dist::zilla
* add .release shell scripts to automate release tasks
* Changes: -> markdown, remove redundant tokens
  • Loading branch information
msimerson authored Oct 25, 2019
1 parent bdab44b commit 5b53106
Show file tree
Hide file tree
Showing 61 changed files with 2,805 additions and 744 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ Build.bat
Makefile
Makefile.old
MANIFEST.bak
META.yml
MYMETA.json
MYMETA.yml
nytprof.out
pm_to_blib
Mail-DMARC-*
t/reports-test.sqlite
dmarc_reports.sqlite
*.bak
5 changes: 0 additions & 5 deletions .mailmap

This file was deleted.

9 changes: 9 additions & 0 deletions .release/bump_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

NEWVER="1.$(date '+%Y%m%d')"
echo "$NEWVER"

sed -i '' \
-e "/VERSION =/ s/= .*$/= '$NEWVER';/" \
-e "/^version / s/.*/version $NEWVER/" \
$(find lib -type f -name '*.pm')
7 changes: 7 additions & 0 deletions .release/copyright_year.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

YEAR=$(date "+%Y")

sed -i '' \
-e "/copyright/ s/20[[:digit:]][[:digit:]]/$YEAR/" \
LICENSE $(find lib -type f -name '*.pm')
3 changes: 3 additions & 0 deletions .release/readme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

pod2markdown lib/Mail/DMARC.pm > README.md
6 changes: 6 additions & 0 deletions .release/tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

TAGNAME="v1.$(date '+%Y%M%d')"
echo "tag $TAGNAME"

git tag "$TAGNAME"
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: perl
perl:
- "5.28"
- "5.22"
# perlbrew (used by Travis to install perl versions) no longer supports these
# lower versions
Expand All @@ -15,18 +16,21 @@ before_install:
- psql -U postgres dmarc_report < share/mail_dmarc_schema.pgsql
- mysql -e 'CREATE DATABASE IF NOT EXISTS dmarc_report;'
- mysql -u root --password="" dmarc_report < share/mail_dmarc_schema.mysql

install:
- cpanm --quiet --notest Regexp::Common Config::Tiny File::ShareDir Net::DNS::Resolver
- cpanm --quiet --notest DBD::SQLite DBD::Pg DBD::mysql
- cpanm --quiet --notest Net::IP Socket6 Email::MIME Net::SMTPS XML::LibXML
- cpanm --quiet --notest DBIx::Simple HTTP::Tiny Test::File::ShareDir Test::Output
- cpanm --quiet --notest Net::IDN::Encode CGI
- cpanm --quiet --notest XML::Validator::Schema

script:
- HARNESS_IS_VERBOSE=1 prove -v -Ilib t

after_success:
- rm dmarc_reports.sqlite || echo "ok"
- rm t/reports-test.sqlite || echo "ok"
- cpanm -n Devel::Cover::Report::Coveralls
- cover -test -make 'prove -Ilib t' -report coveralls

Expand Down
130 changes: 130 additions & 0 deletions Build.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@

use strict;
use warnings;

use Module::Build 0.3601;


my %module_build_args = (
"build_requires" => {
"Module::Build" => "0.3601"
},
"configure_requires" => {
"ExtUtils::MakeMaker" => 0,
"File::ShareDir::Install" => "0.06",
"Module::Build" => "0.3601"
},
"dist_abstract" => "Perl implementation of DMARC",
"dist_author" => [
"Matt Simerson <msimerson\@cpan.org>",
"Davide Migliavacca <shari\@cpan.org>",
"Marc Bradshaw <marc\@marcbradshaw.net>"
],
"dist_name" => "Mail-DMARC",
"dist_version" => "1.20191024",
"license" => "perl",
"module_name" => "Mail::DMARC",
"recommends" => {
"CGI" => 0,
"Email::Simple" => 0,
"IO::Compress::Gzip" => 0,
"IO::Compress::Zip" => 0,
"IO::Uncompress::Gunzip" => 0,
"IO::Uncompress::Unzip" => 0,
"Mail::DKIM" => 0,
# "MIME::Lite" => 0,
"Net::HTTP" => 0,
"Net::IMAP::Simple" => 0,
"Net::Server" => 2,
"XML::SAX::ParserFactory" => 0,
"XML::Validator::Schema" => 0,
},
"recursive_test_files" => 1,
"requires" => {
"CGI" => 0,
"CPAN" => 0,
"Carp" => 0,
"Config::Tiny" => 0,
"DBD::SQLite" => "1.31",
"DBIx::Simple" => "1.35",
"Data::Dumper" => 0,
"Email::MIME" => 0,
"Email::Simple" => 0,
"Encode" => 0,
"English" => 0,
"File::ShareDir" => 0,
"Getopt::Long" => 0,
"HTTP::Request" => 0,
"HTTP::Tiny" => 0,
"IO::Compress::Gzip" => 0,
"IO::Compress::Zip" => 0,
"IO::File" => 0,
"IO::Socket::SSL" => 0,
"IO::Uncompress::Gunzip" => 0,
"IO::Uncompress::Unzip" => 0,
"JSON" => 0,
"LWP::UserAgent" => 0,
"Mail::DKIM::PrivateKey" => 0,
"Mail::DKIM::Signer" => 0,
"Mail::DKIM::TextWrap" => 0,
"Net::DNS::Resolver" => 0,
"Net::HTTP" => 0,
"Net::IDN::Encode" => 0,
"Net::IP" => 0,
"Net::SMTPS" => 0,
"Net::SSLeay" => 0,
"Net::Server::HTTP" => 0,
"POSIX" => 0,
"Pod::Usage" => 0,
"Regexp::Common" => "2013031301",
"Socket" => 0,
"Socket6" => "0.23",
"Sys::Hostname" => 0,
"Sys::Syslog" => 0,
"Test::File::ShareDir" => 0,
"URI" => 0,
"XML::LibXML" => 0,
"lib" => 0,
"parent" => 0,
"perl" => "5.008",
"strict" => 0,
"warnings" => 0
},
"script_files" => [
"bin/dmarc_update_public_suffix_list",
"bin/dmarc_send_reports",
"bin/dmarc_httpd",
"bin/dmarc_lookup",
"bin/dmarc_receive",
"bin/dmarc_http_client",
"bin/dmarc_view_reports"
],
"share_dir" => {
"dist" => "share"
},
"test_requires" => {
"Test::Exception" => 0,
"Test::File::ShareDir" => 0,
"Test::More" => 0,
"Test::Output" => 0
}
);


my %fallback_build_requires = (
"Module::Build" => "0.3601",
"Test::Exception" => 0,
"Test::File::ShareDir" => 0,
"Test::More" => 0,
"Test::Output" => 0
);


unless ( eval { Module::Build->VERSION(0.4004) } ) {
delete $module_build_args{test_requires};
$module_build_args{build_requires} = \%fallback_build_requires;
}

my $build = Module::Build->new(%module_build_args);

$build->create_build_script;
Loading

0 comments on commit 5b53106

Please sign in to comment.