Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Guard::Haml#notify fails when used with guard-jekyll-plus #27

Closed
mhw opened this Issue · 2 comments

2 participants

@mhw

I was getting a

NoMethodError: undefined method `run_on_changes' for #<Guard::Jekyllplus:0x007f99dbf28970>

error on startup, which I traced to Guard::Haml#notify. run_on_changes is an optional part of the Guard API - if you implement run_on_additions, run_on_modifications and run_on_removals you don't need to implement run_on_changes

The broader question is why Guard::Haml thinks it needs to notify other guards - that's guard's job. Hence this workaround in my Guardfile:

::Guard::Haml.class_eval do
  def notify(changed_files)
  end
end

Note: I tripped over this with guard-haml version 0.5, as that's the version pulled in when using jekyll 1.5.1. The issue still exists in HEAD though.

@rymai
Owner

You're totally right, I've tracked this change down to 054e7d6 but couldn't find any reason why this was added. I will remove this since Guard plugins's methods (including run_on_changes) are not part of the public API.

Thanks for the report!

@rymai rymai closed this in effc866
@rymai
Owner

Version 1.1.2 released, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.