# varvet/pundit

Minimal authorization through OO design and pure Ruby classes

Repository: https://github.com/varvet/pundit
Canonical: https://ross.abutalabs.com/products/pundit
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby
Last push: 2026-08-02T10:26:35+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 95, release rhythm 35, longevity 100
- inputs: {"age_days": 5050, "days_push": 31, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8522, forks 641 (observed 2026-08-28T04:10:23.320104+00:00)

## What it is
Pundit is a Ruby gem that provides minimal authorization for Rails applications using plain Ruby policy classes and object-oriented design. It maps controller actions to policy query methods to decide what a user is permitted to do.

## Use cases
- authorize user actions in a rails app
- build role-based access control with plain ruby classes
- restrict which records users can update or delete
- scope database queries based on user permissions
- add per-model policy classes to a web application
- replace complex authorization gems with simple OO policies

## When to choose
- you use Rails or Rack-based Ruby apps and want lightweight, transparent authorization
- you prefer plain Ruby objects over DSL-based authorization rules
- you want policy logic that is easy to unit test
- your authorization needs are straightforward and model-centric

## When to avoid
- you need complex rule engines, DSLs, or centralized configuration like CancanCan or declarative authorization
- you are not working in Ruby or a Rack-based framework
- you need fine-grained attribute-level or row-level security handled at the database layer

## Facets
- artifact type: library
- maturity: stable
- function: auth, authorization, middleware
- domain: web-development, backend, security, developer-tools
- platform: ruby
- tags: ruby-gem, rails, policy-objects, object-oriented-design, access-control, web-server

## Member repositories
- varvet/pundit (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.320104+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:26:40.588808+00:00, confidence not recorded.
  - readme: https://github.com/varvet/pundit (fetched 2026-08-28T04:10:23.320104+00:00, sha 00fd35ecee54)
- Data as of 2026-08-30T08:39:29.467469+00:00.
