twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

New release #48

Closed dentarg closed 8 years ago

dentarg commented 8 years ago

We want to release a version with these goodies:

dentarg commented 8 years ago

Which version should we release this as? 5.0.0? 4.1.0? 4.0.2?

walro commented 8 years ago

I vote for 4.0.2. We can perhaps convince ourselves that the UTC conversion is merely a bug fix.

jage commented 8 years ago

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

walro commented 8 years ago

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.

dentarg commented 8 years ago

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.

dentarg commented 8 years ago

(no pun intended)

jage commented 8 years ago

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.

dentarg commented 8 years ago

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.

dentarg commented 8 years ago

I have released 5.0.0 (https://github.com/twingly/twingly-search-api-ruby/commit/50dff7a08aef14c08f67ae0bf877383d668a96bd, https://github.com/twingly/twingly-search-api-ruby/commit/65666013edcae6ba0c02267baf1574b17ae6ab31)