Created
June 9, 2012 18:07
-
-
Save rafaelp/2902006 to your computer and use it in GitHub Desktop.
Monkey patch to fix https://github.com/thoughtbot/paperclip/issues/301
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
module AWS | |
module Core | |
class LogFormatter | |
# @param [Object] value | |
# @return [String] | |
def summarize_value value | |
case value | |
when String then summarize_string(value) | |
when Hash then '{' + summarize_hash(value) + '}' | |
when Array then summarize_array(value) | |
when File then summarize_file(value.path) | |
when Pathname then summarize_file(value) | |
else value.to_s.force_encoding('UTF-8').inspect | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment