Skip to content
CAI
Software that uses CAICheck a score

sferik/twitter-ruby

71.4

Strong · 14 November 2026

8.1k

lines of production code

Ruby

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add RBS type signatures for the Twitter gem

Added a new RBS signature file (\sig/twitter.rbs\) that defines type annotations for the Twitter gem, including classes like \Base\, \Identity\, \RateLimit\, \Factory\, and \Error\, as well as modules for versioning and utilities. This enables static type checking for code interacting with the Twitter gem.

sig · high confidence

Add entity-relationship diagram for the Twitter library

The \etc/\ directory now includes an entity-relationship diagram (ERD) visualizing the class hierarchy of the Twitter library. This is provided as a source Graphviz DOT file (\erd.dot\), a Ruby script (\erd.rb\) to regenerate the diagram from the live codebase, and a pre-rendered SVG file (\erd.svg\) for immediate viewing.

etc · high confidence

Add support for Twitter Direct Message welcome messages

Users can now interact with Twitter Direct Message welcome messages through new model classes. The library introduces \Twitter::DirectMessages::WelcomeMessage\ to represent the message content (including text and name) and \Twitter::DirectMessages::WelcomeMessageRule\ to handle associated rules. Wrapper classes (\WelcomeMessageWrapper\ and \WelcomeMessageRuleWrapper\) are provided to parse API responses, automatically handling timestamp conversion and URL expansion within the message text.

_lib/twitter/direct\messages · high confidence

Add support for Twitter animated GIF, video, and video metadata media entities

Users can now access animated GIFs, videos, and associated video metadata from Twitter timelines. This change introduces new model classes—\Twitter::Media::AnimatedGif\, \Twitter::Media::Video\, and \Twitter::Media::VideoInfo\—alongside an updated \Twitter::Media::Photo\ class. These classes expose attributes such as \type\, \indices\, \sizes\, and for videos, \video\_info\ (containing aspect ratio, duration, and variants), allowing applications to programmatically interact with rich media content.

lib/twitter/media · high confidence

Added welcome message and rule management for Direct Messages

Users can now create, update, retrieve, and delete Twitter Direct Message welcome messages and their associated rules. This change introduces the \WelcomeMessages\ module within the \lib/twitter/rest/direct\_messages\ directory, providing methods such as \create\_welcome\_message\, \update\_welcome\_message\, \destroy\_welcome\_message\, \welcome\_message\, \welcome\_message\_list\, \create\_welcome\_message\_rule\, \destroy\_welcome\_message\_rule\, \welcome\_message\_rule\, and \welcome\_message\_rule\_list\ to interact with the Twitter API endpoints for welcome message management.

_lib/twitter/rest/direct\messages · high confidence

Introduce new Twitter gem core classes and modules

The lib/twitter directory now includes a comprehensive set of new classes and modules that form the foundation of the library's object model and request handling. This adds support for parsing tweet entities (hashtags, media, URLs, user mentions), handling geographic data (points, polygons, results), managing pagination via cursors, and processing direct messages and events. It also introduces a new Client class for authentication, a robust Error hierarchy mapping HTTP status codes to specific exceptions, and utilities for argument parsing and object creation.

lib/twitter · high confidence

Removals

Removal of legacy Twitter gem versions 0.0.1 and 0.0.2

The \pkg/twitter-0.0.1\ and \pkg/twitter-0.0.2\ directories have been completely removed from the repository. This deletion eliminates the legacy Ruby gem codebase, including its command-line interface, API client logic, and associated build scripts (Rakefile, setup.rb), effectively cleaning up the project history.

pkg, pkg/twitter-0.0.1, pkg/twitter-0.0.2 · high confidence

Architecture

Restructure REST API into modular components

The Twitter REST client has been refactored from a single monolithic class into a modular architecture. The \Twitter::REST::Client\ now includes the \Twitter::REST::API\ module, which aggregates distinct feature modules such as \AccountActivity\, \DirectMessages\, \Favorites\, \FriendsAndFollowers\, \Lists\, \OAuth\, \PlacesAndGeo\, \PremiumSearch\, and others. This change organizes the API surface into separate files (e.g., \lib/twitter/rest/account\_activity.rb\, \lib/twitter/rest/direct\_messages.rb\) while maintaining the same public interface for users interacting with the client.

lib/twitter/rest · high confidence

Behavioural changes

Added setup and console scripts; removed legacy twitter binary

The project now includes bin/setup to install dependencies via Bundler and bin/console to launch an IRB session with the gem loaded, facilitating easier development and experimentation. The previous bin/twitter executable, which served as the legacy command-line interface, has been removed.

bin · high confidence

Introduce dedicated entity classes for hashtags, symbols, URIs, and user mentions

