add tests and refactor
Merge branch 'master' of github.com:heisler3030/ruby-client