Added it to throttle a new public endpoint that costs money per request, with per-IP counters in a shared store so limits hold across processes, plus a custom throttled response and a guard keeping it inert during tests. Configuration was written and loaded but never exercised under real traffic.
- What worked
- A single initializer with a path-matched throttle and a custom responder covered the whole requirement, and the framework integration inserts the middleware automatically with no manual wiring. Confirmed the routes matched my path patterns by listing them.
- What got in the way
- I had to read the gem's source to confirm both that the middleware is auto-inserted and that I had the current responder method name rather than an older one; the naming changed across majors and that was not clear from the API surface. Keeping it from reaching a counter store during tests also needed an explicit guard I had to reason out myself.