Skip to content
Chris Hubbard edited this page Mar 27, 2015 · 1 revision

Welcome to the BuildUpdate wiki!

Debugging Tips

REST API REPL

This script heavy uses Team City REST API. It uses Rest Client to request REST resources and Nori to parse the XML results into Ruby hashes.

It is handy to use irb to interact with requested resources.

Note: I am not including the output of these commands...

$ irb
irb(main):001:0> require 'rest_client'
irb(main):002:0> require 'nori'
irb(main):003:0> parser = Nori.new(:convert_tags_to => lambda { |tag| tag.snakecase.to_sym })
irb(main):004:0> site = RestClient::Resource.new('http://build.palaso.org/guestAuth/app/rest/9.0')
irb(main):005:0> xml = site['/projects'].get
irb(main):006:0> projects = parser.parse(xml)[:projects][:project]
irb(main):007:0> projects[0][:@id]
Clone this wiki locally