Project

gem-digest

0.0
The project is in a healthy, maintained state
A CLI tool that parses Gemfile.lock files, fetches latest gem versions from RubyGems, and categorizes updates by semantic versioning (major, minor, patch).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 13.0
~> 3.0
~> 1.21

Runtime

~> 2.0
~> 4.5
~> 0.8
~> 0.12
 Project Readme

💎 Gem Digest

A powerful CLI tool that analyzes your Gemfile.lock, fetches the latest gem versions from RubyGems, and categorizes updates by semantic versioning (major, minor, patch).

🚀 Features

  • Smart Analysis: Parses Gemfile.lock and compares with latest versions from RubyGems
  • Semantic Categorization: Groups updates by major, minor, and patch versions
  • Multiple Output Formats: Console output with colors and tables, or Markdown reports
  • Comprehensive Reporting: Shows current vs latest versions with source information
  • Cross-Platform: Works on Linux, macOS, and Windows

📦 Installation

Add this line to your application's Gemfile:

gem 'gem-digest'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install gem-digest

🛠️ Usage

Basic Analysis

Analyze your current directory's Gemfile.lock:

$ gemd analyze

Advanced Options

# Specify a different Gemfile.lock path
$ gemd analyze --gemfile-lock /path/to/Gemfile.lock

# Generate a markdown report
$ gemd analyze --format markdown --output-dir reports

# Show gems that are already up to date
$ gemd analyze --show-up-to-date

# Verbose output
$ gemd analyze --verbose

Example Output

🔍 Gem Digest Analysis Summary
==================================================
📦 Total gems analyzed: 25
🔴 Major updates available: 3
🟡 Minor updates available: 8
🟢 Patch updates available: 12
✅ Up to date: 2

Major Updates (3)
─────────────────
┌─────────────┬─────────┬────────┬───────────┐
│ Gem         │ Current │ Latest │ Source    │
├─────────────┼─────────┼────────┼───────────┤
│ rails       │ 6.1.7   │ 7.0.4  │ rubygems  │
│ rspec       │ 3.11.0  │ 4.0.0  │ rubygems  │
│ sidekiq     │ 6.5.8   │ 7.0.2  │ rubygems  │
└─────────────┴─────────┴────────┴───────────┘

🏗️ Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Running Tests

$ bundle exec rspec

Code Quality

$ bundle exec rubocop

🤝 Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ND-Zyth/gem-digest.

📄 License

The gem is available as open source under the terms of the MIT License.

🔧 API Reference

GemDigest Module

# Analyze gems programmatically
GemDigest.analyze("path/to/Gemfile.lock", format: "console")
GemDigest.analyze("path/to/Gemfile.lock", format: "markdown", output_dir: "reports")

Classes

  • GemDigest::Analyzer - Parses Gemfile.lock and fetches latest versions
  • GemDigest::Categorizer - Categorizes gems by update type
  • GemDigest::Reporters::Console - Generates colored console output
  • GemDigest::Reporters::Markdown - Generates markdown reports
  • GemDigest::CLI - Command-line interface

🎯 Roadmap

  • Support for private gem sources
  • Changelog integration
  • Security vulnerability detection
  • Custom update policies
  • Integration with CI/CD pipelines