App-CISetup

 view release on metacpan or  search on metacpan

lib/App/CISetup/AppVeyor/ConfigFile.pm  view on Meta::CPAN

package App::CISetup::AppVeyor::ConfigFile;

use strict;
use warnings;
use namespace::autoclean;
use autodie qw( :all );

our $VERSION = '0.19';

use App::CISetup::Types qw( Str );

use Moose;

has email_address => (
    is        => 'ro',
    isa       => Str,                   # todo, better type
    predicate => 'has_email_address',
);

has slack_channel => (
    is        => 'ro',
    isa       => Str,
    predicate => 'has_slack_channel',
);

has encrypted_slack_key => (
    is        => 'ro',
    isa       => Str,
    predicate => 'has_encrypted_slack_key',
);

with 'App::CISetup::Role::ConfigFile';

## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
sub _create_config {
    my $self = shift;

    return $self->_update_config(
        {
            skip_tags => 'true',
            cache     => ['C:\strawberry'],
            install   => [
                'if not exist "C:\strawberry" cinst strawberryperl -y',
                'set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%',
                'cd %APPVEYOR_BUILD_FOLDER%',
                'cpanm --installdeps . -n',
            ],
            build_script => ['perl -e 1'],
            test_script  => ['prove -lrvm t/'],
        }
    );
}

sub _update_config {
    my $self     = shift;
    my $appveyor = shift;

    $self->_update_notifications($appveyor);

    return $appveyor;
}
## use critic

sub _update_notifications {
    my $self     = shift;



( run in 1.776 second using v1.01-cache-2.11-cpan-39bf76dae61 )