oivoodoo / devise_masquerade

Extension for devise, enable login as functionality. Add link to the masquerade_path(resource) and use it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Breaking changes in newer version/s

adriancb opened this issue · comments

As a follow-up to #92 there are several recent PATCH releases that may have changed the 'public' interface and therefore do not adhere to the correct SEMVER - https://semver.org/.

An example is extending the controller and adding to the resource session https://github.com/oivoodoo/devise_masquerade/blob/v1.3.3/app/controllers/devise/masquerades_controller.rb#L17.

commented

Hi @adriancb

Thank you for reporting the issue but could you clarify the required changes that I need to apply?

Hey @oivoodoo,

I believe the thought behind this was the renaming of find_resource to find_masqueradable_resource. As protected methods, it's reasonable to expect that inheriting classes can overload them (i.e. provide their own implementation).

IMO, the changes from 1.3.3 to 1.3.4 should've triggered a major release as they're not backwards compatible.

A change from protected > private (even though this is Ruby) at least marks them as 'private', which shifts the responsibility to those overloading those methods to understand the future impact.

The reason I'm bringing this up is that we upgrade our libs daily, and we spend much of our focus on reviewing major/minor version changes with less focus on patch changes, as we take them for granted. In this instance, we were unaffected, but that could've been different.

Let me know if that doesn't make sense or what your thoughts are.