Skip to content

Instantly share code, notes, and snippets.

@ilyabrin
Created April 18, 2014 14:06
Show Gist options
  • Select an option

  • Save ilyabrin/11045968 to your computer and use it in GitHub Desktop.

Select an option

Save ilyabrin/11045968 to your computer and use it in GitHub Desktop.
server (sinatra)
#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
require 'rexml/document'
include REXML
providers = File.new('providers.xml')
services = File.new('services.xml')
p = Document.new(providers)
s = Document.new(services)
get '/services' do
content_type 'text/xml'
s.to_s
end
get '/providers' do
content_type 'text/xml'
p.to_s
end
get '/services/:id'
content_type 'text/xml'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment