NAME
Git::Reduce::Tests - Create a branch with fewer test files for faster development
SYNOPSIS
use Git::Reduce::Tests;
my $self = Git::Reduce::Tests->new($params);
my $reduced_branch = $self->prepare_reduced_branch();
$self->push_to_remote($reduced_branch);
DESCRIPTION
Git::Reduce::Tests holds the implementation for command-line utility reduce-tests, which is stored in this distribution's scripts/ directory. See that program's documentation (available after installation via perldoc reduce-tests
) or the README for an explanation of that program's functionality.
This package exports no functions.
METHODS
Git::Reduce::Tests is currently structured as three publicly available methods intended to be called in sequence.
new()
Purpose
Git::Reduce::Tests constructor. Checks that the directory passed to the
--dir
option is a git repository and that there are no files there with a modified status.Arguments
$self = Git::Reduce::Tests->new($params);
Reference to a hash of parameters, typically that provided by
Git::Reduce::Tests::Opts::process_options()
. See that package's documentation for a description of those parameters.Return Value
Git::Reduce::Tests object.
prepare_reduced_branch()
Purpose
Creates a new branch whose name is that of the starting branch either (a) prepended with the value of the
--prefix
option or (b) appended with the value of the--suffix
option -- but not both (a) and (b).--prefix
is given preference and defaults toreduced_
.The method then reduces the size of that branch's test suite either by specifying a limited number of files to be included in the test suite -- the comma-delimited argument to the
--include
option -- or by specifying those files to be excluded from the test suite -- the comma-delimited argument to the--exclude
option.Arguments
$reduced_branch = $self->prepare_reduced_branch();
None.
Return Value
String containing the name of the new branch with smaller test suite.
push_to_remote()
Purpose
Push the reduced branch to the remote specified in the
--remote
option, which defaults toorigin
. This, of course, assumes that the user has permission to perform that action, has proper credentials such as SSH keys, etc.Arguments
$self->push_to_remote($reduced_branch);
String holding name of branch with reduced test suite -- typically the return value of the
prepare_reduced_branch()
method.Return Value
Implicitly returns a true value upon success.
BUGS
There are no bug reports outstanding as of the most recent CPAN upload date of this distribution.
SUPPORT
Please report any bugs by mail to bug-Git-Reduce-Tests@rt.cpan.org
or through the web interface at http://rt.cpan.org.
AUTHOR
James E. Keenan (jkeenan@cpan.org). When sending correspondence, please include 'reduce-tests' or 'Git-Reduce-Tests' in your subject line.
Creation date: August 03 2014. Last modification date: August 04 2014.
Development repository: https://github.com/jkeenan/git-reduce-tests
COPYRIGHT
Copyright (c) 2014 James E. Keenan. United States. All rights reserved. This is free software and may be distributed under the same terms as Perl itself.
DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE ''AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.