App-CISetup
view release on metacpan or search on metacpan
lib/App/CISetup/Travis/ConfigFile.pm view on Meta::CPAN
package App::CISetup::Travis::ConfigFile;
use strict;
use warnings;
use namespace::autoclean;
use autodie qw( :all );
our $VERSION = '0.19';
use App::CISetup::Types qw( Bool File Str );
use File::pushd;
use File::Which qw( which );
use IPC::Run3 qw( run3 );
use List::AllUtils qw( first first_index uniq );
use Path::Iterator::Rule;
use Try::Tiny;
use YAML qw( Dump );
use Moose;
use MooseX::StrictConstructor;
has email_address => (
is => 'ro',
isa => Str, # todo, better type
predicate => 'has_email_address',
);
has force_threaded_perls => (
is => 'ro',
isa => Bool,
default => 0,
);
has perl_caching => (
is => 'ro',
isa => Bool,
default => 1,
);
has github_user => (
is => 'ro',
isa => Str,
predicate => 'has_github_user',
);
has slack_key => (
is => 'ro',
isa => Str,
predicate => 'has_slack_key',
);
with 'App::CISetup::Role::ConfigFile';
## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
sub _create_config {
my $self = shift;
return $self->_update_config( { language => 'perl' }, 1 );
}
sub _update_config {
my $self = shift;
my $travis = shift;
my $create = shift;
$self->_maybe_update_travis_perl_usage( $travis, $create );
$self->_maybe_remove_sudo($travis);
$self->_update_packages($travis);
$self->_update_coverity_email($travis);
$self->_update_notifications($travis);
return $travis;
}
## use critic
sub _maybe_update_travis_perl_usage {
( run in 0.478 second using v1.01-cache-2.11-cpan-39bf76dae61 )