Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Circle CI Failure Bookmarklet
$(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