Pluggable code

Hello all,

My team is working on an existing Rails 3.2 application, which is basically a web service for managing remote devices. We are able to manage android and windows devices remotely now. For the next version, we want to add support for iOS. Although, we are not sure we’ll have all the infrastructure in place for that to happen. This way, we’d like to add iOS support code (such as the logic for handling cloud messaging) but we’d like to add that in a pluggable way. What I mean is that, we are not sure this feature is going to our next release, therefore we need a way to enable/disable support for iOS.

What kind of code architecture do you guys recommend to go on with this approach?

  • A rails gem?

  • A rails engine?

Other alternatives?

Thanks in advance.