Skip to content

Commit

Permalink
fail if did not got version, resolves part of #39
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Oct 3, 2014
1 parent 0749e5f commit 74df71b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Metrics/CyclomaticComplexity:
Max: 10

Metrics/MethodLength:
Max: 20
Max: 25

Metrics/PerceivedComplexity:
Max: 8
Expand Down
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

* 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)
Expand Down
2 changes: 2 additions & 0 deletions lib/image_optim/bin_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74df71b

Please sign in to comment.