Skip to content

Upgrading to Guard 2.0

Rémy Coutable edited this page Sep 5, 2013 · 12 revisions

This is a WIP, please not edit. Thanks, @rymai.

Guard 2.0 comes with several API changes (the majority is backward-compatible, but not all).

Guard::Guard deprecated in favor of Guard::Plugin

To remove the confusion between Guard and its many plugins (guard-rspec, guard-pow, guard-livereload etc.), Guard::Guard is renamed Guard::Plugin. Guard::Guard is deprecated so if you're a plugin maintainer, in your next major release you should make your plugin inherit from Guard::Plugin instead of Guard::Guard.

For instance, for guard-bundler:

module Guard
  class Bundler < Guard
    # implementation
  end
end

should become:

module Guard
  class Bundler < Plugin
    # implementation
  end
end

Clone this wiki locally