The library now provides specific entity classes (Hashtag, Symbol, URI, UserMention) under the Twitter::Entity namespace to represent tweet components. Hashtag and Symbol entities expose a \text\ attribute containing the content without the leading symbol (\# or $). URI entities now explicitly distinguish between the raw \uri\ and the \expanded\_uri\ via dedicated accessors, while UserMention entities provide \id\, \name\, and \screen\_name\ attributes for mentioned users. This change structures entity data into distinct types rather than generic hashes or strings.

lib/twitter/entity · high confidence

Introduce new Twitter::Streaming::Client with modern HTTP handling

The streaming API client has been rewritten to use the HTTP gem v6 and a custom TCP/SSL connection layer, replacing the previous implementation. This new client supports all standard streaming endpoints (filter, firehose, sample, site, user) and introduces dedicated object types for streaming events, including DeletedTweet, Event, FriendList, and StallWarning. Users can now inject custom TCP/SSL socket classes for advanced connection control, use a before\_request callback, and explicitly close streams. The change also replaces the Addressable library with Ruby's standard URI for query string building and uses the llhttp parser for response parsing.

lib/twitter/streaming · high confidence

Major library restructuring and API modernization

The library has been completely refactored to replace the legacy authentication and request handling with a modern, modular architecture. The old class-based interface using email/password has been removed in favor of a new \Twitter::REST::Client\ and \Twitter::Streaming::Client\ that support OAuth and provide a more consistent, class-like interface. The codebase now explicitly requires many more specific components (such as \cursor\, \entity\, \geo\_factory\, \media\_factory\, and various direct message wrappers) and relies on the standard library \uri\ instead of external gems like \addressable\ or \mash\. This change represents a significant behavioral shift for users, requiring them to update their initialization code to use the new client classes and OAuth credentials rather than the previous simple username/password approach.

lib · high confidence

Project build, linting, and testing toolchain overhaul

The project has replaced the legacy Hoe-based build system with a modern, Bundler-managed workflow. The Rakefile now integrates RuboCop and StandardRB for linting, Minitest for testing, Mutant for mutation testing, and Steep for static type checking. Configuration files have been added for these tools (\.rubocop.yml\, \.standard.yml\, \.mutant.yml\, \.rspec\, \.yardopts\), and the old \setup.rb\ and \Manifest.txt\ files have been removed in favor of a \.gitignore\ and \Steepfile\.

(repo-wide) · high confidence

Removed generated RDoc documentation from version control

The generated RDoc HTML documentation files for the Twitter library classes (including Base, Command, and EasyClassMaker) have been removed from the repository. This change cleans up the version control history by excluding static, auto-generated documentation artifacts, which are no longer tracked in the \doc\ directory.

doc, doc/files · high confidence

Test coverage

Added test fixtures for account activity, media uploads, and direct messages; Expanded test coverage for Twitter API client and data models; New test infrastructure with Minitest and WebMock integration.

Dependencies

Update runtime dependencies and development tooling

The gem's runtime dependencies have been updated to use the HTTP gem version 6.0, simple\_oauth 1.0, and URI 1.1, while development dependencies now include RBS 4, Steep 2, and RuboCop 1.82.1. The project also enforces a minimum Ruby version of 3.3.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 72 → 71 (-0.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 99 → 98 (-0.2)
  • Architecture 84 → 98 (+13.9)
  • Maturity 65 → 65 (+0.0)
  • Readiness 70 → 70 (+0.0)
  • Security 81 → 71 (-9.5)

Resolved (2)

  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion

New (5)

  • Edited copies of one member (3 members, 4+ corresponding lines) (lib/twitter/media/photo.rb)
  • Edited copies of one member (3 members, 6+ corresponding lines) (lib/twitter/cursor.rb)
  • Edited copy of a member (3 corresponding lines) (lib/twitter/rest/direct_messages.rb)
  • Edited copy of a member (3 corresponding lines) (lib/twitter/rest/users.rb)
  • Off-boarding risk: anonymized user #1

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

  • .github/workflows — 6 commits
  • (root) — 1 commit

Notable commits

  • change: Bump ruby/setup-ruby from 1.329.0 to 1.331.0
  • change: Bump ruby/setup-ruby from 1.331.0 to 1.332.0
  • change: Bump ruby/setup-ruby from 1.332.0 to 1.334.0
  • change: Bump ruby/setup-ruby from 1.334.0 to 1.335.0
  • change: Bump ruby/setup-ruby from 1.335.0 to 1.336.0
  • change: Bump ruby/setup-ruby from 1.336.0 to 1.338.0
  • change: Load the version file with require_relative

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

sferik/twitter-ruby was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 793e735693855003512a3757d2e58b459b07e169 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.