Guard::Foreman

This project was originally a fork of Guard::Unicorn, but has since diverged significantly.

Guard::Foreman automatically restarts Foreman using Guard.

Installation

NOTE: Guard::Foreman is not yet finished! In fact, it's hardly begun. I'll update here when I have finished it.

group :development
  gem 'guard-foreman'
end

Add a sample Guard definition to your Guardfile:

$ guard init foreman

Guard General Usage

Please read the guard usage doc in order to find out more about Guard and how to use Guards. There is also a Railscast about Guard, created by Ryan Bates.

It is recommended that you also install the ruby-gntp on Mac OS X, libnotify on Linux, FreeBSD or Solaris or rb-notifu in order to have graphical notifications.

Guardfile for guard-foreman

guard :foreman, profile: 'Profile.dev'

Available options (Note: mostly stolen directly from the Foreman documentation):

  • :log_file Specify a location to pipe the Foreman logs into. Defaults to log/foreman.log
  • :concurrency Specify the number of each process to run. This should be passed in the format process=num,process=num
  • :env Specify one or more .env files to load
  • :procfile Specify an alternate Procfile to load
  • :port Specify which port to use as the base for this application. Should be a multiple of 1000.
  • :root Specify an alternate application root. This defaults to the directory containing the Procfile.

NOTE: The parent project of Guard::Foreman, Guard::Unicorn, has a :bundler option available for using bundle exec. I have removed this bit of functionality as the Foreman Github page asks users to not put Foreman in their Gemfiles.