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
TO=`git show --pretty=email | grep ^From: | sed -e 's/^From: //'` | |
echo "From: sender | |
To: $TO | |
Cc: other-receiver | |
Subject: Tests failed! | |
Application was broken in the last commit! | |
You can check it at: | |
http://ci-web-address |
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
# AttachmentFu sets the Attachment content type from the browser sent Content-type header | |
# | |
# This monkey patch uses UNIX file utility to fix broken or missing content types headers | |
module Technoweenie::AttachmentFu::InstanceMethods | |
def uploaded_data_with_unix_file_mime_type=(file_data) | |
tmp_file = self.uploaded_data_without_unix_file_mime_type=(file_data) | |
if tmp_file.present? && (unix_file = `which file`.chomp).present? && File.exists?(unix_file) | |
`#{ unix_file } -v 2>&1` =~ /^file-(.*)$/ |
NewerOlder