fix: ChunkyPNG median filter bug + remove SVN support#169
Conversation
The method existed but raised NotImplementedError, causing supports?(:filter_image_with_median) to return true incorrectly. Removing the method lets supports? return false naturally. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves unused/incorrect features: drops SVN-based VCS support in favor of always using Git for screenshot diffs, and deletes an unimplemented median filter hook from the ChunkyPNG driver so capability detection reflects reality. Sequence diagram for Git-only screenshot checkout flowsequenceDiagram
actor TestRunner
participant ScreenshotDiff as ScreenshotDiff
participant Vcs as Vcs
participant Git as GitRepository
TestRunner->>ScreenshotDiff: request_diff(old_screenshot, new_screenshot)
ScreenshotDiff->>Vcs: checkout_vcs(project_root, screenshot_path, checkout_path)
Vcs->>Git: restore_git_revision(screenshot_path, checkout_path, root)
Git-->>Vcs: previous_version_copied
Vcs-->>ScreenshotDiff: checkout_completed
ScreenshotDiff-->>TestRunner: diff_result
Updated class diagram for Vcs and ChunkyPngDriverclassDiagram
class Capybara_Screenshot_Diff_Vcs {
<<module>>
+String SILENCE_ERRORS
+checkout_vcs(root, screenshot_path, checkout_path)
+restore_git_revision(screenshot_path, checkout_path, root)
}
class Capybara_Screenshot_Diff_Drivers_ChunkyPngDriver {
<<class>>
+load_images(old_file_name, new_file_name)
+add_black_box(image, region)
}
Capybara_Screenshot_Diff_Vcs <.. Capybara_Screenshot_Diff_Drivers_ChunkyPngDriver : used_by
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 46 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
0034187 to
aa7b06d
Compare
No Ruby projects have used SVN since ~2015. Removes 25 lines of dead code including svn info parsing and pristine file lookup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a65ec47 to
9294bd5
Compare
Single method, no delegation. The SVN branch is gone so checkout_vcs no longer needs to dispatch. Updated 3 callers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
filter_image_with_mediandefined but raisedNotImplementedError, makingsupports?returntrueincorrectly. Removed the method sosupports?returnsfalsenaturally.Test plan
🤖 Generated with Claude Code
Summary by Sourcery
Remove unused SVN support code and align the ChunkyPNG driver API by dropping an unimplemented median filter method.
Bug Fixes:
Enhancements: