Using a gem with middleman, is it possible?

I’m working on a newsletter, when I’m done with it I want to inline all the css code.
there is online tools that do that, like:

but I want to do it within middleman and have the build version of my newsletter ready to be send, I found couple or more of gems that can help with that, But i’m not sure how to use it with middleman or if its even possible to use it, here is one of the gems I’m talking about: https://github.com/maca/inline-style

please advice if it can be used with middleman? if yes, then how?

thanks,
karim

Add it to your Gemfile and see instructions on how to use Rack middleware here: http://middlemanapp.com/advanced/rack-middleware/

thanks, I’ll give it shot.