Project

gittyup

0.0
No commit activity in last 3 years
No release in over 3 years
New users to git and Heroku sometimes have trouble with the syntax of the git commands required to deploy an application to Heroku. This wrapper combines the git add, commit, and push commands needed. The command has no arguments. The user is prompted for a commit message. The wrapper contains no error handling, so the user will receive errors from git.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5.1
 Project Readme

Gem Version

introduction

New users to git and Heroku sometimes have trouble with the syntax and arguments of the git commands required to deploy an application to Heroku. This wrapper combines the git add, commit, and push commands.

The command has no arguments. The user is prompted for a commit message. The wrapper contains no error handling, so the user will receive standard errors from git.

installation

If you have a Gemfile, add gittyup. Otherwise, install it like this:

$ gem install gittyup

usage

typical usage:

$ gittyup
enter commit message (blank to exit)> New site title
[master 318bd11] New site title
 1 files changed, 2 insertions(+), 0 deletions(-)

wait for push to start, then

lots of messages from Heroku

until the push ends like this

To git@heroku.com:awesomeproject.git
   13f987c..aceaf78  master -> master
$

detailed operation

All code is in bin/gittyup. An error from any system command causes the script to exit.

Since the script is designed for beginning users, it assumes you are committing to and pushing the master branch. If you know enough to have multiple branches, you probably don't need this script.

The script performs these steps:

  1. git status If this command fails, the current directory is probably not a git repository.
  2. git status If this command provides no output, then there are no changed files to commit.
  3. git add --all Add new, changed, and removed files to the index.
  4. Prompt the user for a commit message. If no message is entered, the script exits.
  5. git commit --message <message> Record changes to the repository.
  6. git push heroku master Deploy the updated repository to Heroku.

For every system command performed, the exit status of the operation is passed back via exit $?.exitstatus. That status is used by the tests.

tests

A nicely formatted test suite is available at Relish.

To run the tests:

    $ cd gittyup
    $ bundle
    $ rake

contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request