Guard::Foreman
This project was originally a fork of [Guard::Unicorn] gdu, but has since diverged significantly.
Guard::Foreman
automatically restarts Foreman using [Guard] gu.
Installation
Using Rubygems:
$ gem install guard-foreman
Using Bundler, you can add this to your Gemfile
, preferably in the development
group:
group :development do
gem 'guard-foreman'
end
Add a sample Guard definition to your Guardfile
:
$ guard init foreman
Guard General Usage
Please read the [guard usage doc] gd in order to find out more about Guard and how to use Guards. There is also [a Railscast about Guard] gc, created by Ryan Bates.
It is recommended that you also install the [ruby-gntp] gntp on Mac OS X, [libnotify] ln on Linux, FreeBSD or Solaris or [rb-notifu] notifu in order to have graphical notifications.
Guardfile for guard-foreman
guard :foreman, procfile: 'Procfile.dev'
Available options (Note: mostly stolen directly from the [Foreman documentation] fd):
-
:log_file
Specify a location to pipe the Foreman logs into. Defaults tolog/foreman.log
-
:concurrency
Specify the number of each process to run. This should be passed in the formatprocess=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] gdu, has a
:bundler
option available for using bundle exec
. I have removed this bit of
functionality as the [Foreman Github page] fgp asks users to not put
Foreman in their Gemfiles.