This gem provides access to the Atlassian JIRA version 5 REST API (a.k.a REST API version 2) using HTTP Basic Auth. If you want OAuth instead, please have a look at the original repo at github.com/trineo/jira-ruby.
client = JIRA::Client.new({ :site => URL, :username => USERNAME, :password => PASSWORD }) 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
On Mac OS,
brew install atlassian-plugin-sdk
Otherwise:
-
Download the SDK from developer.atlassian.com/ (You will need an Atlassian login for this)
-
Unpack the dowloaded archive
-
From within the archive directory, run:
./bin/atlas-run-standalone --product jira --version 5.0-rc2
Once this is running, you should be able to connect to localhost:2990/ and login to the JIRA admin system using ‘admin:admin`
You’ll need to create a dummy project and probably some issues to test using this library.