Coder Social home page Coder Social logo

test-checkmanifest's Introduction

Build Status Kwalitee status GitHub issues

NAME

Test::CheckManifest - Check if your Manifest matches your distro

VERSION

version 1.39

SYNOPSIS

use Test::CheckManifest;
ok_manifest();

EXPORT

There is only one method exported: ok_manifest

METHODS

ok_manifest [{exclude => $arref}][$msg]

checks whether the Manifest file matches the distro or not. To match a distro the Manifest has to name all files that come along with the distribution.

To check the Manifest file, this module searches for a file named MANIFEST.

To exclude some directories from this test, you can specify these dirs in the hashref.

ok_manifest({exclude => ['/var/test/']});

is ok if the files in /path/to/your/dist/var/test/ are not named in the MANIFEST file. That means that the paths in the exclude array must be "pseudo-absolute" (absolute to your distribution).

To use a "filter" you can use the key "filter"

ok_manifest({filter => [qr/\.svn/]});

With that you can exclude all files with an '.svn' in the filename or in the path from the test.

These files would be excluded (as examples):

  • /dist/var/.svn/test
  • /dist/lib/test.svn

You can also combine "filter" and "exclude" with 'and' or 'or' default is 'or':

ok_manifest({exclude => ['/var/test'], 
             filter  => [qr/\.svn/], 
             bool    => 'and'});

These files have to be named in the MANIFEST:

  • /var/foo/.svn/any.file
  • /dist/t/file.svn
  • /var/test/test.txt

These files not:

  • /var/test/.svn/*
  • /var/test/file.svn

By default, ok_manifest will look for the file MANIFEST in the current working directory (which is how tests are traditionally run). If you wish to specify a different directory, you may pass the file or dir parameters, for example:

ok_manifest({dir => '/path/to/my/dist/'});

EXCLUDING FILES

Beside filter and exclude there is another way to exclude files: MANIFEST.SKIP. This is a file with filenames that should be excluded:

t/my_very_own.t
file_to.skip

ACKNOWLEDGEMENT

Great thanks to Christopher H. Laco, who did a lot of testing stuff for me and he reported some bugs to RT.

Development

The distribution is contained in a Git repository, so simply clone the repository

$ git clone http://github.com/reneeb/Test-CheckManifest.git

and change into the newly-created directory.

$ cd Test-CheckManifest

The project uses Dist::Zilla to build the distribution, hence this will need to be installed before continuing:

$ cpanm Dist::Zilla

To install the required prequisite packages, run the following set of commands:

$ dzil authordeps --missing | cpanm
$ dzil listdeps --author --missing | cpanm

The distribution can be tested like so:

$ dzil test

To run the full set of tests (including author and release-process tests), add the --author and --release options:

$ dzil test --author --release

AUTHOR

Renee Baecker [email protected]

COPYRIGHT AND LICENSE

This software is Copyright (c) 2018 by Renee Baecker.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

test-checkmanifest's People

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.