Dist-Zilla-BeLike-CSJEWELL

changeset 26:42929a9476c6

Adding module that renames _hgignore to .hgignore.

This is because we don't pack dotfiles in a .tar.gz by default.
author Curtis Jewell <csjewell@cpan.org>
date Fri Aug 13 13:50:01 2010 -0600 (2010-08-13)
parents 82d69b1bba3e
children 333f2054f825
files lib/Dist/Zilla/Plugin/CSJEWELL/DotFileFix.pm share/csjewell/profile.ini share/csjewell/skel/.hgignore share/csjewell/skel/_hgignore
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lib/Dist/Zilla/Plugin/CSJEWELL/DotFileFix.pm	Fri Aug 13 13:50:01 2010 -0600
     1.3 @@ -0,0 +1,89 @@
     1.4 +package Dist::Zilla::Plugin::CSJEWELL::DotFileFix;
     1.5 +
     1.6 +use 5.008003;
     1.7 +use Moose;
     1.8 +with 'Dist::Zilla::Role::AfterMint';
     1.9 +
    1.10 +our $VERSION = '0.900';
    1.11 +$VERSION =~ s/_//sm;
    1.12 +
    1.13 +
    1.14 +sub after_mint {
    1.15 +	my ( $self, $hash ) = @_;
    1.16 +
    1.17 +	my $root = $hash->{mint_root};
    1.18 +
    1.19 +	rename $root->file('_hgignore')->stringify(),
    1.20 +	  $root->file('.hgignore')->stringify()
    1.21 +	  or $self->log('Could not rename _hgignore to .hgignore');
    1.22 +
    1.23 +	return 1;
    1.24 +}
    1.25 +
    1.26 +__PACKAGE__->meta()->make_immutable();
    1.27 +no Moose;
    1.28 +1;
    1.29 +
    1.30 +__END__
    1.31 +
    1.32 +=pod
    1.33 +
    1.34 +=head1 NAME
    1.35 +
    1.36 +Dist::Zilla::Plugin::CSJEWELL::DotFileFix - Fix the .hgignore file.
    1.37 +
    1.38 +=head1 VERSION
    1.39 +
    1.40 +This document describes Dist::Zilla::Plugin::CSJEWELL::DotFileFix version 0.900.
    1.41 +
    1.42 +=head1 DESCRIPTION
    1.43 +
    1.44 +This plugin renames the _hgignore file in the source to .hgignore.
    1.45 +
    1.46 +=for Pod::Coverage after_mint
    1.47 +
    1.48 +=head1 AUTHOR
    1.49 +
    1.50 +Curtis Jewell <CSJewell@cpan.org>
    1.51 +
    1.52 +=head1 SEE ALSO
    1.53 +
    1.54 +L<Dist::Zilla::BeLike::CSJEWELL|Dist::Zilla::BeLike::CSJEWELL>
    1.55 +
    1.56 +=head1 LICENSE AND COPYRIGHT
    1.57 +
    1.58 +Copyright (c) 2010, Curtis Jewell C<< CSJewell@cpan.org >>.
    1.59 +
    1.60 +This module is free software; you can redistribute it and/or
    1.61 +modify it under the same terms as Perl itself, either version
    1.62 +5.8.1 or any later version. See L<perlartistic|perlartistic> 
    1.63 +and L<perlgpl|perlgpl>.
    1.64 +
    1.65 +The full text of the license can be found in the
    1.66 +LICENSE file included with this module.
    1.67 +
    1.68 +=head1 DISCLAIMER OF WARRANTY
    1.69 +
    1.70 +BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
    1.71 +FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
    1.72 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
    1.73 +PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
    1.74 +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    1.75 +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
    1.76 +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
    1.77 +YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
    1.78 +NECESSARY SERVICING, REPAIR, OR CORRECTION.
    1.79 +
    1.80 +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
    1.81 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
    1.82 +REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
    1.83 +LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
    1.84 +OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
    1.85 +THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
    1.86 +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
    1.87 +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
    1.88 +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
    1.89 +SUCH DAMAGES.
    1.90 +
    1.91 +=cut
    1.92 +
     2.1 --- a/share/csjewell/profile.ini	Fri Aug 13 12:47:26 2010 -0600
     2.2 +++ b/share/csjewell/profile.ini	Fri Aug 13 13:50:01 2010 -0600
     2.3 @@ -4,3 +4,5 @@
     2.4  [GatherDir::Template]
     2.5  root = skel
     2.6  include_dotfiles = 1
     2.7 +
     2.8 +[CSJEWELL::DotFileFix]
     3.1 --- a/share/csjewell/skel/.hgignore	Fri Aug 13 12:47:26 2010 -0600
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,14 +0,0 @@
     3.4 -{{$dist->name}}*
     3.5 -blib
     3.6 -.build
     3.7 -_build
     3.8 -Build.bat
     3.9 -glob:Build
    3.10 -LICENSE
    3.11 -README
    3.12 -glob:MANIFEST
    3.13 -Makefile.PL
    3.14 -META.yml
    3.15 -MYMETA.yml
    3.16 -glob:*.bak
    3.17 -
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/share/csjewell/skel/_hgignore	Fri Aug 13 13:50:01 2010 -0600
     4.3 @@ -0,0 +1,14 @@
     4.4 +{{$dist->name}}*
     4.5 +blib
     4.6 +.build
     4.7 +_build
     4.8 +Build.bat
     4.9 +glob:Build
    4.10 +LICENSE
    4.11 +README
    4.12 +glob:MANIFEST
    4.13 +Makefile.PL
    4.14 +META.yml
    4.15 +MYMETA.yml
    4.16 +glob:*.bak
    4.17 +