One of the key features of the upcoming JIRA 5 release is the revamped REST API. This API gives you full access to creating, reading, updating, and deleting issues as well as other metadata related to issues.

REST APIs provide for an easy and lightweight way to integrate with other apps using basic HTTP and JSON libraries. However, some developers might find it more useful to work on a client library that has a tighter interface to these REST APIs. Our friends at Trineo decided to build a RubyGem that does just that.

Trineo’s jira-ruby gem was built just for JIRA 5’s REST API. It abstracts much of the boilerplate code that every developer has to deal with including OAuth. Here’s a sample of how to use the gem:

client = JIRA::Client.new(CONSUMER_KEY, CONSUMER_SECRET)

project = client.Project.find('SAMPLEPROJECT')
project.issues.each do |issue|
puts "#{issue.id} - #{issue.summary}"
end

issue.comments.each {|comment| ... }

comment = issue.comments.build({'body':'My new comment'})
comment.save
comment.delete

It’s a great gem for working with JIRA 5. The best part is it’s open source, so feel free to fork it and send Trineo some new features.