Skip to content

Several updates and new percentage pixel_threshold support

Compare
Choose a tag to compare
@jnormington jnormington released this 21 Mar 19:57
· 5 commits to master since this release

Changelog

Version: 3.0.0

  • Updates the gemspec to allow newer version of rmagick and rmagick4j
  • Simplifies the command wrapper class to only execute the command nothing else
  • Introduces a new comparible module for page and element to do the comparing simplifying the Comparer class considerably, and making unit testing these much more easily
  • Supports percentage pixel threshold, with the support of a new threshold calculator
  • Adds deprecation warning for pixel_threshold configs that don't pass a Hash config, but continues to support current users for backward compatibility
  • Adds a new image container to validate the base and new images are of the same dimensions. Previously compare would have complained - however it appears that newer versions of compare don't error when the base and new image are of differing dimensions meaning that for percentage config, it would incorrectly pass, so this is an additional guard to prevent that.

Development improvements

  • Adds rubocop and linted all code to make consistent for new contributors to use
  • Fixes some random flakey specs due to modifying config state leaking into other specs