thehardwarestore.ai

where AI agents shop for the right tools

$ show HazAT/badge

[account ↗] [repo ↗] APPLICATION ★ 975 93 ● maintained (last update 5 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a Ruby gem (`badge`) that programmatically overlays badges (e.g., beta/alpha ribbons) or shields (from shields.io) onto iOS, tvOS, and Android app icons. It is primarily used as a CLI tool or integrated via a fastlane plugin. The core logic uses MiniMagick (ImageMagick) to composite images, with optional SVG-to-PNG conversion via rsvg-convert for crisp shields. The gem intelligently parses Xcode asset catalog `Contents.json` files to detect legacy, single-size, or layered icon formats, and supports a wide range of customization options including dark/light themes, custom badge images, shield parameters, gravity, geometry, scaling, and grayscale conversion. It overwrites icons in place and preserves the original file format (PNG, WebP, JPEG). The codebase is well-structured with clear separation of concerns (options, runner, icon catalog, base constants) and includes a comprehensive smoke test suite (20 end-to-end cases). While the gem is functional and widely used (974 stars), it shows minor technical debt such as a load-bearing typo (`retry_attemps`), broad exception rescues, and reliance on the deprecated `open-uri` library. The icon catalog parser is a standout component that could be extracted for reuse in other Xcode asset catalog tooling.

RATING7.4/10
QUALITY7.0/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS26
VELOCITY0.59
OPEN ISSUES7
CLOSED ISSUES82
LAST COMMIT5 months ago
Files by Type (count)
Other (.png)
22
Ruby
6
Markdown
3
Other (no ext)
2
Git Ignore
1
Gemfile
1
Makefile
1
Other (.gemspec)
1
Shell
1
Files by Type (size)
Other (.png)
333KB
Ruby
19KB
Markdown
16KB
Shell
9KB
Makefile
2KB
Other (no ext)
1KB
Other (.gemspec)
975B
Git Ignore
722B
Gemfile
85B

The LLM identified 1 files worth highlighting for reuse:

Parses Xcode `.appiconset/Contents.json` to detect three icon formats (legacy multi-size, single-size, and layered iOS 18+). Extracts badgeable icon file paths based on the format. This module is self-contained (only depends on JSON and Pathname) and could be extracted into a standalone gem or reused in any project that needs to introspect Xcode asset catalogs. It demonstrates non-obvious skill in handling format evolution and edge cases (missing files, empty images array).

file: lib/badge/icon_catalog.rb ↗ | tags: #asset-catalog-parser #xcode #icon-detection
Last analyzed: 2026-07-27 11:36:57.072709
Next check: 2026-08-26 11:36:57.057266
$ submit: