blib/lib/CPAN/Testers/Schema/Result/Release.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 26 / 26 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/CPAN/Testers/Schema/Result/MetabaseUser.pm ↑ Summary blib/lib/CPAN/Testers/Schema/Result/ReleaseStat.pm »
1 15 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package CPAN::Testers::Schema::Result::Release;
3 15 our $VERSION = '0.025';
4 # ABSTRACT: Collected test report stats about a single CPAN release
5  
6 #pod =head1 SYNOPSIS
7 #pod
8 #pod my $release = $schema->resultset( 'Release' )->find({
9 #pod dist => 'My-Dist',
10 #pod version => '1.001',
11 #pod });
12 #pod
13 #pod say sprintf "My dist has %d pass and %d fail reports",
14 #pod $release->pass, $release->fail;
15 #pod
16 #pod $schema->resultset( 'Release' )
17 #pod ->search({ dist => 'My-Dist', version => '1.001' })
18 #pod ->update({ pass => \'pass+1' }); # increment PASSes
19 #pod
20 #pod =head1 DESCRIPTION
21 #pod
22 #pod This table contains a collected summary of release data suitable for
23 #pod quick views of sets of distributions and versions.
24 #pod
25 #pod This table's data is generated by L<Labyrinth::Plugin::CPAN::Release>.
26 #pod
27 #pod =head1 SEE ALSO
28 #pod
29 #pod L<DBIx::Class::Row>, L<CPAN::Testers::Schema>
30 #pod
31 #pod =cut
32  
33 15 ▶use CPAN::Testers::Schema::Base 'Result';
Subroutine BEGIN: called CC=1 SCAR=0.0
34 15 table 'release_summary';
35  
36 #pod =attr dist
37 #pod
38 #pod The name of the distribution.
39 #pod
40 #pod =cut
41  
42 15 column dist => {
43 data_type => 'varchar',
44 is_nullable => 0,
45 };
46  
47 #pod =attr version
48 #pod
49 #pod The version of the distribution.
50 #pod
51 #pod =cut
52  
53 15 column version => {
54 data_type => 'varchar',
55 is_nullable => 0,
56 };
57  
58 #pod =attr id
59 #pod
60 #pod The ID of the latest report for this release from the `cpanstats` table.
61 #pod See L<CPAN::Testers::Schema::Result::Stats>.
62 #pod
63 #pod =cut
64  
65 15 column id => {
66 data_type => 'int',
67 is_nullable => 0,
68 };
69  
70 #pod =attr guid
71 #pod
72 #pod The GUID of the latest report for this release from the `cpanstats`
73 #pod table. See L<CPAN::Testers::Schema::Result::Stats>.
74 #pod
75 #pod =cut
76  
77 15 column guid => {
78 data_type => 'char',
79 size => 36,
80 is_nullable => 0,
81 };
82  
83 #pod =attr oncpan
84 #pod
85 #pod The installability of this release: C<1> if the release is on CPAN. C<2>
86 #pod if the release has been deleted from CPAN and is only on BackPAN.
87 #pod
88 #pod =cut
89  
90 15 column oncpan => {
91 data_type => 'int',
92 is_nullable => 0,
93 };
94  
95 #pod =attr distmat
96 #pod
97 #pod The maturity of this release. C<1> if the release is stable and
98 #pod ostensibly indexed by CPAN. C<2> if the release is a developer release,
99 #pod unindexed by CPAN.
100 #pod
101 #pod =cut
102  
103 15 column distmat => {
104 data_type => 'int',
105 is_nullable => 0,
106 };
107  
108 #pod =attr perlmat
109 #pod
110 #pod The maturity of the Perl these reports were sent by: C<1> if the Perl is
111 #pod a stable release. C<2> if the Perl is a developer release.
112 #pod
113 #pod =cut
114  
115 15 column perlmat => {
116 data_type => 'int',
117 is_nullable => 0,
118 };
119  
120 #pod =attr patched
121 #pod
122 #pod The patch status of the Perl that sent the report. C<2> if the Perl reports
123 #pod being patched, C<1> otherwise.
124 #pod
125 #pod =cut
126  
127 15 column patched => {
128 data_type => 'int',
129 is_nullable => 0,
130 };
131  
132 #pod =attr pass
133 #pod
134 #pod The number of C<PASS> results for this release.
135 #pod
136 #pod =cut
137  
138 15 column pass => {
139 data_type => 'int',
140 is_nullable => 0,
141 };
142  
143 #pod =attr fail
144 #pod
145 #pod The number of C<FAIL> results for this release.
146 #pod
147 #pod =cut
148  
149 15 column fail => {
150 data_type => 'int',
151 is_nullable => 0,
152 };
153  
154 #pod =attr na
155 #pod
156 #pod The number of C<NA> results for this release.
157 #pod
158 #pod =cut
159  
160 15 column na => {
161 data_type => 'int',
162 is_nullable => 0,
163 };
164  
165 #pod =attr unknown
166 #pod
167 #pod The number of C<UNKNOWN> results for this release.
168 #pod
169 #pod =cut
170  
171 15 column unknown => {
172 data_type => 'int',
173 is_nullable => 0,
174 };
175  
176 #pod =attr uploadid
177 #pod
178 #pod The ID of this upload from the `uploads` table.
179 #pod
180 #pod =cut
181  
182 15 column uploadid => {
183 data_type => 'int',
184 extra => { unsigned => 1 },
185 is_nullable => 0,
186 };
187  
188 #pod =method upload
189 #pod
190 #pod Get the related row from the `uploads` table. See
191 #pod L<CPAN::Testers::Schema::Result::Upload>.
192 #pod
193 #pod =cut
194  
195 15 belongs_to upload => 'CPAN::Testers::Schema::Result::Upload' => 'uploadid';
196  
197 #pod =method report
198 #pod
199 #pod Get the related row from the `cpanstats` table. See
200 #pod L<CPAN::Testers::Schema::Result::Stats>.
201 #pod
202 #pod This report is the latest report, by date, that went in to this release
203 #pod summary. The date field in the report can be used to determine when this
204 #pod release was last updated.
205 #pod
206 #pod =cut
207  
208 15 belongs_to report => 'CPAN::Testers::Schema::Result::Stats', {
209 'foreign.guid' => 'self.guid',
210 };
211  
212 15 1;
213  
214 __END__
215  
216 =pod
217  
218 =head1 NAME
219  
220 CPAN::Testers::Schema::Result::Release - Collected test report stats about a single CPAN release
221  
222 =head1 VERSION
223  
224 version 0.025
225  
226 =head1 SYNOPSIS
227  
228 my $release = $schema->resultset( 'Release' )->find({
229 dist => 'My-Dist',
230 version => '1.001',
231 });
232  
233 say sprintf "My dist has %d pass and %d fail reports",
234 $release->pass, $release->fail;
235  
236 $schema->resultset( 'Release' )
237 ->search({ dist => 'My-Dist', version => '1.001' })
238 ->update({ pass => \'pass+1' }); # increment PASSes
239  
240 =head1 DESCRIPTION
241  
242 This table contains a collected summary of release data suitable for
243 quick views of sets of distributions and versions.
244  
245 This table's data is generated by L<Labyrinth::Plugin::CPAN::Release>.
246  
247 =head1 ATTRIBUTES
248  
249 =head2 dist
250  
251 The name of the distribution.
252  
253 =head2 version
254  
255 The version of the distribution.
256  
257 =head2 id
258  
259 The ID of the latest report for this release from the `cpanstats` table.
260 See L<CPAN::Testers::Schema::Result::Stats>.
261  
262 =head2 guid
263  
264 The GUID of the latest report for this release from the `cpanstats`
265 table. See L<CPAN::Testers::Schema::Result::Stats>.
266  
267 =head2 oncpan
268  
269 The installability of this release: C<1> if the release is on CPAN. C<2>
270 if the release has been deleted from CPAN and is only on BackPAN.
271  
272 =head2 distmat
273  
274 The maturity of this release. C<1> if the release is stable and
275 ostensibly indexed by CPAN. C<2> if the release is a developer release,
276 unindexed by CPAN.
277  
278 =head2 perlmat
279  
280 The maturity of the Perl these reports were sent by: C<1> if the Perl is
281 a stable release. C<2> if the Perl is a developer release.
282  
283 =head2 patched
284  
285 The patch status of the Perl that sent the report. C<2> if the Perl reports
286 being patched, C<1> otherwise.
287  
288 =head2 pass
289  
290 The number of C<PASS> results for this release.
291  
292 =head2 fail
293  
294 The number of C<FAIL> results for this release.
295  
296 =head2 na
297  
298 The number of C<NA> results for this release.
299  
300 =head2 unknown
301  
302 The number of C<UNKNOWN> results for this release.
303  
304 =head2 uploadid
305  
306 The ID of this upload from the `uploads` table.
307  
308 =head1 METHODS
309  
310 =head2 upload
311  
312 Get the related row from the `uploads` table. See
313 L<CPAN::Testers::Schema::Result::Upload>.
314  
315 =head2 report
316  
317 Get the related row from the `cpanstats` table. See
318 L<CPAN::Testers::Schema::Result::Stats>.
319  
320 This report is the latest report, by date, that went in to this release
321 summary. The date field in the report can be used to determine when this
322 release was last updated.
323  
324 =head1 SEE ALSO
325  
326 L<DBIx::Class::Row>, L<CPAN::Testers::Schema>
327  
328 =head1 AUTHORS
329  
330 =over 4
331  
332 =item *
333  
334 Oriol Soriano <oriolsoriano@gmail.com>
335  
336 =item *
337  
338 Doug Bell <preaction@cpan.org>
339  
340 =back
341  
342 =head1 COPYRIGHT AND LICENSE
343  
344 This software is copyright (c) 2018 by Oriol Soriano, Doug Bell.
345  
346 This is free software; you can redistribute it and/or modify it under
347 the same terms as the Perl 5 programming language system itself.
348  
349 =cut
« blib/lib/CPAN/Testers/Schema/Result/MetabaseUser.pm ↑ Summary blib/lib/CPAN/Testers/Schema/Result/ReleaseStat.pm »