Created
April 11, 2015 01:20
-
-
Save jakeonrails/c2f302bce7b1e4707faa to your computer and use it in GitHub Desktop.
Circle CI Failure Bookmarklet
This file contains hidden or 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
$(window.open().document.body).html( | |
"<style>textarea { font-size: large; font-family: monospace;}</style>" + | |
"<h4>Cucumber failures</h4><textarea style='height: 25%;width: 100%'>cucumber " + | |
$.makeArray($.unique( | |
$('span.red').filter(function() { | |
return (this.textContent).match(/cucumber .+:\d+/) | |
}).map(function() { | |
return $(this).text().match(/cucumber (.+)/)[1] | |
}) | |
).sort()).join(' ') + | |
"</textarea></textarea><h4>Rspec Failures</h4><textarea style='height: 25%; width: 100%'>rspec " + | |
$.makeArray($.unique( | |
$('span.red').filter(function() { | |
return (this.textContent).match(/rspec .+:\d+/) | |
}).map(function() { | |
return $(this).text().match(/rspec (.+)/)[1] | |
}) | |
).sort()).join(' ') + | |
"</textarea></textarea><h4>Rubocop Failures</h4><textarea style='height: 25%; width: 100%'>rubocop " + | |
$.makeArray($.unique( | |
$('span.cyan').filter(function() { | |
return (this.textContent).match(/^[a-z\/_]+.rb$/) | |
}).map(function() { | |
return $(this).text() | |
}) | |
).sort()).join(' ') + | |
"</textarea><script type='text/javascript'>document.getElementsByTagName('textarea')[0].select();</script>" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment