Skip to content

Add regexp_pattern checker to moderate#1

Open
killondark wants to merge 2 commits into
rameerez:mainfrom
killondark:add-regexp_pattern-checker-to-moderate
Open

Add regexp_pattern checker to moderate#1
killondark wants to merge 2 commits into
rameerez:mainfrom
killondark:add-regexp_pattern-checker-to-moderate

Conversation

@killondark

Copy link
Copy Markdown

Hi, @rameerez. I added feature regexp_pattern matching. Check it please.
Also I looked at your projects(I have read usage_credits and moderate), they are cool, but why no tests?

@thubamamba

Copy link
Copy Markdown

This PR is actually good. The gem itself has so much potential.

rameerez added a commit that referenced this pull request Jun 2, 2026
…taxonomy, turnstile auto-integration, host-chosen mount + form prefill/lock

#1 External classifiers are no longer shipped/loaded or implied deps: deleted the inline OpenAI (Net::HTTP) + image adapters; :wordlist is the only built-in; OpenAI (via ruby_llm) and AWS Rekognition are copy-and-register REFERENCE adapters in examples/. Dropped the Moderate::Adapters alias namespace.

#2 Taxonomy moved from DB check-constraints to frozen model constants + ActiveModel inclusion validations (category host-overridable via config.report_categories); migrations keep only structural constraints (NOT NULL, unique block index, self-block, FKs, message length).

#3 The public DSA notice form auto-detects rails_cloudflare_turnstile (widget + server verify) when present, with a config.notice_guard no-op fallback — no ENV/config needed.

#4 Engine routes are relative; the HOST chooses the mount point (no hardcoded /legal). The notice form prefills from X-style query params (content_url/author/id) + Devise current_user, locks the auto-prefilled identity fields, and keeps reported-content fields editable.

Suite green: 176 runs, 692 assertions, 0 failures (line 89% / branch 69%). Zero host (CarHey/ride) references.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants