Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2011-01-07 Thread Thierry Thelliez
Tom, Yesterday I encountered another similar issue. Looking at the code, I see that the attachments parsing (in rt_client0.3.7) relies on a pattern assuming '),' as a separator. client.rb line 608: pattern = /(\d+:\s.*?\)),/ But one of ours users uploaded a file with '),' in the file name.

Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-26 Thread Thierry Thelliez
Tom, Thanks you so much. I was finally getting to it when I saw your email. I tried your fix and it works for me. More testing later. Thierry

Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-25 Thread Tom Lahti
So, I went ahead and set up a test case with an RT instance here and made an attachment with a comma in the filename to play with. There is now an updated rt-client on rubygems.org, version 0.3.3 that addresses the issue and should work. Let me know if you have any problems. There are probabl

Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-24 Thread Tom Lahti
Send me a patch. I'm the author of that gem. Or if you need help, send me your email as a text file and I'll look into it. As far as I know roart does not do attachments at all, but that may have changed. I'm not involved with that gem -- it was made for Rails programmers who are familiar

Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-24 Thread Thierry Thelliez
Ok, 2nd correction. sorry. The error was not with the multipart, and not with the regular expression. It is in the line: list = th["attachments"].to_s.split(",") It is splitting the lines based on the presence of commas. My filename contains a comma... Thierry

Re: [rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-24 Thread Thierry Thelliez
Sorry, there is a bug, but not the one I thought it was. Calling 'by hand' the REST interface does show the attachment ID. My issue is with a character in the filename breaking rt_client parsing, I think. My attachment file name has spaces, commas and dots. I am quite sure that the problem is s

[rt-users] rt_client ruby: Issue with attachments in a multipart email

2010-10-24 Thread Thierry Thelliez
Hello, It seems that if a user sends an HTML formatted email (multipart) with an attachment. RT_Client does not dig deep enough to get to the attachment when calling rt.attachments. The multipart part is unamed and rt_client does not look into it. Before I try other libraries: - From what I see