Create CODE_OF_CONDUCT.md - #4
Merged
Merged
Conversation
pftg
added a commit
that referenced
this pull request
Aug 22, 2026
Extends the existing DriverContractTests shared module (test/support/driver_contract_tests.rb) with tests that pin the current de-facto driver interface shared by ChunkyPNGDriver and VipsDriver, run against both via the shared module: - method presence/arity for the ~15-method shared surface (load_images, add_black_box, find_difference_region, crop, from_file, save_image_to, resize_image_to, draw_rectangles, same_pixels?, same_dimension?, height_for, width_for, image_area_size, dimension, supports?) - load_images behavior (loads both images, dimensions comparable) - find_difference_region result shape (Difference exposing region/meta/comparison) - dimension handling (same_dimension? true/false, width/height/dimension/area_size agreement) - same-image fast paths (same_pixels? true/false) - option handling: tolerance, color_distance_limit, skip_area (both drivers support these identically; thresholds chosen with headroom on both drivers' measured values) - error behavior on missing base/new image files (ArgumentError) No production code changed. No driver method renames (dissent #4 in the v2 architecture design excludes those from this PR).
pftg
added a commit
that referenced
this pull request
Aug 22, 2026
* refactor: extract SnapDiff::Driver mixin from BaseDriver BaseDriver's shared defaults (same_dimension?, dimension, width_for, height_for, image_area_size, supports?, PNG_EXTENSION) move verbatim into the SnapDiff::Driver module; BaseDriver becomes a shell that includes it. Behavior-preserving; method names unchanged (v2 design dissent #4). * refactor: move concrete drivers to SnapDiff::Drivers, include Driver mixin VipsDriver and ChunkyPNGDriver move to lib/snap_diff/drivers/ with 'include SnapDiff::Driver' replacing '< BaseDriver'. Class and method names unchanged (v2 design dissent #4). Old namespace forwards same-object: Drivers is a whole-module alias (covering .for and the lazily-required driver constants), BaseDriver aliases the mixin, and the old driver require paths stay loadable. Utils.find_driver_class_for now requires/returns the SnapDiff paths. Namespace forwarding test gains the 4 new pairs (25 total), vips pair skipping on vips-less runners. * test: rescue RuntimeError in vips-less forwarding guard (review F1) vips_driver.rb re-raises the missing-gem LoadError as RuntimeError, so the LoadError-only rescue let a vips-less run crash at file load instead of skipping the vips pairs.
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.