Alien-Build

 view release on metacpan or  search on metacpan

corpus/alien_build_plugin_fetch_curlcommand/record/old.json  view on Meta::CPAN

{"-l ftp://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus/":{"stdout":"","files":{},"stderr":"  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   S...

corpus/alien_build_plugin_fetch_curlcommand/record/old.yml  view on Meta::CPAN

    ab-filename     :foo-1.01.tar
    ab-content_type :text/plain
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar
-L -O -J -f -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html:
  exit: 0
  files:
    html_test.html: "<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :html_test.html
    ab-content_type :text/html;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html
-L -f -O -J -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html:
  exit: 22
  files: {}
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :bogus.html
    ab-content_type :
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html
-L -f -O -J -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar:
  exit: 0
  files:
    foo-1.01.tar: "content:foo-1.01\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :foo-1.01.tar
    ab-content_type :text/plain;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar
-L -f -O -J -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html:
  exit: 0
  files:
    html_test.html: "<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :html_test.html
    ab-content_type :text/html;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html
-L -f -O -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html:
  exit: 22
  files: {}
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :bogus.html
    ab-content_type :
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html
-L -f -O -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar:
  exit: 0
  files:
    foo-1.01.tar: "content:foo-1.01\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :foo-1.01.tar
    ab-content_type :text/plain;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar
-L -f -O -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html:
  exit: 0
  files:
    html_test.html: "<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :html_test.html
    ab-content_type :text/html;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html
-L -f -o content -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html:
  exit: 22
  files: {}
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :content
    ab-content_type :
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/bogus.html
-L -f -o content -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar:

corpus/alien_build_plugin_fetch_curlcommand/record/old.yml  view on Meta::CPAN

    ab-filename     :content
    ab-content_type :text/plain
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/foo-1.01.tar
-L -f -o content -w @writeout http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html:
  exit: 0
  files:
    content: "<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>\n"
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |-
    ab-filename     :content
    ab-content_type :text/html;charset=UTF-8
    ab-url          :http://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/html_test.html
-l ftp://localhost/corpus/alien_build_plugin_fetch_curlcommand/dir/:
  exit: 0
  files: {}
  stderr: "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     ...
  stdout: |
    foo-1.00.tar
    foo-1.01.tar
    foo-1.02.tar
    html_test.html

corpus/alien_build_plugin_fetch_wget/record/old.json  view on Meta::CPAN

{"-k --content-disposition -S http://localhost/corpus/alien_build_plugin_fetch_wget/dir/foo-1.01.tar":{"stderr":"--2021-05-12 00:10:35--  http://localhost/corpus/alien_build_plugin_fetch_wget/dir/foo-1.01.tar\nResolving localhost (localhost)... ::1, ...

corpus/alien_build_plugin_fetch_wget/record/old.yml  view on Meta::CPAN

    html_test.html: "<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>\n"
  stderr: |
    --2021-05-12 00:10:35--  http://localhost/corpus/alien_build_plugin_fetch_wget/dir/html_test.html
    Resolving localhost (localhost)... ::1, 127.0.0.1
    Connecting to localhost (localhost)|::1|:42643... failed: Connection refused.
    Connecting to localhost (localhost)|127.0.0.1|:42643... connected.
    HTTP request sent, awaiting response... 
      HTTP/1.0 200 OK
      Date: Wed, 12 May 2021 06:10:35 GMT
      Server: HTTP::Server::PSGI
      Content-Type: text/html; charset=utf-8
      Content-Length: 84
      Last-Modified: Wed, 12 May 2021 04:39:27 GMT
    Length: 84 [text/html]
    Saving to: ‘html_test.html’
    
         0K                                                       100% 9.79M=0s
    
    2021-05-12 00:10:35 (9.79 MB/s) - ‘html_test.html’ saved [84/84]
    
    Converting links in html_test.html... nothing to do.

corpus/dir/http.html  view on Meta::CPAN

<html><head>
  <title>Index of /corpus/dist/</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <style type='text/css'>
table { width:100%%; }
.name { text-align:left; }
.size, .mtime { text-align:right; }
.type { width:11em; }
.mtime { width:15em; }
  </style>
</head><body>
<h1>Index of /corpus/dist/</h1>
<hr />

corpus/dir/http_rel.html  view on Meta::CPAN

<html><head>
  <title>Index of /foo/bar/</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <style type='text/css'>
table { width:100%%; }
.name { text-align:left; }
.size, .mtime { text-align:right; }
.type { width:11em; }
.mtime { width:15em; }
  </style>
</head><body>
<h1>Index of /foo/bar/</h1>
<hr />

corpus/vcpkg/r2/installed/vcpkg/info/libiconv_1.16-1_x64-windows.list  view on Meta::CPAN

x64-windows/
x64-windows/bin/
x64-windows/bin/libcharset.dll
x64-windows/bin/libcharset.pdb
x64-windows/bin/libiconv.dll
x64-windows/bin/libiconv.pdb
x64-windows/debug/
x64-windows/debug/bin/
x64-windows/debug/bin/libcharset.dll
x64-windows/debug/bin/libcharset.pdb
x64-windows/debug/bin/libiconv.dll
x64-windows/debug/bin/libiconv.pdb
x64-windows/debug/lib/
x64-windows/debug/lib/libcharset.lib
x64-windows/debug/lib/libiconv.lib
x64-windows/include/
x64-windows/include/iconv.h
x64-windows/include/localcharset.h
x64-windows/lib/
x64-windows/lib/libcharset.lib
x64-windows/lib/libiconv.lib
x64-windows/share/
x64-windows/share/libiconv/
x64-windows/share/libiconv/copyright
x64-windows/share/libiconv/vcpkg_abi_info.txt
x64-windows/share/unofficial-iconv/
x64-windows/share/unofficial-iconv/unofficial-iconv-config-debug.cmake
x64-windows/share/unofficial-iconv/unofficial-iconv-config-release.cmake
x64-windows/share/unofficial-iconv/unofficial-iconv-config.cmake

lib/Alien/Build/Manual/PluginAuthor.pod  view on Meta::CPAN

     { filename => $filename2, url => $url2, version => $version2 },
   ],
   protocol => $protocol, # AB 2.60 optional, but recommended
 };

or if the listing is in HTML format as a hash reference containing the
HTML information:

 return {
   type => 'html',
   charset  => $charset, # optional
   base     => $base,    # the base URL: used for computing relative URLs
   content  => $content, # the HTML content
   protocol => $protocol, # optional, but recommended
 };

or a directory listing (usually produced by an FTP servers) as a hash
reference:

 return {
   type     => 'dir_listing',

lib/Alien/Build/Plugin/Fetch/LWP.pm  view on Meta::CPAN


    my $ua = LWP::UserAgent->new;
    $ua->env_proxy;
    my $res = $ua->get($url, @headers);

    my($protocol) = $url =~ /^([a-z]+):/;

    die "error fetching $url: @{[ $res->status_line ]}"
      unless $res->is_success;

    my($type, $charset) = $res->content_type_charset;
    my $base            = $res->base;
    my $filename        = $res->filename;

    if($type eq 'text/html')
    {
      return {
        type     => 'html',
        charset  => $charset,
        base     => "$base",
        content  => $res->decoded_content || $res->content,
        protocol => $protocol,
      };
    }
    elsif($type eq 'text/ftp-dir-listing')
    {
      return {
        type     => 'dir_listing',
        base     => "$base",

t/alien_build_plugin_fetch_lwp.t  view on Meta::CPAN

        is(
          $res,
          hash {
            if($type eq 'ftp')
            {
              field type => 'dir_listing';
            }
            else
            {
              field type    => 'html';
              field charset => E();
            }
            field base     => match qr!^$type:/!;
            field content  => match qr!foo-1\.00\.tar\.gz!;
            field protocol => $type;
            end;
          },
         ) || diag _dump($res);
      };

      subtest 'file' => sub {

t/bin/httpd  view on Meta::CPAN

    my @query = $uri->query_form;
    while(@query)
    {
      my $key = shift @query;
      my $value = shift @query;
      push @{ $query{$key} }, $value;
    }

    return [
      '200',
      [ 'Content-Type' => 'text/plain; charset=UTF-8' ],
      [ encode_json( { headers => \%headers, url => { scheme => $uri->scheme, host => $uri->host, port => $uri->port, path => $uri->path, query => \%query } } ) ],
    ];
  };
  mount '/corpus/dist/about.json' => sub {
    my $env = shift;
    return [
      '200',
      [ 'Content-Type' => 'application/json' ],
      [ encode_json( { ident => 'AB Test HTTPd' } ) ],
    ];



( run in 0.287 second using v1.01-cache-2.11-cpan-4d50c553e7e )