Clean up CAPTCHA controller logic
- Splits existing single `SpammableActions` module into three separate cohesive, loosely-coupled, and well-named new modules: - `SpammableActions::CaptchaCheck::JsonFormatActionsSupport` - `SpammableActions::CaptchaCheck::HtmlFormatActionsSupport` - `SpammableActions::AkismetMarkAsSpamAction` - Updates and adds test coverage for the new modules. - Moves responsibility for redirects out of shared modules and back into controllers. - For clarity, inlines responsibility for determining whether a given `issueable` should be spam checked into `IssuableActions#update`, including preserving existing inconsistent behavior with regards to redirects. Comments added to explain what is happening. - Renames `MarkAsSpamService` to `AkismetMarkAsSpamService` to make it clear that it is specific to Akismet. - Refactors and DRYs up other related areas of logic
Showing
Please register or sign in to comment