Gem Crafting With Jeweler

A few days ago I was just wondering what the best way to craft aGem was, and I figured out it doesn’t really matter. Any way you take will lead you to the same place, yet,
I really liked an special way to do it: I found JEWELER.
In short, Jeweler is a GEM to make GEMS, great, right?

Its quite simple to use, you just need to follow a few steps to get the skeleton
of a GEM and then you will get it ready to use.

The greatest stuff about Jeweler is that you have a library to manage and releaseRubyGem projects. Don’t forget to create
your account on the RubyGems website, that will be your signature like a gem crafter.

You can also use its scaffold generator to start a new RubyGem project.

Now we need to set a version before we start using it

$ rake version:write MAJOR=1 MINOR=0 PATCH=0

The small explanation for this is: if you do a small change you need to
increase PATCH (0 – 9) then you will start to increase MINOR (0 – 9) stage, and
when you get MAJOR changes, its because you did a whole new version of your gem.

You will see this message:

Updated version: 1.0.0

Then, we need to edit our Rakefile and change a couple of lines inside, I suggest to you use VIM/MVIM/GVIM to do that:

$ vim Rakefile

If your gems depends upon other libraries, you’ll need to define a specification, commonly called a “gemspec”.

Inside Rakefile look for “gems” and that is the Gem Specification Reference.