Introduction to some Interesting gems!

Hi Guys, Yesterday I was reading an open source project code(errbit). Reading an open source project code improve your coding capabilities. It enhances your technical knowledge and code vocabulary. You may found some new coding patterns as well.

Today I am going to share some interesting gems which I found in that project. I have also created a demo app using some of those gems.

Here I listed out some of those gems:

1. actionmailer_inline_css :

Gmail doesn’t support <style> or <link> tags for HTML emails. Other webmail clients also have problems with <link> tags.
This means that CSS must be inlined on each element, otherwise the email will not be displayed correctly in every client.

Inlining CSS is a pain to do by hand, and that’s where the premailer gem comes in.

This actionmailer_inline_css gem is a tiny integration between ActionMailer and premailer.

2. decent_exposure :

Rails controllers are the sweaty armpit of every rails app. This is due, in large part, to the fact that they expose their instance variables directly to their views. This means that your instance variables are your interface… and that you’ve broken encapsulation.

decent_exposure makes it easy to define named methods that are made available to your views and which memoize the resultant values. It also tucks away the details of the common fetching, initializing and updating of resources and their parameters.

I have created a demo app to understand the use of this gem. Please refer my demo for more brief introduction.

3. Htmlentities :

HTMLEntities is a simple library to facilitate encoding and decoding of named (&yacute; and so on) or numerical ({ or Ī) entities in HTML and XHTML documents.

4. Hipchat :

HipChat is a group and private chat, file sharing and integration application. Here is the HipChat HTTP API Wrapper in Ruby with Capistrano hooks. You can find API documentation for HipChat here.

5. Flowdock :

Flowdock is a team collaboration app for desktop, mobile and web. Here is the Ruby gem for Flowdock.  You can refer API for Flowdock here.

6. Quiet_assets :

Most of the time while debugging in console we get frustrated with unnecessary logging statements of assets. This gem helps to mute assets pipeline log messages. Quite useful!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s