RailsCasts Pro episodes are now free!

Learn more or hide this

Boris Köster's Profile

GitHub User: x-itec

Site: http://www.x-itec.net

Comments by Boris Köster

Avatar

A small sample how to access redmine and post a comment on a ticket as well as a small snippet accessing rm via api-key

ruby
require 'rubygems'
require 'active_resource'

# Issue model on the client side
class Issue < ActiveResource::Base
  self.site = 'http://xyz.x-itec.net/'
  self.user = 'bk'
  self.password = 'bar'
end

issue = Issue.find(111)
issue.notes="Ruby-Dude"
issue.save

-----



require 'rubygems'
require 'active_resource'

# Issue model on the client side
class Issue < ActiveResource::Base
headers['X-Redmine-API-Key'] = '8ab9925cc104ec166e432cf938339ca7bc521e88'

  self.site = 'http://xyz.x-itec.net/'
#  self.user = 'bk'
#  self.password = 'bar'
end

issue = Issue.find(111)
issue.notes="Ruby-Dude API-KEY"
issue.save
Avatar

http://js2coffee.org/

Converter JS -> Coffee and Coffee -> JS maybe that helps