ManageIQ / polisher

Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
MIT License
14 stars 14 forks source link

Fix getting latest upstream #111

Closed strzibny closed 10 years ago

strzibny commented 10 years ago

Polisher gets the latest upstream version by calling JSON API, collecting all the versions and than asking for the first one. But the array is NOT sorted. Thereof makes sense to ask for the highest one. This PR should solve the issue.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 492556810ae28600d6bf40fa8020b873633a200d on strzibny:fix-getting-latest-upstream into a50f53d62117c80c39b7fe9bc212fa0337527da2 on ManageIQ:master.

miq-bot commented 10 years ago

Checked commit https://github.com/strzibny/polisher/commit/492556810ae28600d6bf40fa8020b873633a200d with rubocop 0.21.0 1 file checked, 0 offenses detected Everything looks good. :+1:

jrafanie commented 10 years ago

@strzibny Looks great to me.
@movitto Does it make sense to have a test for this to ensure if the JSON response has the highest version number NOT first we don't have regression in the future?

movitto commented 10 years ago

@strzibny +1 looks good

@jrafanie the more tests the merrier

strzibny commented 10 years ago

Thanks for the merge. Actually I don't thing that the original approach was incorrect since RubyGems should probably be doing the sorting, but #max will just fix it both for now and future:).

I submitted the issue upstream[0].

[0] https://github.com/rubygems/rubygems.org/issues/700