This is an unofficial CardPointe Gateway driver written in Ruby for use with the IDTech Augusta S Card Swiper. It offers payment processing and payment refund, but other details can be requested from the API. The library is pretty self explanatory. For the track data in the demo, dump the reader output to get a valid response from the test server. However, I wouldn't use a real card as the test server is public for everyone to use.
You need the rest-client, json, and base64 gems for this to work.
Feel free to use this or edit it.