Skip to content
CAI
Software that uses CAICheck a score

tomgi/git_stats

43.7

Weak · 20 September 2026

986

lines of production code

Ruby

with JavaScript

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

GitStats is a Ruby gem that analyzes Git repositories to generate static HTML reports detailing project activity and code statistics. It provides a command-line interface and a Ruby API to compute metrics such as author contributions, file changes, and time-based commit trends. The system renders these insights into multi-page, multi-language web views using Highstock for data visualization.

Features

Added localization support for Bulgarian, German, Polish, Spanish, Turkish, and Chinese

The application now supports multiple languages. New locale files have been added for Bulgarian (bg), German (de), Polish (pl), Spanish (es), Turkish (tr), Simplified Chinese (zh), and Traditional Chinese (zh\_tw), including specific date, time, and number formatting defaults for German, Polish, and Traditional Chinese. Users can now view reports and interface elements in these languages.

config · high confidence

GitStats gem initialized at version 1.0.17

The lib/git\_stats directory now contains the full source for the GitStats gem (version 1.0.17), providing a CLI tool to generate repository statistics. Users can generate reports via the \generate\ command, specifying options for the repository path, output directory, language (with I18n support), commit range, and comment string detection. The tool supports silent mode and validates that the target path is a valid git repository.

_lib/git\stats · high confidence

Initial release of GitStats gem with CLI and API

This change introduces the GitStats gem, a tool that browses git repositories and generates HTML statistics pages. It provides a command-line interface (via \git\_stats generate\) with options for specifying repository paths, output directories, commit ranges, and tree scopes, as well as a Ruby API for programmatic access to repository data. The release includes configuration for Travis CI testing across multiple Ruby versions, RSpec for unit testing, and integration test submodules.

(repo-wide) · high confidence

Introduction of the git\_stats CLI entry point

A new executable script named bin/git\_stats has been added to the project. This script initializes the Ruby load path to include the local lib directory and starts the GitStats command-line interface by invoking GitStats::CLI.start with the provided arguments, enabling users to run the tool directly from the command line.

bin · high confidence

New activity and repository data models for commit statistics

