Adrien Rey-Jarthon

Results 119 comments of Adrien Rey-Jarthon

Hi, I just wanted to add one more case here ^^ I first encountered this problem and reported it in https://github.com/rack/rack-attack/pull/457 and by lack of better option, decided to lock...

Thanks @zarqman! That's what I was starting to do indeed, I'm gonna use this workaround until some decision is reached about a potential future cleaner solution.

Hello @FabioNascimento, This is an interesting use-case but it's unfortunately not supported by this gem. Feel free to write a PR if you want though, I like the idea I...

Interesting, but tricky to do well, as it must not interfere with, for example: `Time.now - 8.working.hours` — when outside a 8 hours working period, this should take us to...

I see, then maybe we should rename this method, and have another one with this name returning an offseted time to be inside the period ?

My suggestion is keeping `return_to_working_time` and add `return_after_working_time`. The `after` version being our current implementation.

Or maybe `return_inside_working_time` and `return_outside_working_time` ? the problem with all these is that if you are inside and call `return_outside_working_time` or `return_after_working_time`, you'll stay inside. So it's a bit misleading...

Sorry for the delay, here is my review: You should refactor `return_to_opening_time` to use `return_to_working_time` first to avoid duplicate logic. Also, the `windows_between` method, which is quite complex, is not...

@dmitry the PR has never been amended after my review so it is not ready to merge.