Skip to content

Instantly share code, notes, and snippets.

@karlbright
Created May 11, 2011 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlbright/965973 to your computer and use it in GitHub Desktop.
Save karlbright/965973 to your computer and use it in GitHub Desktop.
def connection(options={})
raise NoToken unless @token.present?
@connections ||= {}
@connections[@token] ||= RestClient::Resource.new(\
"#{protocol}://www.pivotaltracker.com/services/v3", \
:headers => {'X-TrackerToken' => @token, 'Content-Type' => 'application/xml'})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment