Simplify Image Processing Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Replace obsolete image adapter selection with one mandatory ImageMagick implementation.
Architecture: Keep EasyExtensions::ImageProcessing as public facade and implementation. Remove inactive RMagick/MiniMagick paths while preserving ImageMagick commands and error contracts.
Tech Stack: Ruby 4, Rails 8, kt-paperclip, ImageMagick, RSpec
Task 1: Lock desired module contract
Files:
- Create: spec/utils/easy_extensions/image_processing_spec.rb
- Delete: spec/utils/easy_extensions/image_processing/adapters/imagemagick_adapter_spec.rb
- [ ] Write specs covering direct module methods, command delegation, and error mapping.
- [ ] Run focused spec and confirm failure from existing adapter API.
Task 2: Collapse implementation
Files:
- Modify: app/utils/easy_extensions/image_processing.rb
- Delete: app/utils/easy_extensions/image_processing/adapters/imagemagick_adapter.rb
- Delete: app/utils/easy_extensions/image_processing/adapters/rmagick_adapter.rb
- [ ] Move ImageMagick implementation into public module.
- [ ] Run focused spec and confirm pass.
Task 3: Remove obsolete fallback integration
Files:
- Modify: lib/redmine/thumbnail.rb
- Modify: lib/redmine/export/pdf.rb
- Modify: lib/redmine/export/pdf/issues_pdf_helper.rb
- Modify: easy_engines/easy_extensions/easy_patch/paperclip/thumbnail_patch.rb
- Modify: easy_engines/easy_extensions/easy_patch/paperclip/geometry_patch.rb
- Modify: lib/redmine.rb
- Modify: app/controllers/admin_controller.rb
- [ ] Remove dead missing-adapter rescues.
- [ ] Remove MiniMagick optional loading and admin check.
- [ ] Run focused specs and RuboCop.
- [ ] Search for stale runtime references and inspect final diff.