Blog by Railsware

Command line interface for hoptoad

We are trying to build a better development workflow in Railsware by connecting all our tools together.
So, this time we tried to connect HopToad Application with git commits. This idea was resulted in the command line interface for hoptoad api with a little git integration – Shelltoad.

Currently when the new error arrives, we do the following:

# Check the list of errors

 $ shelltoad [#3374331] production ActionController::MethodNotAllowed: Only put requests are allowed [#4023713] production ActiveRecord::StatementInvalid: PGError: ERROR: duplicate key value violates unique constraint "index_companies_on_slug" : INSERT INTO "companies" ..... 

# View the information on the required error. # ‘713’ is automatically guess for 4023713

 $ shelltoad 713 ActiveRecord::StatementInvalid: PGError: ERROR: duplicate key value violates unique constraint "index_companies_on_slug" : INSERT INTO "companies" ("slug", "created_at", "title", "updated_at", "external_url", "logo_id", "custom") VALUES('abbott-associates /var/data/www/apps/startwire/shared/bundle/ruby/1.8/gems/activerecord- 2.3.8/lib/active_record/connection_adapters/abstract_adapter.rb:221 /var/data/www/apps/startwire/releases/20110218113457/app/models/company.rb:50 /var/data/www/apps/startwire/releases/20110218113457/app/utils/network_map/populate.rb:9 /var/data/www/apps/startwire/releases/20110218113457/app/utils/network_map/populate.rb:74 /var/data/www/apps/startwire/releases/20110218113457/app/utils/network_map/populate.rb:70 .... 

# Fix the error in the code …

# Prepare git commit

 $ git add . 

# Commit the fix to git with connection to hoptoad issue id

 $ shelltoad commit 713 [dev 47f09ec] http://xxx.hoptoadapp.com//errors/4023713 1 files changed, 1 insertions(+), 1 deletions(-) 

Commit message will look like this:

http://startdatelabs.hoptoadapp.com//errors/4023713 ActiveRecord::StatementInvalid: PGError: ERROR: duplicate key value violates unique constraint "index_companies_on_slug" : INSERT INTO "companies" ("slug", "created_at", "title", "updated_at", "external_url", "logo_id", "custom") VALUES('abbott-associates

This help us maintain the links between git and hoptoad automatically.

Exit mobile version