Closed rthbound closed 3 years ago
something about the words here is not working for me:
We have #authorization_mode=
, explicit
and allow_all
explicit does not feel like the correct word.
Maybe instead allow_all
and allow_authorized
? Maybe allow_all
and deny_unauthorized
?
Also since we have a setter here, we should exception out if people try to set an unexpected authorization mode.
@SamSaffron I did consider throwing an exception if people set an unexpected mode, however this could be a breaking change:
In either of these cases, MiniProfiler.config.authorization_mode == :whitelist
would have returned false, sure, but there would not have been an exception.
What do you think we should do? We could emit a deprecation warning and claim that in the future we will raise if the given argument is not one of :allow_all
or :allow_authorized
.
My thinking was that this entire setter method would disappear once :whitelist
is fully removed.
Yeah let's do a deprecation for the next 6 months and then we can remove the deprecation and just throw an exception for unexpected modes.
A few tiny changes and I think we are good to merge! thanks @rthbound :confetti_ball:
@SamSaffron thank you for your collaboration on this!
looking great, merging this in, any idea why CI is playing up?
I haven't seen that before. Looks flaky -- this report of that particular error claims it was happening around ~5% of the time, once upon a time: https://github.com/rubygems/rubygems/issues/4187
No worried Ryan, yeah looks like it is passing once merged.
Thanks again for the contribution. We will move from master -> main as well some time in the next few weeks.