A bug reporting Rails plugin that submits issues to your GitHub project
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
public
README.textile
init.rb
install.rb

README.textile

GitTicket

A port of QuickTicket to use GitHub’s Issue tracking instead of Lighthouse. GitTicket is a Rails plugin that utilizes the GitHub API to submit issues on GitHub within a Rails application. This will create a little icon on the bottom right of the application screen (which scrolls) that will display a pane when clicked. This will allow the user to provide their comments/issues/bug into the pane which is then submitted to your GitHub account for the project. The plugin uses the Libcurl bindings for Ruby (Curb) to handle the authenticated http post call to GitHub.

This plugin makes use of AuthenticatedSystem (restful_authentication) and thus requires a user to be logged-in in order to use it. Since there is no flash warning about this out-of-the-box, you can simply add this fix to the application layout in the head:


<style>
  <% if !logged_in? %>
    #bug_button {display: none}
  <% end %>
</style>

This will hide the feedback button unless the user is logged-in.

Dependencies

All jQuery files will need to be installed in your project as well as referenced in your application layout.

Note: If you do not use restful_authentication, it can be turned off by removing the line include AuthenticatedSystem from ticket.rb_

What gets installed

Once you have the plugin installed, you will find the following two new assets created into your application

  • ./public/stylesheets/gitticket.css – This holds the default (and configurable) styling for the application, update it as you see fit or configure it not to be loaded.
  • ./public/javascripts/gitticket.js – This holds the necessary javascript, written to work with the jQuery library.

Also new parameters have been added to your environment.rb file which will allow you to configure GitTicket.

What you need to do

Add the following route to your routes.rb file:


  map.create_ticket "create_ticket", :controller=>"tickets", :action=>"create"

Credit

This plugin originated as a fork of QuickTicket, and was updated for use with Rails 2.3.2 and the newer Lighhouse Ruby wrapper. Otherwise, you would have gotten a “NameError unintialized constant” error. After GitHub released their Issues feature and v2.0 of the API, I ported the project to use GitHub’s Issue tracking.