💎 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

🏗️ 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