refact sinatra server
test ruby client #7