Integrates the Heroku CLI into nib
with the idea of allowing for a similar API for tasks like viewing logs or creating REPL shell. For example:
# access logs in development as usual
nib logs web
# access production logs
nib logs -e production web
Install the gem on your machine globally:
gem install nib-heroku
Heroku CLI
is used to interact with Heroku.
- The name of the local folder matches the name of an application on Heroku with the insertion of environment.
- Environments are abbreviated as
dev
,stage
,prod
For example:
Local directory: my-awesome-app
Heroku app name: my-prod-awesome-app
These conventions match a pattern we use internally at Technekes where the first part is a token for the owner of a project (ie. internal or client) and the later part is the name of the project. The insertion of environment after the owner token helps with application lists and billing sorting.
nib-heroku
mostly relies on an installed and authenticated instance of the Heroku CLI as well as previously mentioned conventions.
"Follow" (not tail!) the production logs.
nib logs -f -e production web
Start up a bash session in the production environment:
nib shell -e production web
After pulling down the repo build an image and use Guard to facilitate running specs and RuboCop.
nib build
nib guard gem
Bug reports and pull requests are welcome on GitHub at https://github.com/technekes/nib-heroku.
The gem is available as open source under the terms of the MIT License.