From d937181f99e0511bd57094fe1e438abb2afc8f91 Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Thu, 1 Aug 2013 07:34:21 -0700 Subject: [PATCH] Full build of CPAN release 0.020 --- .gitignore | 18 -- .travis.yml | 34 --- Changes | 2 - INSTALL | 44 ++++ MANIFEST | 40 +++ META.json | 443 +++++++++++++++++++++++++++++++++ META.yml | 329 ++++++++++++++++++++++++ Makefile.PL | 85 +++++++ README | 188 ++++++++++++++ README.mkdn | 209 ---------------- SIGNATURE | 0 cpanfile | 35 +++ lib/Test/Moose/More.pm | 382 ++++++++++++++++------------ sandbox.mysql.tar.gz | 0 t/00-compile.t | 39 +++ t/000-report-versions-tiny.t | 94 +++++++ t/author-pod-spell.t | 38 +++ t/release-consistent-version.t | 18 ++ t/release-eol.t | 16 ++ t/release-has-version.t | 25 ++ t/release-minimum-version.t | 25 ++ t/release-no-smart-comments.t | 31 +++ t/release-no-tabs.t | 16 ++ t/release-pod-coverage.t | 30 +++ t/release-pod-linkcheck.t | 37 +++ t/release-pod-syntax.t | 24 ++ 26 files changed, 1776 insertions(+), 426 deletions(-) delete mode 100644 .gitignore delete mode 100644 .travis.yml create mode 100644 INSTALL create mode 100644 MANIFEST create mode 100644 META.json create mode 100644 META.yml create mode 100644 Makefile.PL create mode 100644 README delete mode 100644 README.mkdn create mode 100644 SIGNATURE create mode 100644 cpanfile create mode 100644 sandbox.mysql.tar.gz create mode 100644 t/00-compile.t create mode 100644 t/000-report-versions-tiny.t create mode 100644 t/author-pod-spell.t create mode 100644 t/release-consistent-version.t create mode 100644 t/release-eol.t create mode 100644 t/release-has-version.t create mode 100644 t/release-minimum-version.t create mode 100644 t/release-no-smart-comments.t create mode 100644 t/release-no-tabs.t create mode 100644 t/release-pod-coverage.t create mode 100644 t/release-pod-linkcheck.t create mode 100644 t/release-pod-syntax.t diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f13c5fd..0000000 --- a/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -blib* -Makefile -Makefile.old -Build -_build* -pm_to_blib* -*.tar.gz -.lwpcookies -Test-Moose-More-* -cover_db -*.old -inc -.*.swp -META.yml -*.bak -MYMETA.* -.build/ -releases/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 20f05b0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: perl -perl: - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" - - "5.8" - -matrix: - allowed_to_fail: - - perl: "5.8" - -install: - # git bits sometimes needed... - - git config user.name 'Travis-CI' - - git config user.email 'travis@nowhere.dne' - - # echo "# Deal with all of the DZIL dependancies, quickly and quietly" - - rm -rf ~/.cpanm - - mkdir ~/.cpanm - - sudo mount tmpfs -t tmpfs ~/.cpanm - - cpanm --quiet --notest --skip-satisfied Dist::Zilla - - dzil authordeps | grep -vP '[^\w:]' | xargs -n 5 -P 10 cpanm --quiet --notest --skip-satisfied - - # echo "# for LinkCheck" - - cpanp x - - - export AUTOMATED_TESTING=1 HARNESS_OPTIONS=j10:c HARNESS_TIMER=1 - - dzil listdeps | grep -vP '[^\w:]' | cpanm --verbose - -script: - - export DZSIGN=archive - - dzil smoke --release --author diff --git a/Changes b/Changes index 2e76322..3bd8798 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,5 @@ Revision history for Test-Moose-More -{{$NEXT}} - 0.020 2013-08-01 07:33:57 PDT-0700 * Drop Perl6::Junction in favor of Syntax::Keyword::Junction Same thing -- essentially, AFAICT -- except that we don't get 'smartmatch diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..71e809a --- /dev/null +++ b/INSTALL @@ -0,0 +1,44 @@ + +This is the Perl distribution Test-Moose-More. + +Installing Test-Moose-More is straightforward. + +## Installation with cpanm + +If you have cpanm, you only need one line: + + % cpanm Test::Moose::More + +If you are installing into a system-wide directory, you may need to pass the +"-S" flag to cpanm, which uses sudo to install the module: + + % cpanm -S Test::Moose::More + +## Installing with the CPAN shell + +Alternatively, if your CPAN shell is set up, you should just be able to do: + + % cpan Test::Moose::More + +## Manual installation + +As a last resort, you can manually install it. Download the tarball, untar it, +then build it: + + % perl Makefile.PL + % make && make test + +Then install it: + + % make install + +If you are installing into a system-wide directory, you may need to run: + + % sudo make install + +## Documentation + +Test-Moose-More documentation is available as POD. +You can run perldoc from a shell to read the documentation: + + % perldoc Test::Moose::More diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..e4bf762 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,40 @@ +Changes +INSTALL +LICENSE +MANIFEST +META.json +META.yml +Makefile.PL +README +SIGNATURE +cpanfile +dist.ini +lib/Test/Moose/More.pm +sandbox.mysql.tar.gz +t/00-compile.t +t/000-report-versions-tiny.t +t/attribute/coerce.t +t/author-pod-spell.t +t/check_sugar.t +t/does_not_ok.t +t/does_ok.t +t/has_attribute_ok.t +t/has_method_ok.t +t/is_anon.t +t/is_class.t +t/is_not_anon.t +t/is_role.t +t/meta_ok.t +t/release-consistent-version.t +t/release-eol.t +t/release-has-version.t +t/release-minimum-version.t +t/release-no-smart-comments.t +t/release-no-tabs.t +t/release-pod-coverage.t +t/release-pod-linkcheck.t +t/release-pod-syntax.t +t/requires_method_ok.t +t/validate_attribute.t +t/validate_class.t +t/validate_role.t diff --git a/META.json b/META.json new file mode 100644 index 0000000..5550862 --- /dev/null +++ b/META.json @@ -0,0 +1,443 @@ +{ + "abstract" : "More tools for testing Moose packages", + "author" : [ + "Chris Weyl " + ], + "dynamic_config" : 0, + "generated_by" : "Dist::Zilla version 4.300035, CPAN::Meta::Converter version 2.131560", + "license" : [ + "lgpl_2_1" + ], + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "name" : "Test-Moose-More", + "no_index" : { + "directory" : [ + "corpus", + "t" + ] + }, + "prereqs" : { + "configure" : { + "requires" : { + "ExtUtils::MakeMaker" : "6.30" + } + }, + "develop" : { + "requires" : { + "Pod::Coverage::TrustPod" : "0", + "Test::Pod" : "1.41", + "Test::Pod::Coverage" : "1.08", + "version" : "0.9901" + } + }, + "runtime" : { + "requires" : { + "Data::OptList" : "0", + "Moose::Autobox" : "0", + "Moose::Util" : "0", + "Moose::Util::TypeConstraints" : "0", + "Scalar::Util" : "0", + "Sub::Exporter" : "0", + "Syntax::Keyword::Junction" : "0", + "Test::Builder" : "0", + "Test::Moose" : "0", + "Test::More" : "0", + "perl" : "5.006", + "strict" : "0", + "warnings" : "0" + } + }, + "test" : { + "requires" : { + "Capture::Tiny" : "0", + "Moose" : "0", + "Moose::Role" : "0", + "TAP::SimpleOutput" : "0", + "Test::Builder::Tester" : "0", + "Test::More" : "0.88", + "blib" : "0", + "namespace::autoclean" : "0" + } + } + }, + "provides" : { + "Test::Moose::More" : { + "file" : "lib/Test/Moose/More.pm", + "version" : "0.020" + } + }, + "release_status" : "stable", + "resources" : { + "bugtracker" : { + "web" : "https://github.com/RsrchBoy/Test-Moose-More/issues" + }, + "homepage" : "http://metacpan.org/release/Test-Moose-More/", + "repository" : { + "type" : "git", + "url" : "git://github.com/RsrchBoy/Test-Moose-More.git", + "web" : "https://github.com/RsrchBoy/Test-Moose-More" + } + }, + "version" : "0.020", + "x_Dist_Zilla" : { + "perl" : { + "version" : "5.018000" + }, + "plugins" : [ + { + "class" : "Dist::Zilla::Plugin::NextRelease", + "name" : "@RSRCHBOY/NextRelease", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::Git::NextVersion", + "name" : "@RSRCHBOY/Git::NextVersion", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::ContributorsFromGit", + "name" : "@RSRCHBOY/ContributorsFromGit", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", + "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::Fixups", + "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", + "name" : "@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::GatherDir", + "name" : "@RSRCHBOY/GatherDir", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Describe", + "name" : "@RSRCHBOY/Git::Describe", + "version" : "0.003" + }, + { + "class" : "Dist::Zilla::Plugin::PruneCruft", + "name" : "@RSRCHBOY/PruneCruft", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::ExecDir", + "name" : "@RSRCHBOY/ExecDir", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::ShareDir", + "name" : "@RSRCHBOY/ShareDir", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::MakeMaker", + "name" : "@RSRCHBOY/MakeMaker", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::InstallGuide", + "name" : "@RSRCHBOY/InstallGuide", + "version" : "1.200000" + }, + { + "class" : "Dist::Zilla::Plugin::Manifest", + "name" : "@RSRCHBOY/Manifest", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::SurgicalPkgVersion", + "name" : "@RSRCHBOY/SurgicalPkgVersion", + "version" : "0.0019" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeFromPod", + "name" : "@RSRCHBOY/ReadmeFromPod", + "version" : "0.18" + }, + { + "class" : "Dist::Zilla::Plugin::MinimumPerl", + "name" : "@RSRCHBOY/MinimumPerl", + "version" : "1.003" + }, + { + "class" : "Dist::Zilla::Plugin::ReportVersions::Tiny", + "name" : "@RSRCHBOY/ReportVersions::Tiny", + "version" : "1.09" + }, + { + "class" : "Dist::Zilla::Plugin::AutoPrereqs", + "name" : "@RSRCHBOY/AutoPrereqs", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::Prepender", + "name" : "@RSRCHBOY/Prepender", + "version" : "1.112280" + }, + { + "class" : "Dist::Zilla::Plugin::Test::PodSpelling", + "name" : "@RSRCHBOY/Test::PodSpelling", + "version" : "2.006000" + }, + { + "class" : "Dist::Zilla::Plugin::ConsistentVersionTest", + "name" : "@RSRCHBOY/ConsistentVersionTest", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::PodCoverageTests", + "name" : "@RSRCHBOY/PodCoverageTests", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::PodSyntaxTests", + "name" : "@RSRCHBOY/PodSyntaxTests", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::NoTabsTests", + "name" : "@RSRCHBOY/NoTabsTests", + "version" : "0.01" + }, + { + "class" : "Dist::Zilla::Plugin::EOLTests", + "name" : "@RSRCHBOY/EOLTests", + "version" : "0.02" + }, + { + "class" : "Dist::Zilla::Plugin::HasVersionTests", + "name" : "@RSRCHBOY/HasVersionTests", + "version" : "1.101420" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Compile", + "config" : { + "Dist::Zilla::Plugin::Test::Compile" : { + "module_finder" : [ + ":InstallModules" + ], + "script_finder" : [ + ":ExecFiles" + ] + } + }, + "name" : "@RSRCHBOY/Test::Compile", + "version" : "2.013" + }, + { + "class" : "Dist::Zilla::Plugin::ExtraTests", + "name" : "@RSRCHBOY/ExtraTests", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::NoSmartCommentsTests", + "name" : "@RSRCHBOY/NoSmartCommentsTests", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::Test::Pod::LinkCheck", + "name" : "@RSRCHBOY/Test::Pod::LinkCheck", + "version" : "1.001" + }, + { + "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", + "name" : "@RSRCHBOY/Test::MinimumVersion", + "version" : "2.000005" + }, + { + "class" : "Dist::Zilla::Plugin::Authority", + "name" : "@RSRCHBOY/Authority", + "version" : "1.006" + }, + { + "class" : "Dist::Zilla::Plugin::MetaConfig", + "name" : "@RSRCHBOY/MetaConfig", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::MetaJSON", + "name" : "@RSRCHBOY/MetaJSON", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::MetaYAML", + "name" : "@RSRCHBOY/MetaYAML", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::MetaNoIndex", + "name" : "@RSRCHBOY/MetaNoIndex", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::MetaProvides::Package", + "name" : "@RSRCHBOY/MetaProvides::Package", + "version" : "1.14000003" + }, + { + "class" : "Dist::Zilla::Plugin::GitHub::Meta", + "name" : "@RSRCHBOY/GitHub::Meta", + "version" : "0.35" + }, + { + "class" : "Dist::Zilla::Plugin::TestRelease", + "name" : "@RSRCHBOY/TestRelease", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", + "name" : "@RSRCHBOY/CheckChangesHasContent", + "version" : "0.006" + }, + { + "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", + "name" : "@RSRCHBOY/CheckPrereqsIndexed", + "version" : "0.009" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Check", + "name" : "@RSRCHBOY/Git::Check", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::ConfirmRelease", + "name" : "@RSRCHBOY/ConfirmRelease", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Commit", + "name" : "@RSRCHBOY/Git::Commit", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Tag", + "name" : "@RSRCHBOY/Git::Tag", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Git::CommitBuild", + "name" : "@RSRCHBOY/Git::CommitBuild", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::UploadToCPAN", + "name" : "@RSRCHBOY/UploadToCPAN", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::Git::Push", + "name" : "@RSRCHBOY/Git::Push", + "version" : "2.014" + }, + { + "class" : "Dist::Zilla::Plugin::Signature", + "name" : "@RSRCHBOY/Signature", + "version" : "1.100930" + }, + { + "class" : "Dist::Zilla::Plugin::InstallRelease", + "name" : "@RSRCHBOY/InstallRelease", + "version" : "0.008" + }, + { + "class" : "Dist::Zilla::Plugin::GitHub::Update", + "name" : "@RSRCHBOY/GitHub::Update", + "version" : "0.35" + }, + { + "class" : "Dist::Zilla::Plugin::ArchiveRelease", + "name" : "@RSRCHBOY/ArchiveRelease", + "version" : "4.00" + }, + { + "class" : "Dist::Zilla::Plugin::License", + "name" : "@RSRCHBOY/License", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", + "name" : "@RSRCHBOY/CopyFilesFromBuild", + "version" : "0.103510" + }, + { + "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", + "name" : "@RSRCHBOY/ReadmeMarkdownInRoot", + "version" : "0.131500" + }, + { + "class" : "Dist::Zilla::Plugin::CPANFile", + "name" : "@RSRCHBOY/CPANFile", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::PodWeaver", + "name" : "@RSRCHBOY/PodWeaver", + "version" : "3.101642" + }, + { + "class" : "Dist::Zilla::Plugin::RemovePrereqs", + "config" : { + "Dist::Zilla::Plugin::RemovePrereqs" : { + "modules_to_remove" : [ + "Moose::Deprecated" + ] + } + }, + "name" : "RemovePrereqs", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":InstallModules", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":IncModules", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":TestFiles", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ExecFiles", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":ShareFiles", + "version" : "4.300035" + }, + { + "class" : "Dist::Zilla::Plugin::FinderCode", + "name" : ":MainModule", + "version" : "4.300035" + } + ], + "zilla" : { + "class" : "Dist::Zilla::Dist::Builder", + "config" : { + "is_trial" : "0" + }, + "version" : "4.300035" + } + }, + "x_authority" : "cpan:RSRCHBOY" +} + diff --git a/META.yml b/META.yml new file mode 100644 index 0000000..fa5f9af --- /dev/null +++ b/META.yml @@ -0,0 +1,329 @@ +--- +abstract: 'More tools for testing Moose packages' +author: + - 'Chris Weyl ' +build_requires: + Capture::Tiny: 0 + Moose: 0 + Moose::Role: 0 + TAP::SimpleOutput: 0 + Test::Builder::Tester: 0 + Test::More: 0.88 + blib: 0 + namespace::autoclean: 0 +configure_requires: + ExtUtils::MakeMaker: 6.30 +dynamic_config: 0 +generated_by: 'Dist::Zilla version 4.300035, CPAN::Meta::Converter version 2.131560' +license: lgpl +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: Test-Moose-More +no_index: + directory: + - corpus + - t +provides: + Test::Moose::More: + file: lib/Test/Moose/More.pm + version: 0.020 +requires: + Data::OptList: 0 + Moose::Autobox: 0 + Moose::Util: 0 + Moose::Util::TypeConstraints: 0 + Scalar::Util: 0 + Sub::Exporter: 0 + Syntax::Keyword::Junction: 0 + Test::Builder: 0 + Test::Moose: 0 + Test::More: 0 + perl: 5.006 + strict: 0 + warnings: 0 +resources: + bugtracker: https://github.com/RsrchBoy/Test-Moose-More/issues + homepage: http://metacpan.org/release/Test-Moose-More/ + repository: git://github.com/RsrchBoy/Test-Moose-More.git +version: 0.020 +x_Dist_Zilla: + perl: + version: 5.018000 + plugins: + - + class: Dist::Zilla::Plugin::NextRelease + name: '@RSRCHBOY/NextRelease' + version: 4.300035 + - + class: Dist::Zilla::Plugin::Git::NextVersion + name: '@RSRCHBOY/Git::NextVersion' + version: 2.014 + - + class: Dist::Zilla::Plugin::ContributorsFromGit + name: '@RSRCHBOY/ContributorsFromGit' + version: 0.006 + - + class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch + name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::CorrectBranch' + version: 0.006 + - + class: Dist::Zilla::Plugin::Git::CheckFor::Fixups + name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::Fixups' + version: 0.006 + - + class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts + name: '@RSRCHBOY/@Git::CheckFor/Git::CheckFor::MergeConflicts' + version: 0.006 + - + class: Dist::Zilla::Plugin::GatherDir + name: '@RSRCHBOY/GatherDir' + version: 4.300035 + - + class: Dist::Zilla::Plugin::Git::Describe + name: '@RSRCHBOY/Git::Describe' + version: 0.003 + - + class: Dist::Zilla::Plugin::PruneCruft + name: '@RSRCHBOY/PruneCruft' + version: 4.300035 + - + class: Dist::Zilla::Plugin::ExecDir + name: '@RSRCHBOY/ExecDir' + version: 4.300035 + - + class: Dist::Zilla::Plugin::ShareDir + name: '@RSRCHBOY/ShareDir' + version: 4.300035 + - + class: Dist::Zilla::Plugin::MakeMaker + name: '@RSRCHBOY/MakeMaker' + version: 4.300035 + - + class: Dist::Zilla::Plugin::InstallGuide + name: '@RSRCHBOY/InstallGuide' + version: 1.200000 + - + class: Dist::Zilla::Plugin::Manifest + name: '@RSRCHBOY/Manifest' + version: 4.300035 + - + class: Dist::Zilla::Plugin::SurgicalPkgVersion + name: '@RSRCHBOY/SurgicalPkgVersion' + version: 0.0019 + - + class: Dist::Zilla::Plugin::ReadmeFromPod + name: '@RSRCHBOY/ReadmeFromPod' + version: 0.18 + - + class: Dist::Zilla::Plugin::MinimumPerl + name: '@RSRCHBOY/MinimumPerl' + version: 1.003 + - + class: Dist::Zilla::Plugin::ReportVersions::Tiny + name: '@RSRCHBOY/ReportVersions::Tiny' + version: 1.09 + - + class: Dist::Zilla::Plugin::AutoPrereqs + name: '@RSRCHBOY/AutoPrereqs' + version: 4.300035 + - + class: Dist::Zilla::Plugin::Prepender + name: '@RSRCHBOY/Prepender' + version: 1.112280 + - + class: Dist::Zilla::Plugin::Test::PodSpelling + name: '@RSRCHBOY/Test::PodSpelling' + version: 2.006000 + - + class: Dist::Zilla::Plugin::ConsistentVersionTest + name: '@RSRCHBOY/ConsistentVersionTest' + version: 0.02 + - + class: Dist::Zilla::Plugin::PodCoverageTests + name: '@RSRCHBOY/PodCoverageTests' + version: 4.300035 + - + class: Dist::Zilla::Plugin::PodSyntaxTests + name: '@RSRCHBOY/PodSyntaxTests' + version: 4.300035 + - + class: Dist::Zilla::Plugin::NoTabsTests + name: '@RSRCHBOY/NoTabsTests' + version: 0.01 + - + class: Dist::Zilla::Plugin::EOLTests + name: '@RSRCHBOY/EOLTests' + version: 0.02 + - + class: Dist::Zilla::Plugin::HasVersionTests + name: '@RSRCHBOY/HasVersionTests' + version: 1.101420 + - + class: Dist::Zilla::Plugin::Test::Compile + config: + Dist::Zilla::Plugin::Test::Compile: + module_finder: + - ':InstallModules' + script_finder: + - ':ExecFiles' + name: '@RSRCHBOY/Test::Compile' + version: 2.013 + - + class: Dist::Zilla::Plugin::ExtraTests + name: '@RSRCHBOY/ExtraTests' + version: 4.300035 + - + class: Dist::Zilla::Plugin::NoSmartCommentsTests + name: '@RSRCHBOY/NoSmartCommentsTests' + version: 0.006 + - + class: Dist::Zilla::Plugin::Test::Pod::LinkCheck + name: '@RSRCHBOY/Test::Pod::LinkCheck' + version: 1.001 + - + class: Dist::Zilla::Plugin::Test::MinimumVersion + name: '@RSRCHBOY/Test::MinimumVersion' + version: 2.000005 + - + class: Dist::Zilla::Plugin::Authority + name: '@RSRCHBOY/Authority' + version: 1.006 + - + class: Dist::Zilla::Plugin::MetaConfig + name: '@RSRCHBOY/MetaConfig' + version: 4.300035 + - + class: Dist::Zilla::Plugin::MetaJSON + name: '@RSRCHBOY/MetaJSON' + version: 4.300035 + - + class: Dist::Zilla::Plugin::MetaYAML + name: '@RSRCHBOY/MetaYAML' + version: 4.300035 + - + class: Dist::Zilla::Plugin::MetaNoIndex + name: '@RSRCHBOY/MetaNoIndex' + version: 4.300035 + - + class: Dist::Zilla::Plugin::MetaProvides::Package + name: '@RSRCHBOY/MetaProvides::Package' + version: 1.14000003 + - + class: Dist::Zilla::Plugin::GitHub::Meta + name: '@RSRCHBOY/GitHub::Meta' + version: 0.35 + - + class: Dist::Zilla::Plugin::TestRelease + name: '@RSRCHBOY/TestRelease' + version: 4.300035 + - + class: Dist::Zilla::Plugin::CheckChangesHasContent + name: '@RSRCHBOY/CheckChangesHasContent' + version: 0.006 + - + class: Dist::Zilla::Plugin::CheckPrereqsIndexed + name: '@RSRCHBOY/CheckPrereqsIndexed' + version: 0.009 + - + class: Dist::Zilla::Plugin::Git::Check + name: '@RSRCHBOY/Git::Check' + version: 2.014 + - + class: Dist::Zilla::Plugin::ConfirmRelease + name: '@RSRCHBOY/ConfirmRelease' + version: 4.300035 + - + class: Dist::Zilla::Plugin::Git::Commit + name: '@RSRCHBOY/Git::Commit' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::Tag + name: '@RSRCHBOY/Git::Tag' + version: 2.014 + - + class: Dist::Zilla::Plugin::Git::CommitBuild + name: '@RSRCHBOY/Git::CommitBuild' + version: 2.014 + - + class: Dist::Zilla::Plugin::UploadToCPAN + name: '@RSRCHBOY/UploadToCPAN' + version: 4.300035 + - + class: Dist::Zilla::Plugin::Git::Push + name: '@RSRCHBOY/Git::Push' + version: 2.014 + - + class: Dist::Zilla::Plugin::Signature + name: '@RSRCHBOY/Signature' + version: 1.100930 + - + class: Dist::Zilla::Plugin::InstallRelease + name: '@RSRCHBOY/InstallRelease' + version: 0.008 + - + class: Dist::Zilla::Plugin::GitHub::Update + name: '@RSRCHBOY/GitHub::Update' + version: 0.35 + - + class: Dist::Zilla::Plugin::ArchiveRelease + name: '@RSRCHBOY/ArchiveRelease' + version: 4.00 + - + class: Dist::Zilla::Plugin::License + name: '@RSRCHBOY/License' + version: 4.300035 + - + class: Dist::Zilla::Plugin::CopyFilesFromBuild + name: '@RSRCHBOY/CopyFilesFromBuild' + version: 0.103510 + - + class: Dist::Zilla::Plugin::ReadmeAnyFromPod + name: '@RSRCHBOY/ReadmeMarkdownInRoot' + version: 0.131500 + - + class: Dist::Zilla::Plugin::CPANFile + name: '@RSRCHBOY/CPANFile' + version: 4.300035 + - + class: Dist::Zilla::Plugin::PodWeaver + name: '@RSRCHBOY/PodWeaver' + version: 3.101642 + - + class: Dist::Zilla::Plugin::RemovePrereqs + config: + Dist::Zilla::Plugin::RemovePrereqs: + modules_to_remove: + - Moose::Deprecated + name: RemovePrereqs + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':InstallModules' + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':IncModules' + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':TestFiles' + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ExecFiles' + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':ShareFiles' + version: 4.300035 + - + class: Dist::Zilla::Plugin::FinderCode + name: ':MainModule' + version: 4.300035 + zilla: + class: Dist::Zilla::Dist::Builder + config: + is_trial: 0 + version: 4.300035 +x_authority: cpan:RSRCHBOY diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..ad259cc --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,85 @@ + +use strict; +use warnings; + +use 5.006; + +use ExtUtils::MakeMaker 6.30; + + + +my %WriteMakefileArgs = ( + "ABSTRACT" => "More tools for testing Moose packages", + "AUTHOR" => "Chris Weyl ", + "BUILD_REQUIRES" => {}, + "CONFIGURE_REQUIRES" => { + "ExtUtils::MakeMaker" => "6.30" + }, + "DISTNAME" => "Test-Moose-More", + "EXE_FILES" => [], + "LICENSE" => "lgpl", + "NAME" => "Test::Moose::More", + "PREREQ_PM" => { + "Data::OptList" => 0, + "Moose::Autobox" => 0, + "Moose::Util" => 0, + "Moose::Util::TypeConstraints" => 0, + "Scalar::Util" => 0, + "Sub::Exporter" => 0, + "Syntax::Keyword::Junction" => 0, + "Test::Builder" => 0, + "Test::Moose" => 0, + "Test::More" => 0, + "strict" => 0, + "warnings" => 0 + }, + "TEST_REQUIRES" => { + "Capture::Tiny" => 0, + "Moose" => 0, + "Moose::Role" => 0, + "TAP::SimpleOutput" => 0, + "Test::Builder::Tester" => 0, + "Test::More" => "0.88", + "blib" => 0, + "namespace::autoclean" => 0 + }, + "VERSION" => "0.020", + "test" => { + "TESTS" => "t/*.t t/attribute/*.t" + } +); + + +unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { + my $tr = delete $WriteMakefileArgs{TEST_REQUIRES}; + my $br = $WriteMakefileArgs{BUILD_REQUIRES}; + for my $mod ( keys %$tr ) { + if ( exists $br->{$mod} ) { + $br->{$mod} = $tr->{$mod} if $tr->{$mod} > $br->{$mod}; + } + else { + $br->{$mod} = $tr->{$mod}; + } + } +} + +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}; + } + } +} + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; + +WriteMakefile(%WriteMakefileArgs); + + + diff --git a/README b/README new file mode 100644 index 0000000..cd259c7 --- /dev/null +++ b/README @@ -0,0 +1,188 @@ +NAME + Test::Moose::More - More tools for testing Moose packages + +VERSION + This document describes version 0.020 of Test::Moose::More - released + August 01, 2013 as part of Test-Moose-More. + +SYNOPSIS + use Test::Moose::More; + + is_class 'Some::Class'; + is_role 'Some::Role'; + has_method_ok 'Some::Class', 'foo'; + + # ... etc + +DESCRIPTION + This package contains a number of additional tests that can be employed + against Moose classes/roles. It is intended to replace Test::Moose in + your tests, and reexports any tests that it has and we do not, yet. + +FUNCTIONS + known_sugar + Returns a list of all the known standard Moose sugar (has, extends, + etc). + +TEST_FUNCTIONS + meta_ok $thing + Tests $thing to see if it has a metaclass; $thing may be the class name + or instance of the class you wish to check. + + does_ok $thing, < $role | \@roles >, [ $message ] + Checks to see if $thing does the given roles. $thing may be the class + name or instance of the class you wish to check. + + Note that the message will be taken verbatim unless it contains %s + somewhere; this will be replaced with the name of the role being tested + for. + + does_not_ok $thing, < $role | \@roles >, [ $message ] + Checks to see if $thing does not do the given roles. $thing may be the + class name or instance of the class you wish to check. + + Note that the message will be taken verbatim unless it contains %s + somewhere; this will be replaced with the name of the role being tested + for. + + has_attribute_ok $thing, $attribute_name, [ $message ] + Checks $thing for an attribute named $attribute_name; $thing may be a + class name, instance, or role name. + + has_method_ok $thing, @methods + Queries $thing's metaclass to see if $thing has the methods named in + @methods. + + requires_method_ok $thing, @methods + Queries $thing's metaclass to see if $thing requires the methods named + in @methods. + + Note that this really only makes sense if $thing is a role. + + is_role $thing + Passes if $thing's metaclass is a Moose::Meta::Role. + + is_class $thing + Passes if $thing's metaclass is a Moose::Meta::Class. + + is_anon $thing + Passes if $thing is "anonymous". + + is_not_anon $thing + Passes if $thing is not "anonymous". + + check_sugar_removed_ok $thing + Ensures that all the standard Moose sugar is no longer directly callable + on a given package. + + check_sugar_ok $thing + Checks and makes sure a class/etc can still do all the standard Moose + sugar. + + validate_thing + Runs a bunch of tests against the given $thing, as defined: + + validate_class $thing => ( + + attributes => [ ... ], + methods => [ ... ], + isa => [ ... ], + + # ensures $thing does these roles + does => [ ... ], + + # ensures $thing does not do these roles + does_not => [ ... ], + ); + + $thing can be the name of a role or class, an object instance, or a + metaclass. + + validate_role + The same as validate_thing(), but ensures $thing is a role, and allows + for additional role-specific tests. + + validate_role $thing => ( + + required_methods => [ ... ], + + # ...and all other options from validate_thing() + + validate_class + The same as validate_thing(), but ensures $thing is a class, and allows + for additional class-specific tests. + + validate_attribute + validate_attribute() allows you to test how an attribute looks once + built and attached to a class. + + Let's say you have an attribute defined like this: + + has foo => ( + traits => [ 'TestRole' ], + is => 'ro', + isa => 'Int', + builder => '_build_foo', + lazy => 1, + ); + + You can use validate_attribute() to ensure that it's built out in the + way you expect: + + validate_attribute TestClass => foo => ( + -does => [ 'TestRole' ], + -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake + traits => [ 'TestRole' ], + isa => 'Int', + does => 'Bar', + handles => { }, + reader => 'foo', + builder => '_build_foo', + default => undef, + init_arg => 'foo', + lazy => 1, + required => undef, + ); + + Not yet documented or tested exhaustively; please see + t/validate_attribute.t for details at the moment. This test routine is + likely to change in implementation and scope, with every effort to + maintain backwards compatibility. + + attribute_options_ok + Validates that an attribute is set up as expected; like + validate_attribute(), but only concerns itself with attribute options. + + Not yet documented or tested exhaustively; please see + t/validate_attribute.t for details at the moment. This test routine is + likely to change in implementation and scope, with every effort to + maintain backwards compatibility. + +SEE ALSO + Please see those modules/websites for more information related to this + module. + + * Test::Moose + +SOURCE + The development version is on github at + and may be cloned from + + +BUGS + Please report any bugs or feature requests on the bugtracker website + https://github.com/RsrchBoy/Test-Moose-More/issues + + When submitting a bug or request, please include a test-file or a patch + to an existing test-file that illustrates the bug or desired feature. + +AUTHOR + Chris Weyl + +COPYRIGHT AND LICENSE + This software is Copyright (c) 2012 by Chris Weyl. + + This is free software, licensed under: + + The GNU Lesser General Public License, Version 2.1, February 1999 + diff --git a/README.mkdn b/README.mkdn deleted file mode 100644 index 7e34ec3..0000000 --- a/README.mkdn +++ /dev/null @@ -1,209 +0,0 @@ -# NAME - -Test::Moose::More - More tools for testing Moose packages - -# VERSION - -This document describes version 0.020 of Test::Moose::More - released August 01, 2013 as part of Test-Moose-More. - -# SYNOPSIS - - use Test::Moose::More; - - is_class 'Some::Class'; - is_role 'Some::Role'; - has_method_ok 'Some::Class', 'foo'; - - # ... etc - -# DESCRIPTION - -This package contains a number of additional tests that can be employed -against Moose classes/roles. It is intended to replace [Test::Moose](http://search.cpan.org/perldoc?Test::Moose) in your -tests, and reexports any tests that it has and we do not, yet. - -# FUNCTIONS - -## known\_sugar - -Returns a list of all the known standard Moose sugar (has, extends, etc). - -# TEST\_FUNCTIONS - -## meta\_ok $thing - -Tests $thing to see if it has a metaclass; $thing may be the class name or -instance of the class you wish to check. - -## does\_ok $thing, < $role | \\@roles >, \[ $message \] - -Checks to see if $thing does the given roles. $thing may be the class name or -instance of the class you wish to check. - -Note that the message will be taken verbatim unless it contains `%s` -somewhere; this will be replaced with the name of the role being tested for. - -## does\_not\_ok $thing, < $role | \\@roles >, \[ $message \] - -Checks to see if $thing does not do the given roles. $thing may be the class -name or instance of the class you wish to check. - -Note that the message will be taken verbatim unless it contains `%s` -somewhere; this will be replaced with the name of the role being tested for. - -## has\_attribute\_ok $thing, $attribute\_name, \[ $message \] - -Checks `$thing` for an attribute named `$attribute_name`; `$thing` may be a -class name, instance, or role name. - -## has\_method\_ok $thing, @methods - -Queries $thing's metaclass to see if $thing has the methods named in @methods. - -## requires\_method\_ok $thing, @methods - -Queries $thing's metaclass to see if $thing requires the methods named in -@methods. - -Note that this really only makes sense if $thing is a role. - -## is\_role $thing - -Passes if $thing's metaclass is a [Moose::Meta::Role](http://search.cpan.org/perldoc?Moose::Meta::Role). - -## is\_class $thing - -Passes if $thing's metaclass is a [Moose::Meta::Class](http://search.cpan.org/perldoc?Moose::Meta::Class). - -## is\_anon $thing - -Passes if $thing is "anonymous". - -## is\_not\_anon $thing - -Passes if $thing is not "anonymous". - -## check\_sugar\_removed\_ok $thing - -Ensures that all the standard Moose sugar is no longer directly callable on a -given package. - -## check\_sugar\_ok $thing - -Checks and makes sure a class/etc can still do all the standard Moose sugar. - -## validate\_thing - -Runs a bunch of tests against the given `$thing`, as defined: - - validate_class $thing => ( - - attributes => [ ... ], - methods => [ ... ], - isa => [ ... ], - - # ensures $thing does these roles - does => [ ... ], - - # ensures $thing does not do these roles - does_not => [ ... ], - ); - -`$thing` can be the name of a role or class, an object instance, or a -metaclass. - -## validate\_role - -The same as validate\_thing(), but ensures `$thing` is a role, and allows for -additional role-specific tests. - - validate_role $thing => ( - - required_methods => [ ... ], - - # ...and all other options from validate_thing() - -## validate\_class - -The same as validate\_thing(), but ensures `$thing` is a class, and allows for -additional class-specific tests. - -## validate\_attribute - -validate\_attribute() allows you to test how an attribute looks once built and -attached to a class. - -Let's say you have an attribute defined like this: - - has foo => ( - traits => [ 'TestRole' ], - is => 'ro', - isa => 'Int', - builder => '_build_foo', - lazy => 1, - ); - -You can use validate\_attribute() to ensure that it's built out in the way you -expect: - - validate_attribute TestClass => foo => ( - -does => [ 'TestRole' ], - -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake - traits => [ 'TestRole' ], - isa => 'Int', - does => 'Bar', - handles => { }, - reader => 'foo', - builder => '_build_foo', - default => undef, - init_arg => 'foo', - lazy => 1, - required => undef, - ); - -Not yet documented or tested exhaustively; please see t/validate\_attribute.t -for details at the moment. This test routine is likely to change in -implementation and scope, with every effort to maintain backwards -compatibility. - -## attribute\_options\_ok - -Validates that an attribute is set up as expected; like validate\_attribute(), -but only concerns itself with attribute options. - -Not yet documented or tested exhaustively; please see t/validate\_attribute.t -for details at the moment. This test routine is likely to change in -implementation and scope, with every effort to maintain backwards -compatibility. - -# SEE ALSO - -Please see those modules/websites for more information related to this module. - -- [Test::Moose](http://search.cpan.org/perldoc?Test::Moose) - -# SOURCE - -The development version is on github at [http://github.com/RsrchBoy/Test-Moose-More](http://github.com/RsrchBoy/Test-Moose-More) -and may be cloned from [git://github.com/RsrchBoy/Test-Moose-More.git](git://github.com/RsrchBoy/Test-Moose-More.git) - -# BUGS - -Please report any bugs or feature requests on the bugtracker website -https://github.com/RsrchBoy/Test-Moose-More/issues - -When submitting a bug or request, please include a test-file or a -patch to an existing test-file that illustrates the bug or desired -feature. - -# AUTHOR - -Chris Weyl - -# COPYRIGHT AND LICENSE - -This software is Copyright (c) 2012 by Chris Weyl. - -This is free software, licensed under: - - The GNU Lesser General Public License, Version 2.1, February 1999 diff --git a/SIGNATURE b/SIGNATURE new file mode 100644 index 0000000..e69de29 diff --git a/cpanfile b/cpanfile new file mode 100644 index 0000000..65e5b4b --- /dev/null +++ b/cpanfile @@ -0,0 +1,35 @@ +requires "Data::OptList" => "0"; +requires "Moose::Autobox" => "0"; +requires "Moose::Util" => "0"; +requires "Moose::Util::TypeConstraints" => "0"; +requires "Scalar::Util" => "0"; +requires "Sub::Exporter" => "0"; +requires "Syntax::Keyword::Junction" => "0"; +requires "Test::Builder" => "0"; +requires "Test::Moose" => "0"; +requires "Test::More" => "0"; +requires "perl" => "5.006"; +requires "strict" => "0"; +requires "warnings" => "0"; + +on 'test' => sub { + requires "Capture::Tiny" => "0"; + requires "Moose" => "0"; + requires "Moose::Role" => "0"; + requires "TAP::SimpleOutput" => "0"; + requires "Test::Builder::Tester" => "0"; + requires "Test::More" => "0.88"; + requires "blib" => "0"; + requires "namespace::autoclean" => "0"; +}; + +on 'configure' => sub { + requires "ExtUtils::MakeMaker" => "6.30"; +}; + +on 'develop' => sub { + requires "Pod::Coverage::TrustPod" => "0"; + requires "Test::Pod" => "1.41"; + requires "Test::Pod::Coverage" => "1.08"; + requires "version" => "0.9901"; +}; diff --git a/lib/Test/Moose/More.pm b/lib/Test/Moose/More.pm index b6952df..6d56458 100644 --- a/lib/Test/Moose/More.pm +++ b/lib/Test/Moose/More.pm @@ -1,4 +1,21 @@ +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# package Test::Moose::More; +BEGIN { + $Test::Moose::More::AUTHORITY = 'cpan:RSRCHBOY'; +} +{ + $Test::Moose::More::VERSION = '0.020'; +} +# git description: 0.019-4-g493b8f1 + # ABSTRACT: More tools for testing Moose packages @@ -57,12 +74,6 @@ sub _thing_name { return $desc; } -=test meta_ok $thing - -Tests $thing to see if it has a metaclass; $thing may be the class name or -instance of the class you wish to check. - -=cut sub meta_ok ($;$) { my ($thing, $message) = @_; @@ -73,15 +84,6 @@ sub meta_ok ($;$) { return $tb->ok(!!$thing_meta, $message); } -=test does_ok $thing, < $role | \@roles >, [ $message ] - -Checks to see if $thing does the given roles. $thing may be the class name or -instance of the class you wish to check. - -Note that the message will be taken verbatim unless it contains C<%s> -somewhere; this will be replaced with the name of the role being tested for. - -=cut sub does_ok { my ($thing, $roles, $message) = @_; @@ -97,15 +99,6 @@ sub does_ok { return; } -=test does_not_ok $thing, < $role | \@roles >, [ $message ] - -Checks to see if $thing does not do the given roles. $thing may be the class -name or instance of the class you wish to check. - -Note that the message will be taken verbatim unless it contains C<%s> -somewhere; this will be replaced with the name of the role being tested for. - -=cut sub does_not_ok { my ($thing, $roles, $message) = @_; @@ -121,12 +114,6 @@ sub does_not_ok { return; } -=test has_attribute_ok $thing, $attribute_name, [ $message ] - -Checks C<$thing> for an attribute named C<$attribute_name>; C<$thing> may be a -class name, instance, or role name. - -=cut sub has_attribute_ok ($$;$) { my ($thing, $attr_name, $message) = @_; @@ -144,11 +131,6 @@ sub has_attribute_ok ($$;$) { return $tb->ok(0, $message); } -=test has_method_ok $thing, @methods - -Queries $thing's metaclass to see if $thing has the methods named in @methods. - -=cut sub has_method_ok { my ($thing, @methods) = @_; @@ -164,14 +146,6 @@ sub has_method_ok { return; } -=test requires_method_ok $thing, @methods - -Queries $thing's metaclass to see if $thing requires the methods named in -@methods. - -Note that this really only makes sense if $thing is a role. - -=cut sub requires_method_ok { my ($thing, @methods) = @_; @@ -187,15 +161,6 @@ sub requires_method_ok { return; } -=test is_role $thing - -Passes if $thing's metaclass is a L. - -=test is_class $thing - -Passes if $thing's metaclass is a L. - -=cut sub is_role { unshift @_, 'Role'; goto \&_is_moosey } sub is_class { unshift @_, 'Class'; goto \&_is_moosey } @@ -212,15 +177,6 @@ sub _is_moosey { return $tb->ok($meta->isa("Moose::Meta::$type"), "$thing_name is a Moose " . lc $type); } -=test is_anon $thing - -Passes if $thing is "anonymous". - -=test is_not_anon $thing - -Passes if $thing is not "anonymous". - -=cut sub is_anon { my ($thing, $message) = @_; @@ -240,16 +196,6 @@ sub is_not_anon { return $tb->ok(!$thing_meta->is_anon, $message); } -=test check_sugar_removed_ok $thing - -Ensures that all the standard Moose sugar is no longer directly callable on a -given package. - -=func known_sugar - -Returns a list of all the known standard Moose sugar (has, extends, etc). - -=cut sub known_sugar { qw{ has around augment inner before after blessed confess } } @@ -262,11 +208,6 @@ sub check_sugar_removed_ok { return; } -=test check_sugar_ok $thing - -Checks and makes sure a class/etc can still do all the standard Moose sugar. - -=cut sub check_sugar_ok { my $t = shift @_; @@ -278,43 +219,6 @@ sub check_sugar_ok { } -=test validate_thing - -Runs a bunch of tests against the given C<$thing>, as defined: - - validate_class $thing => ( - - attributes => [ ... ], - methods => [ ... ], - isa => [ ... ], - - # ensures $thing does these roles - does => [ ... ], - - # ensures $thing does not do these roles - does_not => [ ... ], - ); - -C<$thing> can be the name of a role or class, an object instance, or a -metaclass. - -=test validate_role - -The same as validate_thing(), but ensures C<$thing> is a role, and allows for -additional role-specific tests. - - validate_role $thing => ( - - required_methods => [ ... ], - - # ...and all other options from validate_thing() - -=test validate_class - -The same as validate_thing(), but ensures C<$thing> is a class, and allows for -additional class-specific tests. - -=cut sub validate_thing { my ($thing, %args) = @_; @@ -384,56 +288,6 @@ sub validate_role { } -=test validate_attribute - -validate_attribute() allows you to test how an attribute looks once built and -attached to a class. - -Let's say you have an attribute defined like this: - - has foo => ( - traits => [ 'TestRole' ], - is => 'ro', - isa => 'Int', - builder => '_build_foo', - lazy => 1, - ); - -You can use validate_attribute() to ensure that it's built out in the way you -expect: - - validate_attribute TestClass => foo => ( - -does => [ 'TestRole' ], - -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake - traits => [ 'TestRole' ], - isa => 'Int', - does => 'Bar', - handles => { }, - reader => 'foo', - builder => '_build_foo', - default => undef, - init_arg => 'foo', - lazy => 1, - required => undef, - ); - - -Not yet documented or tested exhaustively; please see t/validate_attribute.t -for details at the moment. This test routine is likely to change in -implementation and scope, with every effort to maintain backwards -compatibility. - -=test attribute_options_ok - -Validates that an attribute is set up as expected; like validate_attribute(), -but only concerns itself with attribute options. - -Not yet documented or tested exhaustively; please see t/validate_attribute.t -for details at the moment. This test routine is likely to change in -implementation and scope, with every effort to maintain backwards -compatibility. - -=cut sub validate_attribute { my ($thing, $name, %opts) = @_; @@ -563,6 +417,20 @@ sub _attribute_options_ok { __END__ +=pod + +=encoding utf-8 + +=for :stopwords Chris Weyl + +=head1 NAME + +Test::Moose::More - More tools for testing Moose packages + +=head1 VERSION + +This document describes version 0.020 of Test::Moose::More - released August 01, 2013 as part of Test-Moose-More. + =head1 SYNOPSIS use Test::Moose::More; @@ -579,8 +447,196 @@ This package contains a number of additional tests that can be employed against Moose classes/roles. It is intended to replace L in your tests, and reexports any tests that it has and we do not, yet. +=head1 FUNCTIONS + +=head2 known_sugar + +Returns a list of all the known standard Moose sugar (has, extends, etc). + +=head1 TEST_FUNCTIONS + +=head2 meta_ok $thing + +Tests $thing to see if it has a metaclass; $thing may be the class name or +instance of the class you wish to check. + +=head2 does_ok $thing, < $role | \@roles >, [ $message ] + +Checks to see if $thing does the given roles. $thing may be the class name or +instance of the class you wish to check. + +Note that the message will be taken verbatim unless it contains C<%s> +somewhere; this will be replaced with the name of the role being tested for. + +=head2 does_not_ok $thing, < $role | \@roles >, [ $message ] + +Checks to see if $thing does not do the given roles. $thing may be the class +name or instance of the class you wish to check. + +Note that the message will be taken verbatim unless it contains C<%s> +somewhere; this will be replaced with the name of the role being tested for. + +=head2 has_attribute_ok $thing, $attribute_name, [ $message ] + +Checks C<$thing> for an attribute named C<$attribute_name>; C<$thing> may be a +class name, instance, or role name. + +=head2 has_method_ok $thing, @methods + +Queries $thing's metaclass to see if $thing has the methods named in @methods. + +=head2 requires_method_ok $thing, @methods + +Queries $thing's metaclass to see if $thing requires the methods named in +@methods. + +Note that this really only makes sense if $thing is a role. + +=head2 is_role $thing + +Passes if $thing's metaclass is a L. + +=head2 is_class $thing + +Passes if $thing's metaclass is a L. + +=head2 is_anon $thing + +Passes if $thing is "anonymous". + +=head2 is_not_anon $thing + +Passes if $thing is not "anonymous". + +=head2 check_sugar_removed_ok $thing + +Ensures that all the standard Moose sugar is no longer directly callable on a +given package. + +=head2 check_sugar_ok $thing + +Checks and makes sure a class/etc can still do all the standard Moose sugar. + +=head2 validate_thing + +Runs a bunch of tests against the given C<$thing>, as defined: + + validate_class $thing => ( + + attributes => [ ... ], + methods => [ ... ], + isa => [ ... ], + + # ensures $thing does these roles + does => [ ... ], + + # ensures $thing does not do these roles + does_not => [ ... ], + ); + +C<$thing> can be the name of a role or class, an object instance, or a +metaclass. + +=head2 validate_role + +The same as validate_thing(), but ensures C<$thing> is a role, and allows for +additional role-specific tests. + + validate_role $thing => ( + + required_methods => [ ... ], + + # ...and all other options from validate_thing() + +=head2 validate_class + +The same as validate_thing(), but ensures C<$thing> is a class, and allows for +additional class-specific tests. + +=head2 validate_attribute + +validate_attribute() allows you to test how an attribute looks once built and +attached to a class. + +Let's say you have an attribute defined like this: + + has foo => ( + traits => [ 'TestRole' ], + is => 'ro', + isa => 'Int', + builder => '_build_foo', + lazy => 1, + ); + +You can use validate_attribute() to ensure that it's built out in the way you +expect: + + validate_attribute TestClass => foo => ( + -does => [ 'TestRole' ], + -isa => [ 'Moose::Meta::Attribute' ], # for demonstration's sake + traits => [ 'TestRole' ], + isa => 'Int', + does => 'Bar', + handles => { }, + reader => 'foo', + builder => '_build_foo', + default => undef, + init_arg => 'foo', + lazy => 1, + required => undef, + ); + +Not yet documented or tested exhaustively; please see t/validate_attribute.t +for details at the moment. This test routine is likely to change in +implementation and scope, with every effort to maintain backwards +compatibility. + +=head2 attribute_options_ok + +Validates that an attribute is set up as expected; like validate_attribute(), +but only concerns itself with attribute options. + +Not yet documented or tested exhaustively; please see t/validate_attribute.t +for details at the moment. This test routine is likely to change in +implementation and scope, with every effort to maintain backwards +compatibility. + =head1 SEE ALSO +Please see those modules/websites for more information related to this module. + +=over 4 + +=item * + L +=back + +=head1 SOURCE + +The development version is on github at L +and may be cloned from L + +=head1 BUGS + +Please report any bugs or feature requests on the bugtracker website +https://github.com/RsrchBoy/Test-Moose-More/issues + +When submitting a bug or request, please include a test-file or a +patch to an existing test-file that illustrates the bug or desired +feature. + +=head1 AUTHOR + +Chris Weyl + +=head1 COPYRIGHT AND LICENSE + +This software is Copyright (c) 2012 by Chris Weyl. + +This is free software, licensed under: + + The GNU Lesser General Public License, Version 2.1, February 1999 + =cut diff --git a/sandbox.mysql.tar.gz b/sandbox.mysql.tar.gz new file mode 100644 index 0000000..e69de29 diff --git a/t/00-compile.t b/t/00-compile.t new file mode 100644 index 0000000..1164293 --- /dev/null +++ b/t/00-compile.t @@ -0,0 +1,39 @@ +use strict; +use warnings; + +# This test was generated via Dist::Zilla::Plugin::Test::Compile 2.013 + +use Test::More 0.88; + + + +use Capture::Tiny qw{ capture }; + +my @module_files = qw( +Test/Moose/More.pm +); + +my @scripts = qw( + +); + +# no fake home requested + +my @warnings; +for my $lib (@module_files) +{ + my ($stdout, $stderr, $exit) = capture { + system($^X, '-Mblib', '-e', qq{require qq[$lib]}); + }; + is($?, 0, "$lib loaded ok"); + warn $stderr if $stderr; + push @warnings, $stderr if $stderr; +} + +is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING}; + + + + + +done_testing; diff --git a/t/000-report-versions-tiny.t b/t/000-report-versions-tiny.t new file mode 100644 index 0000000..5eff759 --- /dev/null +++ b/t/000-report-versions-tiny.t @@ -0,0 +1,94 @@ +use strict; +use warnings; +use Test::More 0.88; +# This is a relatively nice way to avoid Test::NoWarnings breaking our +# expectations by adding extra tests, without using no_plan. It also helps +# avoid any other test module that feels introducing random tests, or even +# test plans, is a nice idea. +our $success = 0; +END { $success && done_testing; } + +# List our own version used to generate this +my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.09\n"; + +eval { # no excuses! + # report our Perl details + my $want = '5.006'; + $v .= "perl: $] (wanted $want) on $^O from $^X\n\n"; +}; +defined($@) and diag("$@"); + +# Now, our module version dependencies: +sub pmver { + my ($module, $wanted) = @_; + $wanted = " (want $wanted)"; + my $pmver; + eval "require $module;"; + if ($@) { + if ($@ =~ m/Can't locate .* in \@INC/) { + $pmver = 'module not found.'; + } else { + diag("${module}: $@"); + $pmver = 'died during require.'; + } + } else { + my $version; + eval { $version = $module->VERSION; }; + if ($@) { + diag("${module}: $@"); + $pmver = 'died during VERSION check.'; + } elsif (defined $version) { + $pmver = "$version"; + } else { + $pmver = ''; + } + } + + # So, we should be good, right? + return sprintf('%-45s => %-10s%-15s%s', $module, $pmver, $wanted, "\n"); +} + +eval { $v .= pmver('Capture::Tiny','any version') }; +eval { $v .= pmver('Class::MOP','any version') }; +eval { $v .= pmver('Data::OptList','any version') }; +eval { $v .= pmver('ExtUtils::MakeMaker','6.30') }; +eval { $v .= pmver('Moose','any version') }; +eval { $v .= pmver('Moose::Autobox','any version') }; +eval { $v .= pmver('Moose::Role','any version') }; +eval { $v .= pmver('Moose::Util','any version') }; +eval { $v .= pmver('Moose::Util::TypeConstraints','any version') }; +eval { $v .= pmver('Pod::Coverage::TrustPod','any version') }; +eval { $v .= pmver('Scalar::Util','any version') }; +eval { $v .= pmver('Sub::Exporter','any version') }; +eval { $v .= pmver('Syntax::Keyword::Junction','any version') }; +eval { $v .= pmver('TAP::SimpleOutput','any version') }; +eval { $v .= pmver('Test::Builder','any version') }; +eval { $v .= pmver('Test::Builder::Tester','any version') }; +eval { $v .= pmver('Test::Moose','any version') }; +eval { $v .= pmver('Test::More','0.88') }; +eval { $v .= pmver('Test::Pod','1.41') }; +eval { $v .= pmver('Test::Pod::Coverage','1.08') }; +eval { $v .= pmver('blib','any version') }; +eval { $v .= pmver('namespace::autoclean','any version') }; +eval { $v .= pmver('strict','any version') }; +eval { $v .= pmver('version','0.9901') }; +eval { $v .= pmver('warnings','any version') }; + + +# All done. +$v .= <<'EOT'; + +Thanks for using my code. I hope it works for you. +If not, please try and include this output in the bug report. +That will help me reproduce the issue and solve your problem. + +EOT + +diag($v); +ok(1, "we really didn't test anything, just reporting data"); +$success = 1; + +# Work around another nasty module on CPAN. :/ +no warnings 'once'; +$Template::Test::NO_FLUSH = 1; +exit 0; diff --git a/t/author-pod-spell.t b/t/author-pod-spell.t new file mode 100644 index 0000000..2836f51 --- /dev/null +++ b/t/author-pod-spell.t @@ -0,0 +1,38 @@ + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for testing by the author'); + } +} + +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006000 +eval "use Test::Spelling 0.12; use Pod::Wordlist::hanekomu; 1" or die $@; + + +add_stopwords(); +all_pod_files_spelling_ok( qw( bin lib ) ); +__DATA__ +AFAICT +ABEND +RSRCHBOY +RSRCHBOY's +gpg +ini +metaclass +metaclasses +parameterized +parameterization +subclasses +coderef +Chris +Weyl +cweyl +lib +Test +Moose +More diff --git a/t/release-consistent-version.t b/t/release-consistent-version.t new file mode 100644 index 0000000..b37f692 --- /dev/null +++ b/t/release-consistent-version.t @@ -0,0 +1,18 @@ + +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; + +eval "use Test::ConsistentVersion"; +plan skip_all => "Test::ConsistentVersion required for this test" + if $@; + +Test::ConsistentVersion::check_consistent_versions(); diff --git a/t/release-eol.t b/t/release-eol.t new file mode 100644 index 0000000..4ce4ad8 --- /dev/null +++ b/t/release-eol.t @@ -0,0 +1,16 @@ + +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; + +eval 'use Test::EOL'; +plan skip_all => 'Test::EOL required' if $@; + +all_perl_files_ok({ trailing_whitespace => 1 }); diff --git a/t/release-has-version.t b/t/release-has-version.t new file mode 100644 index 0000000..6a904dd --- /dev/null +++ b/t/release-has-version.t @@ -0,0 +1,25 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# + +use Test::More; + +eval "use Test::HasVersion"; +plan skip_all => "Test::HasVersion required for testing version numbers" + if $@; +all_pm_version_ok(); diff --git a/t/release-minimum-version.t b/t/release-minimum-version.t new file mode 100644 index 0000000..bdaa914 --- /dev/null +++ b/t/release-minimum-version.t @@ -0,0 +1,25 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# + +use Test::More; + +eval "use Test::MinimumVersion"; +plan skip_all => "Test::MinimumVersion required for testing minimum versions" + if $@; +all_minimum_version_ok( qq{5.008008} ); diff --git a/t/release-no-smart-comments.t b/t/release-no-smart-comments.t new file mode 100644 index 0000000..79b9af2 --- /dev/null +++ b/t/release-no-smart-comments.t @@ -0,0 +1,31 @@ +#!/usr/bin/env perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# + +use strict; +use warnings; + +use Test::More 0.88; + +eval "use Test::NoSmartComments"; +plan skip_all => 'Test::NoSmartComments required for checking comment IQ' + if $@; + +no_smart_comments_in_all(); + +done_testing(); diff --git a/t/release-no-tabs.t b/t/release-no-tabs.t new file mode 100644 index 0000000..1c7204e --- /dev/null +++ b/t/release-no-tabs.t @@ -0,0 +1,16 @@ + +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; + +eval 'use Test::NoTabs'; +plan skip_all => 'Test::NoTabs required' if $@; + +all_perl_files_ok(); diff --git a/t/release-pod-coverage.t b/t/release-pod-coverage.t new file mode 100644 index 0000000..0fb8cca --- /dev/null +++ b/t/release-pod-coverage.t @@ -0,0 +1,30 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# + +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 $@; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff --git a/t/release-pod-linkcheck.t b/t/release-pod-linkcheck.t new file mode 100644 index 0000000..2877588 --- /dev/null +++ b/t/release-pod-linkcheck.t @@ -0,0 +1,37 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# + +use strict; +use warnings; +use Test::More; + +foreach my $env_skip ( qw( + SKIP_POD_LINKCHECK +) ){ + plan skip_all => "\$ENV{$env_skip} is set, skipping" + if $ENV{$env_skip}; +} + +eval "use Test::Pod::LinkCheck"; +if ( $@ ) { + plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; +} +else { + Test::Pod::LinkCheck->new->all_pod_ok; +} diff --git a/t/release-pod-syntax.t b/t/release-pod-syntax.t new file mode 100644 index 0000000..de88c2c --- /dev/null +++ b/t/release-pod-syntax.t @@ -0,0 +1,24 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# +# This file is part of Test-Moose-More +# +# This software is Copyright (c) 2012 by Chris Weyl. +# +# This is free software, licensed under: +# +# The GNU Lesser General Public License, Version 2.1, February 1999 +# +use Test::More; + +eval "use Test::Pod 1.41"; +plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; + +all_pod_files_ok();