The git\_stats library now includes new data classes to structure repository analysis. The \Activity\ class aggregates commit timestamps to provide breakdowns by date, hour, day of week, month, and year, enabling time-based trend charts. The \Repo\ class has been expanded to expose author statistics (including lines added/deleted by author), file and line counts by date, and comment statistics (counting lines starting with \///\), while also supporting optional commit ranges and tree paths for scoped analysis.

_lib/git\_stats/git\data · high confidence

New author activity visualization with time-based breakdowns

The templates now include a new activity view that breaks down author contributions by date, hour of day, day of week, hour of week, month, year, and year-month. This is implemented via a shared partial template that renders specific charts or tables for each time granularity, allowing users to see when commits occurred throughout the week, day, or year. The UI uses Bootstrap 2.1.1 for styling and layout, including responsive design support.

templates · high confidence

New core library extensions for Ruby standard types

This change introduces a new set of core extensions for Ruby's standard library types (Enumerable, Hash, String, and Symbol) within the git\_stats library. Enumerable gains a first! method that raises an error if no element matches the block. Hash receives to\_key\_indexed\_array for converting numeric-keyed hashes to arrays, and fill\_empty\_days! to populate missing dates in time-series data with aggregated or zero values. String adds an absolute\_path helper for path resolution, and Symbol adds a t method for internationalization lookups.

_lib/git\_stats/core\extensions · high confidence

New git\_stats module for repository activity and code statistics

The git\_stats feature has been implemented, providing detailed statistics on repository activity and code changes. This includes tracking author contributions (commits, insertions, deletions, and changed lines), file-level metrics (files and lines by extension, date), and activity trends (by hour, day of week, month, and year). The module also supports comment statistics, counting lines beginning with three slashes as documentation comments, and uses the --no-rename option for git statistics to ensure consistent insertion/deletion counts across operating systems.

_git\stats · high confidence

Behavioural changes

Library renamed from Gitstats to GitStats

The library has been renamed from 'Gitstats' to 'GitStats' to avoid conflict with an existing gem. This change involves deleting the original 'lib/gitstats.rb' and 'lib/gitstats/version.rb' files and introducing a new 'lib/git\_stats.rb' entry point that defines the 'GitStats' module and loads its dependencies.

lib · high confidence

Refactored chart generation into dedicated view classes

The chart rendering logic in the stats view has been reorganized into specific classes (ActivityCharts, AuthorsCharts, RepoCharts, and Chart) to improve maintainability. This change introduces new visualizations, including activity breakdowns by hour, day of week, month, and year, as well as author-specific line insertion/deletion trends over time. The underlying chart builder now uses Highstock for date-based series, ensuring that days without commits are correctly represented on timelines rather than being omitted.

_lib/git\_stats/stats\view/charts · high confidence

Refactored stats view to use absolute paths and separate pages

The stats view rendering logic has been refactored to support use as a gem by resolving template paths as absolute paths, ensuring correct file resolution regardless of the working directory. The view now generates separate HTML pages for different sections (general, activity, authors, files, lines, comments) rather than using tabs, and includes specific support for author activity and comment statistics (counting only lines beginning with three slashes). The output directory is automatically created if it does not exist, and static assets are copied to the output path.

_lib/git\_stats/stats\view · high confidence

Test coverage

Added integration tests for Git data analysis; Added test coverage for GitStats data models and repository operations; Added test infrastructure and specifications.

Dependencies

Initial gemspec and dependency configuration for git\_stats

The project introduces the \git\_stats\ gemspec, replacing the previous \gitstats\ gemspec, and defines its runtime and development dependencies. Runtime dependencies include ActionPack and ActiveSupport (4.2), HAML (5.0), i18n (0.8), json\_pure (2.1), lazy\_high\_charts (1.5), Thor (0.20), and Tilt (2.0), with a minimum Ruby version requirement of 1.9.2. Development dependencies are set for factory\_girl (4.7), pry (0.11), rake (12.0), rspec (3.4), and simplecov (0.11). The Gemfile is updated to reference the new gemspec.

(dependencies) · high confidence

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

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 44.

Lenses

  • Code Health 95
  • Architecture 69
  • Maturity 49
  • Readiness 41
  • Security 100
  • Accessibility 32

Changes since last survey

  • 224 commits — 219 feature/other, 5 fixes

By area

  • lib/git_stats — 106 commits
  • (root) — 39 commits
  • (repo) — 35 commits
  • config/locales — 16 commits
  • spec/integration — 7 commits
  • spec/git_data — 4 commits
  • templates/authors — 3 commits
  • bin/git_stats — 2 commits
  • spec/stats_view — 2 commits
  • templates/assets — 2 commits
  • templates/layout.haml — 2 commits
  • lib/gitstats — 1 commit
  • spec/command_observer_spec.rb — 1 commit
  • spec/commit_spec.rb — 1 commit
  • templates/_activity.haml — 1 commit
  • templates/author_details — 1 commit
  • templates/authors.haml — 1 commit

Notable commits

  • fix: Revert "Add files/lines by extension by date"
  • fix: Revert "refactor"
  • fix: activity fix and tests
  • fix: fixed encoding problem with some repositories
  • fix: tests fixed
  • change: #6 Show Lines For Any User
  • change: Add BG Language support
  • change: Add commit range to the CLI
  • change: Add files/lines by extension by date
  • change: Add missing library on install
  • change: Add ruby-dev package to prereq install for ubuntu
  • change: Add utf-8 encoding to layout template
  • change: Added command line option (‚comment‘) for the comment string; default is ‚///‚
  • change: Added comment stats. Only lines beginning with three slashes are counted, since these stats should reflect comments used for documentation, not inline explanations.
  • change: Added german localization.
  • change: Added silent option.
  • change: Adjusted readme with some usage examples.
  • change: Bump to 1.0.0
  • change: Bump to 1.0.1
  • change: Bump to 1.0.10
  • …and 204 more

Architecture

  • 0 containers · 1 bounded contexts · 0 dependency edges (baseline)

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

Survey your own repository

tomgi/git_stats 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 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 89f771ededd37b0684b9a2a627789ff614b5d310 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.