Re: [Rails] Re: Benchmarking a mailer

2010-01-13 Thread Sven Riedel
jhaagmans wrote: Hi Sven, [...] There's one specific domain we'd like to instantly mail to. Will it save DNS-lookup time if I'd add the mailserver at the other end to our hosts file? If so, should we use the MX-record (mail.domain.com) or just the domain part of the e-mail address (domain.com

Re: [Rails] Benchmarking a mailer

2010-01-13 Thread Sven Riedel
jhaagmans wrote: We'd like to see how long it takes for a Mailer object to leave our server after the deliver command is sent. How could we do this? We'd like to get an accurate value (e.g. in milliseconds). Wrap the call to your deliver_xxx method in Benchmark.realtime. This will of course only

Re: [Rails] Re: Regular expression: How do I allow forward slashes?

2009-12-19 Thread Sven Riedel
Sven Riedel wrote: > /^http:\/\/myhostname\.com\/foo$/i > > would become > > %r{http://myhostname\.com/foo}i And of course I forgot the anchors in the second example. So the correct version is: %r{^http://myhostname\.com/foo$}i -- You received this message because you are su

Re: [Rails] Re: Regular expression: How do I allow forward slashes?

2009-12-19 Thread Sven Riedel
frogstarr78 wrote: > Have you tried escaping them "\/"? Another way would be to use %r, that way you can avoid the leaning toothpick syndrome alltogether; /^http:\/\/myhostname\.com\/foo$/i would become %r{http://myhostname\.com/foo}i But before you start piecing your own regexp together have