diff --git a/.rubocop.yml b/.rubocop.yml index 684e8e6d..e697bf42 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,7 +12,7 @@ Metrics/CyclomaticComplexity: Max: 10 Metrics/MethodLength: - Max: 20 + Max: 25 Metrics/PerceivedComplexity: Max: 8 diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 41f1a2dd..621d667c 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -2,6 +2,7 @@ ## unreleased +* Fail if version of bin can't be detected [#39](https://github.com/toy/image_optim/issues/39) [@toy](https://github.com/toy) * Check path in `XXX_BIN` to exist, be a file and be executable [@toy](https://github.com/toy) ## v0.16.0 (2014-09-12) diff --git a/lib/image_optim/bin_resolver.rb b/lib/image_optim/bin_resolver.rb index cdcf0b27..cad5622e 100644 --- a/lib/image_optim/bin_resolver.rb +++ b/lib/image_optim/bin_resolver.rb @@ -29,6 +29,8 @@ def to_s end def check! + fail BadVersion, "didn't get version of `#{self}`" unless version + is = ComparableCondition.is case name when :pngcrush