Closed fabiormoura closed 1 year ago
hey, @fabiormoura thanks for the fix, PR looks good, but, could you please provide a spec for the subscribed_task_stats
method? Thanks!
Also, please provide a changelog entry, so that will be easier to generate a release (example)
Also, please provide a changelog entry, so that will be easier to generate a release (example)
Thanks for the suggestions @konalegi. I made the changes which have been amended.
@fabiormoura could you please fix rubocop offenses as well? Thanks
@fabiormoura could you please fix rubocop offenses as well? Thanks
it's been fixed.
Merged, going to release it on Monday. Thanks for PR :)
The method
subscribed_task_stats
wraps almost all methods in RakeHelper but it has a bug.For instance, the
upgrade
method in the same module is supposed to return a list of changed indexes in https://github.com/toptal/chewy/blob/7d567542c7685cf44a52050b8d16e61c373cd186/lib/chewy/rake_helper.rb#L65-L85However, the wrapping method isn't returning to the caller the value of
changed_indexes
. Instead, it returns the result of the methodoutput.puts
which isnil
.I'm simply moving
output.puts
to be called withinensure
so the output of the method correctly returns the result of:that would resolve to the correct value in the end when
&block
is evaluated.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).