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
The only gist I have. |
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
# When FB throws a 400 (e.g. while calling Graph API), the real error is inside the response body. | |
# This initializer intends to report that to Airbrake in a way that this response doesn't get lost. | |
# params would include __rest_client key that contains JSON-parsed response body of the error | |
# Also, error message would include the actual error message from FB, instead of just a boring "400: Bad Request" | |
module Airbrake | |
class Notifier | |
def send_notice_with_extra_logging(*args) | |
exception = args[0] | |
params = args[1] |
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
#!/usr/bin/env ruby | |
require 'english' | |
require 'rubocop' | |
ADDED_OR_MODIFIED = /A|AM|^M/.freeze | |
changed_files = `git status --porcelain`.split(/\n/). | |
select { |file_name_with_status| | |
file_name_with_status =~ ADDED_OR_MODIFIED |