Ruby gem created by Yatish Mehta to support Fine-Grained Authorization in Rails apps. On install it adds a migration and model to store tuples. Users define an authorization schema in an initializer: declare resource types (user, team, project, task, …), declare relationships between them (member, admin, editor, creator, …), and then define permissions using an include_any / include_all DSL that composes relationships and other permissions. The schema is compiled to a graph object that can be queried for dependencies. Application code creates/updates/removes tuples alongside domain changes (e.g. when a user becomes an editor of a project). Permission checks (check_permission / helper methods) walk the graph by id, returning true/false and optionally the path that granted or denied access. Features smart caching with dependency-aware invalidation and reverse lookups (caveat: no pagination yet).