#154 ✓resolved
Lindsay Holmwood

add attach_file support to Merb

Reported by Lindsay Holmwood | February 5th, 2009 @ 02:03 AM | in 0.5

You can find the feature at:

http://github.com/auxesis/webrat...

Tests seem to be fine, however i'm sure the code could do with a cleanup. Any pointers would be appreciated.

Comments and changes to this ticket

  • Bryan Helmkamp

    Bryan Helmkamp February 8th, 2009 @ 11:57 PM

    • Milestone set to 0.5
    • State changed from “new” to “open”

    Hey Lindsay,

    Thanks for the ticket and patch. A few suggestions:

    • I think we need an integration spec for this so Webrat can commit to it staying working. We've got a small, full Merb app in spec/integration/merb whose specs we run before every commit. Can you add a spec to that that demonstrates a single small file upload and verifies the correct data (file size, MIME type, etc) makes it to the Merb app?
    • I'd like to think about ways we can move this concern into the FileField class and the MerbSession code. It seems out of place in session.rb
    • Can you please package this up into a branch in your git repository to make it easy to merge? A good name would be lh_154.

    Thanks again. I'd like to get this in for the 0.5 release.

    Cheers,

    -Bryan

  • Lindsay Holmwood

    Lindsay Holmwood February 9th, 2009 @ 01:42 AM

    G'day Bryan, Thanks for your feedback. To respond to your points:

    • I'm happy to put together an integration spec for this. I'll probably get to it later this week.
    • I completely agree about the hackery in session.rb. The main reason I implemented it like that was because the Rails session adapter passes the form params to ActionController, whereas the Merb session adapter turns the params into an actual Rack request (and thus multipart has to be handled a bit differently). Maybe if we loaded up the env with :input inside FileField itself, that would limit the potential confusion in do_request?.
    • I'll bundle this up into a branch when I do the integration spec.

    Cheers, Lindsay

  • Bryan Helmkamp

    Bryan Helmkamp June 14th, 2009 @ 10:20 PM

    • State changed from “open” to “resolved”

    Hey Lindsay,

    I believe we've got this resolved by way of ticket #47. Please let me know if you run into any trouble, or you need anything else. Thanks.

    Cheers,

    -Bryan

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket

Pages