App-CPANCoverBadge

 view release on metacpan or  search on metacpan

t/MyTestUA.pm  view on Meta::CPAN

package
    MyTestUA;

use Mojo::Base 'Mojo::UserAgent';

use Mojo::Transaction;
use Mojo::Message::Response;
use Mojo::Loader qw(data_section);

sub get {
    my ($ua, $url) = @_;

    my $tx = Mojo::Transaction->new;
    $tx->res( _fake_response( $url ) );

    return $tx;
}

sub _fake_response {
    my ($url) = @_;

    my ($host) = $url =~ m{latest/(.*)/index\.html};

    my $data = data_section( __PACKAGE__, $host . '.response' );
    my $res  = Mojo::Message::Response->new->parse($data);

    return $res;
}

1;

__DATA__
@@ types-reneeb.response
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sun, 13 Jan 2019 13:01:45 GMT
Content-Type: text/html
Content-Length: 4569
Last-Modified: Sun, 31 Aug 2014 00:46:55 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "5402707f-558"


<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 1.29
Devel::Cover is copyright 2001-2017, Paul Johnson (paul@pjcj.net)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="css.js"></script>
<script type="text/javascript" src="standardista-table-sorting.js"></script>
<title> Coverage Summary </title>
</head>
<body>

<h1> Coverage Summary </h1>
<table>
<tr>
<td class="sh" align="right">Module</td>
<td class="sv" align="left" colspan="4">Types-RENEEB</td>
</tr>
<tr>
<td class="sh" align="right">Version</td>
<td class="sv" align="left" colspan="4">0.02</td>
</tr>
<tr>
<td class="sh" align="right">Database:</td>
<td class="sv" align="left" colspan="4">/root/.cpan/build/Types-RENEEB-0.02-0/cover_db</td>
</tr>
<tr>
<td class="sh" align="right">Report date:</td>
<td class="sv" align="left" colspan="4">2019-01-13 09:56:54</td>
</tr>
<tr>
<td class="sh" align="right">Perl version:</td>
<td class="sv" align="left" colspan="4">v5.26.1</td>
</tr>
<tr>
<td class="sh" align="right">OS:</td>
<td class="sv" align="left" colspan="4">linux</td>
</tr>
<tr>
<td class="sh" align="right">Thresholds:</td>
<td class="sv c0">&lt; 75%</td>
<td class="sv c1">&lt; 90%</td>
<td class="sv c2">&lt; 100%</td>
<td class="sv c3">= 100%</td>
</tr>
</table>
<div><br /></div>

