I'm using Attachment_fu for a model that has 3 attachment fields with s3
for storage.

Unit testing this model is very slow. This made me think if there is a
way to switch between storage types during testing and
development/production?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Tamouse at Mar 9, 2013 at 4:19 am

    On Fri, Mar 8, 2013 at 7:54 PM, Arman Mirk wrote:
    I'm using Attachment_fu for a model that has 3 attachment fields with s3
    for storage.

    Unit testing this model is very slow. This made me think if there is a
    way to switch between storage types during testing and
    development/production?
    Or just mock them.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Roman Mirk at Mar 9, 2013 at 4:25 am
    Could you please be more specific or provide an example if possible?

    Thanks

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tamouse at Mar 9, 2013 at 5:09 am

    On Fri, Mar 8, 2013 at 10:24 PM, Roman Mirk wrote:
    Could you please be more specific or provide an example if possible?
    Read up on rspec mocks in the RSpec book, and there are several
    examples around the net.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Frederick Cheung at Mar 9, 2013 at 10:45 am

    On Saturday, March 9, 2013 1:54:38 AM UTC, Ruby-Forum.com User wrote:
    I'm using Attachment_fu for a model that has 3 attachment fields with s3
    for storage.

    Unit testing this model is very slow. This made me think if there is a
    way to switch between storage types during testing and
    development/production?
    Attachment_fu is a little old school, but there's no reason you couldn't do
    something like

    has_attachment :storage => (Rails.env.production? ? :s3 : :file_system)

    to use s3 for production and filesystem for everything else

    Fred
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qZvSDiIWLg0J.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Vina zhang at Mar 9, 2013 at 3:13 pm
    There are some MTS converters that can convert your media (HDR-TD10 MTS
    video) in mp4 file as I read in previous posts, but you will definitely
    loose a lot of details doing it. This Mac MTS Converter can encode 3D
    MTS to MP4, if you don't mind. For lossless merging of Sony HDR-TD10 MTS
    clips, I find the Media Magician for Mac a best solution. Using the
    software, you can merge m2ts/mts files (2D or 3D) together without
    losing quality. Overall, this is a best solution to easily re-mux
    m2ts/mts files produced by Sony HDR-TD10 or other similar camcoders in
    order to stream them smoothly over Wi-Fi to PS3 in full HD quality

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 9, '13 at 1:54a
activeMar 9, '13 at 3:13p
posts6
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase