TrustCommerce Gem Released
I’ve been having the itch to convert my TrustCommerce Subscription plugin into a gem for a few reasons:
- Sharing the love - why should Rails have all the fun?
- The adventure and intrigue - I had never written a gem before.
- Inspiration - I had recently stumbled across Marcel Molina Jr.’s amazing CodeInfo-ing Rakefile as featured in his AWS::S3 gem.
So over the past two days I’ve refactored my plugin code a bit and the TrustCommerce Subscription gem is now polished up and ready to go.
If you are switching over from the plugin there are a few changes:
TrustCommerceGateway is now TrustCommerce
The hashes returned from the TrustCommerce::Subscription methods must now be indexed via symbols
response['billingid'] # plugin response[:billingid] # gem
destroy() method renamed delete()
TrustCommerce::Subscription.destroy(...) # plugin TrustCommerce::Subscription.delete(...) # gem
Even if this gem doesn’t scratch your itch, you should definitely check out Marcel’s bad-ass Rakefile.
Why is this the bee’s knees you ask?
How about the fact that the TrustCommerce Subscription gem site is automatically generated directly from the RDoc with one command:
Or that the gem was packaged, tagged, and pushed out to rubyforge with:
Well done Marcel!