<script type="text/javascript">
<!-- hide
function filter_files(filter_by) {
var allelements = document.getElementsByTagName("tr");

t/MyTestUA.pm  view on Meta::CPAN



n/a

</td>



<td class="c3" title="5 / 5">


<a href="blib-lib-Types-RENEEB-pm--subroutine.html"> 100.0 </a>

</td>



<td>


n/a

</td>



<td>


38.4

</td>


<td class="c3" title="19 / 19">
100.0
</td>
</tr>


</tbody>
</table>

</body>
</html>



@@ red.response
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sun, 13 Jan 2019 13:01:45 GMT
Content-Type: text/html
Content-Length: 3861
Last-Modified: Sun, 31 Aug 2014 00:46:55 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "5402707f-558"

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 
Devel::Cover is copyright 2001-2012, Paul Johnson (paul@pjcj.net)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="css.js"></script>
<script type="text/javascript" src="standardista-table-sorting.js"></script>
<title> Coverage Summary </title>
</head>
<body>

<h1> Coverage Summary </h1>
<table>
<tr>
<td class="sh" align="right">Module</td>
<td class="sv" align="left" colspan="4">TAIR-Blast</td>
</tr>
<tr>
<td class="sh" align="right">Version</td>
<td class="sv" align="left" colspan="4">1.01</td>
</tr>
<tr>
<td class="sh" align="right">Database:</td>
<td class="sv" align="left" colspan="4">/.cpan/build/TAIR-Blast-1.01-yOr0U4/cover_db</td>
</tr>
<tr>
<td class="sh" align="right">Report date:</td>
<td class="sv" align="left" colspan="4">2014-09-04 02:37:27</td>
</tr>
<tr>
<td class="sh" align="right">Perl version:</td>
<td class="sv" align="left" colspan="4">v5.20.0</td>
</tr>
<tr>
<td class="sh" align="right">OS:</td>
<td class="sv" align="left" colspan="4">linux</td>
</tr>
<tr>
<td class="sh" align="right">Thresholds:</td>
<td class="sv c0">&lt; 75%</td>
<td class="sv c1">&lt; 90%</td>
<td class="sv c2">&lt; 100%</td>
<td class="sv c3">= 100%</td>
</tr>
</table>
<div><br /></div>

<script type="text/javascript">
<!-- hide
function filter_files(filter_by) {
var allelements = document.getElementsByTagName("tr");

t/MyTestUA.pm  view on Meta::CPAN

<td>


n/a

</td>



<td class="c0" title="4 / 7">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 57.1 </a>

</td>



<td class="c3" title="3 / 3">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 100.0 </a>

</td>



<td>


100.0

</td>


<td class="c0" title="19 / 86">
22.0
</td>
</tr>


</tbody>
</table>

</body>
</html>



@@ does-not-exist.response
HTTP/1.1 404 Not Found
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 19 Dec 2018 18:54:51 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
ETag: W/"571b65cf-943"

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <meta http-equiv="Content-Language" content="en-us"></meta>
    <link rel="stylesheet" type="text/css" href="/latest/collection.css"></link>
    <title>404</title>
  </head>
  <body>

    <h1>Oops!</h1>

    <p>You have managed to reach a page that doesn't exist.</p>

    <p><i>Just think about that for a moment!.</i></p>

    <p>This may be because:</p>

    <ul>
      <li>The module you are looking for has recently been uploaded and the coverage has not been generated yet.</li>
      <li>There may have been a problem generating coverage for the module.  Maybe:</li>
      <ul>
        <li>Some module dependencies could not be satisfied - either Perl
          modules which failed to install, or external dependencies which are
          not available on the cpancover server.</li>
        <li>The module has no tests, or they could not be run.</li>
        <li>Running the tests on the cpancover server took more than 30
          minutes.
        </li>
        <li>There is a bug in either Devel::Cover or cpancover.</li>
      </ul>
      <li>You may have followed an outdated link from an external site.</li>
      <li>You may have followed a broken link from this site.</li>
      <li>You were messing around and typing stuff into the address bar.</li>
      <li>You are trying to hack the site. <i>Stop that!.</i></li>
    </ul>

    <p>If you think the problem is due to a bug in Devel::Cover or cpancover,
    please feel free to report it.</p>

    <hr/>
    <p>
    Coverage information from <a href="https://metacpan.org/module/Devel::Cover">
      Devel::Cover
    </a> by <a href="http://pjcj.net">Paul Johnson</a>.

    <br/>

    Please report problems with this site to the
    <a href="https://github.com/pjcj/Devel--Cover/issues">issue tracker</a>.</p>

    <p><a href="http://cpancover.com/latest/about.html">About</a> the project.</p>

    <p>This server generously donated by
    <a href="http://www.bytemark.co.uk/r/cpancover">
      <img src="http://www.bytemark.co.uk/images/subpages/spreadtheword/bytemark_logo_179_x_14.png" alt="bytemark"/>
    </a>
    </p>
  </body>
</html>

@@ yellow.response
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sun, 13 Jan 2019 13:01:45 GMT
Content-Type: text/html
Content-Length: 3861
Last-Modified: Sun, 31 Aug 2014 00:46:55 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "5402707f-558"

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 
Devel::Cover is copyright 2001-2012, Paul Johnson (paul@pjcj.net)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="css.js"></script>
<script type="text/javascript" src="standardista-table-sorting.js"></script>
<title> Coverage Summary </title>
</head>
<body>

<h1> Coverage Summary </h1>
<table>
<tr>
<td class="sh" align="right">Module</td>
<td class="sv" align="left" colspan="4">TAIR-Blast</td>
</tr>
<tr>
<td class="sh" align="right">Version</td>
<td class="sv" align="left" colspan="4">1.01</td>
</tr>
<tr>
<td class="sh" align="right">Database:</td>
<td class="sv" align="left" colspan="4">/.cpan/build/TAIR-Blast-1.01-yOr0U4/cover_db</td>
</tr>
<tr>
<td class="sh" align="right">Report date:</td>
<td class="sv" align="left" colspan="4">2014-09-04 02:37:27</td>
</tr>
<tr>
<td class="sh" align="right">Perl version:</td>
<td class="sv" align="left" colspan="4">v5.20.0</td>
</tr>
<tr>
<td class="sh" align="right">OS:</td>
<td class="sv" align="left" colspan="4">linux</td>
</tr>
<tr>
<td class="sh" align="right">Thresholds:</td>
<td class="sv c0">&lt; 75%</td>
<td class="sv c1">&lt; 90%</td>
<td class="sv c2">&lt; 100%</td>
<td class="sv c3">= 100%</td>
</tr>
</table>
<div><br /></div>

<script type="text/javascript">
<!-- hide
function filter_files(filter_by) {
var allelements = document.getElementsByTagName("tr");

t/MyTestUA.pm  view on Meta::CPAN



n/a

</td>



<td class="c0" title="4 / 7">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 57.1 </a>

</td>



<td class="c3" title="3 / 3">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 100.0 </a>

</td>



<td>


100.0

</td>


<td class="c0" title="19 / 86">
22.0
</td>
</tr>


</tbody>
</table>

</body>
</html>



@@ orange.response
HTTP/1.1 200 OK
Server: nginx/1.10.3 (Ubuntu)
Date: Sun, 13 Jan 2019 13:01:45 GMT
Content-Type: text/html
Content-Length: 3859
Last-Modified: Sun, 31 Aug 2014 00:46:55 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: "5402707f-558"

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file was generated by Devel::Cover Version 
Devel::Cover is copyright 2001-2012, Paul Johnson (paul@pjcj.net)
Devel::Cover is free. It is licensed under the same terms as Perl itself.
The latest version of Devel::Cover should be available from my homepage:
http://www.pjcj.net
-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="cover.css"></link>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="css.js"></script>
<script type="text/javascript" src="standardista-table-sorting.js"></script>
<title> Coverage Summary </title>
</head>
<body>

<h1> Coverage Summary </h1>
<table>
<tr>
<td class="sh" align="right">Module</td>
<td class="sv" align="left" colspan="4">TAIR-Blast</td>
</tr>
<tr>
<td class="sh" align="right">Version</td>
<td class="sv" align="left" colspan="4">1.01</td>
</tr>
<tr>
<td class="sh" align="right">Database:</td>
<td class="sv" align="left" colspan="4">/.cpan/build/TAIR-Blast-1.01-yOr0U4/cover_db</td>
</tr>
<tr>
<td class="sh" align="right">Report date:</td>
<td class="sv" align="left" colspan="4">2014-09-04 02:37:27</td>
</tr>
<tr>
<td class="sh" align="right">Perl version:</td>
<td class="sv" align="left" colspan="4">v5.20.0</td>
</tr>
<tr>
<td class="sh" align="right">OS:</td>
<td class="sv" align="left" colspan="4">linux</td>
</tr>
<tr>
<td class="sh" align="right">Thresholds:</td>
<td class="sv c0">&lt; 75%</td>
<td class="sv c1">&lt; 90%</td>
<td class="sv c2">&lt; 100%</td>
<td class="sv c3">= 100%</td>
</tr>
</table>
<div><br /></div>

<script type="text/javascript">
<!-- hide
function filter_files(filter_by) {
var allelements = document.getElementsByTagName("tr");

t/MyTestUA.pm  view on Meta::CPAN



<td>


n/a

</td>



<td class="c0" title="4 / 7">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 57.1 </a>

</td>



<td class="c3" title="3 / 3">


<a href="blib-lib-TAIR-Blast-pm--subroutine.html"> 100.0 </a>

</td>



<td>


100.0

</td>


<td class="c0" title="19 / 86">
22.0
</td>
</tr>


</tbody>
</table>

</body>
</html>

@@ invalid.response
HTTP/1.1 404 Not Found
Server: nginx/1.10.3 (Ubuntu)
Date: Wed, 19 Dec 2018 18:54:51 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
ETag: W/"571b65cf-943"

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <meta http-equiv="Content-Language" content="en-us"></meta>
    <link rel="stylesheet" type="text/css" href="/latest/collection.css"></link>
    <title>404</title>
  </head>
  <body>

    <h1>Oops!</h1>

    <p>You have managed to reach a page that doesn't exist.</p>

    <p><i>Just think about that for a moment!.</i></p>

    <p>This may be because:</p>

    <ul>
      <li>The module you are looking for has recently been uploaded and the coverage has not been generated yet.</li>
      <li>There may have been a problem generating coverage for the module.  Maybe:</li>
      <ul>
        <li>Some module dependencies could not be satisfied - either Perl
          modules which failed to install, or external dependencies which are
          not available on the cpancover server.</li>
        <li>The module has no tests, or they could not be run.</li>
        <li>Running the tests on the cpancover server took more than 30
          minutes.
        </li>
        <li>There is a bug in either Devel::Cover or cpancover.</li>
      </ul>
      <li>You may have followed an outdated link from an external site.</li>
      <li>You may have followed a broken link from this site.</li>
      <li>You were messing around and typing stuff into the address bar.</li>
      <li>You are trying to hack the site. <i>Stop that!.</i></li>
    </ul>

    <p>If you think the problem is due to a bug in Devel::Cover or cpancover,
    please feel free to report it.</p>

    <hr/>
    <p>
    Coverage information from <a href="https://metacpan.org/module/Devel::Cover">
      Devel::Cover
    </a> by <a href="http://pjcj.net">Paul Johnson</a>.

    <br/>

    Please report problems with this site to the
    <a href="https://github.com/pjcj/Devel--Cover/issues">issue tracker</a>.</p>

    <p><a href="http://cpancover.com/latest/about.html">About</a> the project.</p>

    <p>This server generously donated by
    <a href="http://www.bytemark.co.uk/r/cpancover">
      <img src="http://www.bytemark.co.uk/images/subpages/spreadtheword/bytemark_logo_179_x_14.png" alt="bytemark"/>
    </a>
    </p>
  </body>



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