Closed dentarg closed 8 years ago
Which version should we release this as? 5.0.0? 4.1.0? 4.0.2?
I vote for 4.0.2. We can perhaps convince ourselves that the UTC conversion is merely a bug fix.
I vote for 5.0.0 or 4.1.0, see comment in https://github.com/twingly/twingly-search-api-ruby/pull/46#issuecomment-184373591
see comment in #46 (comment)
Ok, there were more changes than I thought. I believed we only shifted the timezone to UTC :)
It also sounds like we want to think about changing some more code around before releasing anything. Or at least discuss the desired behavior.
It also sounds like we want to think about changing some more code around before releasing anything.
I guess you think about these comments (from https://github.com/twingly/twingly-search-api-ruby/pull/46#issuecomment-184373591)
In #15 we ensured that we would get the same object out as we put into the start_time/end_time. That allowed users of the gem to easier compare the query dates with the result dates. Now they might be mutated if they aren't Time objects.
Interesting that we use Time here but Post#indexed and Post#published return DateTime objects https://github.com/twingly/twingly-search-api-ruby/blob/750df991f0dc96405e0e96dcf6eb1805b82ccad2/lib/twingly/search/post.rb#L35-L36
So if we use Time
all the time we allow users to compare query dates with the result dates.
(no pun intended)
So if we use Time all the time we allow users to compare query dates with the result dates.
Sure, but most importantly, don't mutate the objects. If I use obj.attr = 1
I expect obj.attr == 1
.
We no longer mutate {start,end}_time
, but we have now changed Post#published
and Post#indexed
from DateTime
to Time
, so I guess we are in for 5.0.0 any way.
We want to release a version with these goodies: