line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::ReleaseTest; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
11
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
469
|
use Data::Section::Simple qw(get_data_section); |
|
1
|
|
|
|
|
605
|
|
|
1
|
|
|
|
|
56
|
|
6
|
1
|
|
|
1
|
|
8
|
use File::pushd; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
7
|
1
|
|
|
1
|
|
6
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
8
|
1
|
|
|
1
|
|
6
|
use File::Path qw(mkpath); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use Minilla::Logger; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
60
|
|
11
|
1
|
|
|
1
|
|
8
|
use Minilla::Util qw(spew); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
537
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub write_release_tests { |
14
|
0
|
|
|
0
|
0
|
|
my ($class, $project, $dir) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
mkpath(catfile($dir, 'xt', 'minilla')); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my $stopwords = do { |
19
|
|
|
|
|
|
|
my $append_people_into_stopwords = sub { |
20
|
0
|
|
|
0
|
|
|
my $people = shift; |
21
|
0
|
|
|
|
|
|
my @stopwords; |
22
|
0
|
0
|
|
|
|
|
for (@{$people || +[]}) { |
|
0
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
s!<.*!!; # trim e-mail address |
24
|
0
|
|
|
|
|
|
push @stopwords, split(/\s+/, $_); |
25
|
|
|
|
|
|
|
} |
26
|
0
|
|
|
|
|
|
return @stopwords; |
27
|
0
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my @stopwords; |
30
|
0
|
|
|
|
|
|
push @stopwords, $append_people_into_stopwords->($project->contributors); |
31
|
0
|
|
|
|
|
|
push @stopwords, $append_people_into_stopwords->($project->authors); |
32
|
0
|
|
|
|
|
|
local $Data::Dumper::Terse = 1; |
33
|
0
|
|
|
|
|
|
local $Data::Dumper::Useqq = 1; |
34
|
0
|
|
|
|
|
|
local $Data::Dumper::Purity = 1; |
35
|
0
|
|
|
|
|
|
local $Data::Dumper::Indent = 0; |
36
|
0
|
|
|
|
|
|
Data::Dumper::Dumper([map { split /\s+/, $_ } @stopwords]); |
|
0
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $config = $project->config->{ReleaseTest}; |
40
|
0
|
|
|
|
|
|
my $name = $project->dist_name; |
41
|
0
|
|
|
|
|
|
for my $file (qw( |
42
|
|
|
|
|
|
|
xt/minilla/minimum_version.t |
43
|
|
|
|
|
|
|
xt/minilla/cpan_meta.t |
44
|
|
|
|
|
|
|
xt/minilla/pod.t |
45
|
|
|
|
|
|
|
xt/minilla/spelling.t |
46
|
|
|
|
|
|
|
xt/minilla/permissions.t |
47
|
|
|
|
|
|
|
)) { |
48
|
0
|
|
|
|
|
|
infof("Writing release tests: %s\n", $file); |
49
|
|
|
|
|
|
|
|
50
|
0
|
0
|
0
|
|
|
|
if ($file eq 'xt/minilla/minimum_version.t' && ($config->{MinimumVersion}||'') eq 'false') { |
|
|
|
0
|
|
|
|
|
51
|
0
|
|
|
|
|
|
infof("Skipping MinimumVersion"); |
52
|
0
|
|
|
|
|
|
next; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $content = get_data_section($file); |
56
|
0
|
|
|
|
|
|
$content =~s!<>!$name!g; |
57
|
0
|
|
|
|
|
|
$content =~s!<>!$stopwords!g; |
58
|
0
|
|
|
|
|
|
spew(catfile($dir, $file), $content); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub prereqs { |
63
|
|
|
|
|
|
|
+{ |
64
|
0
|
|
|
0
|
0
|
|
develop => { |
65
|
|
|
|
|
|
|
requires => { |
66
|
|
|
|
|
|
|
'Test::MinimumVersion::Fast' => 0.04, |
67
|
|
|
|
|
|
|
'Test::CPAN::Meta' => 0, |
68
|
|
|
|
|
|
|
'Test::Pod' => 1.41, |
69
|
|
|
|
|
|
|
'Test::Spellunker' => 'v0.2.7', |
70
|
|
|
|
|
|
|
'Test::PAUSE::Permissions' => 0.07, |
71
|
|
|
|
|
|
|
}, |
72
|
|
|
|
|
|
|
}, |
73
|
|
|
|
|
|
|
}; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
__DATA__ |