Divide

Gem Version

Start Procfile processes in different Terminal/iTerm tabs.

I’m well aware of foreman, but it starts all processes in the same tab which can be inconvenient.
I’m well aware of tmux, but obviously not everyone’s using it (if you do, check out teamocil).

Usage

$ gem install divide
$ divide

Options

Divide is option-free. You may however overwrite any options of your Procfile processes by passing them to divide.

# Procfile
web: bundle exec unicorn -c ./config/unicorn.rb
$ divide -c ./another_folder/unicorn.rb
# => bundle exec unicorn -c ./another_folder/unicorn.rb

ENV

Divide automatically loads .env file and overwrite any $VARIABLE of your processes.

# .env
PORT=1337
RACK_ENV=development
# Procfile
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb -E $RACK_ENV
$ divide
# => bundle exec unicorn -p 1337 -c ./config/unicorn.rb -E development

$PORT

If you don’t specify a port, Divide will overwrite $PORT with 5000.

# Procfile
web: bundle exec rails s -p $PORT
$ divide
# => bundle exec rails s -p 5000

Changelog

0.1.3

  • Add :from option

0.1.2

  • Ignore .env file comments

0.1.1

  • Always open an empty tab after all processes are executed

0.1.0

  • iTerm opens new processes into split panes (see 85bc235)
  • Make sure all the options are being replaced

0.0.3

  • Fix bug when there are double quotes in Procfile

0.0.2

  • iTerm.app support
  • Automatically load .env file
  • Open new tabs in current directory

Contributing

Why yes! You’re welcome to submit any issue or pull request as long as everything’s green when you bundle exec rake spec. Meanwhile, you can give these folks a tap on the back for helping out:

License

Copyright © 2013 Etienne Lemay. See LICENSE for details.