Blog · Articles tagged with "gem" · show all articles »

A nifty service layer for your Rails app

If you have been in the Rails world for a while, you have undoubtedly heard about the discussion around whether, as a Rails app grows in size, it needs an additional "service layer" that contains all the business logic. There have been many blog posts about this topic already so I won't repeat the pros and cons here.

Not sure if I need a service layer or just put it all in /lib

I for one started using services as an experiment in a couple of Rails apps I am working on/maintaining in early 2013 and must say, it has made working on these apps enormously more pleasant! Everything from reasoning about the way the apps work to finding bugs or implementing new features has become much more enjoyable!

Read on

GemConfig - A nifty way to make your gem configurable

This release is another case of "Jeez, this is the third time I'm doing X... let's see if there's a gem for that... nopes? Let's get started!" What follows immediately after that is, of course, putting the idea on my "idea list" (a Trello board) and letting it ripe there for a few months. But eventually I came around to it and present you with: GemConfig - A nifty way to make your gem configurable

Read on

Skimlinks - Access the Skimlinks product database from Ruby

The current project I'm working on, ProductWidgets, lets you add affiliate products to your website effortlessly. It is backed by the Skimlinks product database that lets you access 25 million products from over 4,000 merchants in 54 countries.

Skimlinks offers powerful APIs to access their huge database of products and merchants. I extracted the code I use to access these APIs to a Ruby gem for everyone to use. You can find the code and installation and usage instructions on Github.

Read on

Tries - Solidify your code and retry on petty exceptions

I am always watching out for chunks of code that I seem to reuse in every new project and the "tries" pattern is definitely one of them. So finally I found some time to wrap it up into a gem and even come up with a nifty tagline:

Solidify your code and retry on petty exceptions

Read on