Skip to content

Commit

Permalink
fix capturing wrong version of pngcrush when it complains about diffe…
Browse files Browse the repository at this point in the history
…rent png.h and png.c, resolves #122
  • Loading branch information
toy committed Feb 21, 2016
1 parent 0b76eb3 commit 5c91cbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unreleased

* Fix capturing wrong version of `pngcrush` when it complains about different png.h and png.c [#122](https://github.com/toy/image_optim/issues/122) [@toy](https://github.com/toy)
* Add support for `sprockets-rails` 3.x, kudos to [@iggant](https://github.com/iggant) and [@valff](https://github.com/valff) for initial PRs [#120](https://github.com/toy/image_optim/pull/120) [#121](https://github.com/toy/image_optim/pull/121) [#126](https://github.com/toy/image_optim/pull/126) [@toy](https://github.com/toy)
* Use rubocop ~> 0.37 [@toy](https://github.com/toy)

Expand Down
2 changes: 1 addition & 1 deletion lib/image_optim/bin_resolver/bin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def version_string
when :jpegtran
capture("#{escaped_path} -v - 2>&1")[/version (\d+\S*)/, 1]
when :pngcrush
capture("#{escaped_path} -version 2>&1")[/\d+(\.\d+){1,}/]
capture("#{escaped_path} -version 2>&1")[/pngcrush (\d+(\.\d+){1,})/, 1]
when :pngout
date_regexp = /[A-Z][a-z]{2} (?: |\d)\d \d{4}/
date_str = capture("#{escaped_path} 2>&1")[date_regexp]
Expand Down

0 comments on commit 5c91cbc

Please sign in to comment.