TrustCommerce Gem Released

I’ve been having the itch to convert my TrustCommerce Subscription plugin into a gem for a few reasons:

  1. Sharing the love - why should Rails have all the fun?
  2. The adventure and intrigue - I had never written a gem before.
  3. 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:

rake site:deploy

Or that the gem was packaged, tagged, and pushed out to rubyforge with:

rake dist:release

Well done Marcel!

Comment or question via
FYI: This post was migrated over from another blogging engine. If you encounter any issues please let me know on . Thanks.