Is your stuff built on top of braintree's gem, or did you re-implement all of the actual calls to the API? You might want to check that out, it could simplify your code...
Our code is built on top of their gem. We focused on the rebilling logic, which replicates some of their own vault / rebilling code, which most people here would say was a waste of time / money. (Probably was?)
When it comes to billing stuff, though, I really want to know what's going on behind the scenes ... hence ... rolling our own.
As we work out the bugs, I'll try to get a gem together. Would love to have people dig into it and make it better.
Good! Do it! It's really easy: http://timeless.judofyr.net/making-ruby-gems
Is your stuff built on top of braintree's gem, or did you re-implement all of the actual calls to the API? You might want to check that out, it could simplify your code...