Hi Alex,

thanks for the quick response! How do I apply this monkey-patch? Just drop it in my tasks directory?

As for detecting binary content... I noticed that String has a method called is_binary_data? apparently contributed by yaml (*). It seems to do the trick, but I don't know if you can depend on it.

Best regards,
Dieter

(*) http://apidock.com/ruby/String/is_binary_data%3F

On 09/27/2011 08:16 PM, Alex Boisvert wrote:
On Tue, Sep 27, 2011 at 10:02 AM, Dieter Vrancken<
dieter.vranc...@luciad.com>  wrote:

We are filtering our resources with settings from the profile and it is
great! The problem is that one of our devs added a png image to the
resources directory. As the filter tries to interpolate variables into this
binary file, it fails miserably. Are we not supposed to put binary files in
our resources? That would be unfortunate!

Hi Dieter,

Yeah, that's a problem.  You can circumvent the problem by monkey-patching
the Mapper class, e.g.,

I'll fix this in Buildr so the next release doesn't apply filter mappings
willy-nelly on binary files.  (BTW, do you have any suggestion on good
binary content detection?)

Thanks for bringing this up.

alex

Reply via email to