Created
March 18, 2017 15:18
-
-
Save zoffixznet/9d9783ab1d74a6c21f69241daee7e813 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use JSON::Fast; | |
use HTTP::UserAgent; | |
my $job = ua-get-json 'https://api.travis-ci.org/jobs/212455149'; | |
$job<log>.lc ~~ m/ | |
[ | |
"git error: fatal: unable to access" | |
| "git error: error: rpc failed" | |
| 'the command "git fetch origin +refs/pull/' \d+ '/merge:" failed and exited with 128 during .' | |
] | |
/; | |
say "Done matching; measure the RAM!"; | |
sleep; | |
sub ua-get-json ($url) { | |
my $res = HTTP::UserAgent.new.get: $url; | |
fail $res.status-line unless $res.is-success; | |
from-json $res.content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment