Are you looking to avoid reinventing the wheel? You can use the modular code below to help your project along.
Modular Code for Ruby
Federal API SDK
ColdFusion SDK to ease access to DOL's and other federal agencies' APIs. For a list of APIs that this SDK has been tested against, please see the wiki. For documentation and sample code, please visit http://developer.dol.gov.Link: https://github.com/USDepartmentofLabor/ColdFusion-Federal-SDK
Source: Federal