[Nitro] [PATCH] New FeedHelper
Bryan Soto
bryan.a.soto at gmail.com
Sun Apr 23 03:40:17 EDT 2006
On 4/22/06, Fabian Buch <fabian at oggu.de> wrote:
>
> Am 21.04.2006 um 21:25 schrieb Bryan Soto:
> > Windows is being... difficult. :/
> >
> > 1) Error:
> > test_atom(TC_FeedHelper):
> > ArgumentError: 3 elements of civil date are necessary
> > c:/ruby/lib/ruby/1.8/date.rb:1214:in 'new_with_hash'
> > c:/ruby/lib/ruby/1.8/date.rb:1258:in 'parse'
> > ./lib/nitro/helper/feed.rb:389:in 'to_rfc3339'
> > ./lib/nitro/helper/feed.rb:241:in 'build_atom'
> > ./test/nitro/helper/tc_feed.rb:84:in 'test_atom'
> >
> > Passes fine on linux, though.
> >
> > I'll see what I can figure out and run it by you. Sound good?
>
> Thank you. I've no Windows box handy, so it'd be very cool if you could
> figure out what it is.
>
Could you try this change and see if it works for you then? It passes
the tests on WIndows.
# feed.rb:388
def to_rfc3339(datetime)
# t = DateTime.parse(datetime.to_s).strftime('%FT%T%z')
time = Time.parse(datetime.to_s)
t = DateTime.parse(time.strftime('%Y-%m-%d')).strftime('%FT%T%z')
return t[0..-3]+":"+t[-2..-1]
end
Thanks. :)
--
"Never tell people how to do things. Tell them what to do and they
will surprise you with their ingenuity." —General George S. Patton
More information about the Nitro-general
mailing list