follmann / middleman-favicon-maker

Generate favicon files in various sizes from a base image in your middleman project
MIT License
114 stars 15 forks source link

Can't call builder.trigger with nil second param in new MM #36

Closed cpence closed 8 years ago

cpence commented 8 years ago

Doing so gives the following contract violation:

/Users/pence/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/contracts-0.12.0/lib/contracts.rb:48:in `block in <class:Contract>': Contract violation for argument 2 of 3: (ParamContractError)
        Expected: (String or Pathname),
        Actual: nil
        Value guarded in: Middleman::Builder::trigger
        With Contract: Symbol, Or, Maybe => Any

Looks like it's coming from right here.

From the original method, it looks like you should be passing in the file path as the second parameter, and maybe nothing at all for the third parameter. (It looks optional, given the way that other MM methods call Builder#trigger.)

follmann commented 8 years ago

Just released version 4.0.3 that includes the fix. Thanks for reporting!