Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pluck It - Southeast Ruby 2017

Pluck It - Southeast Ruby 2017

How many times have you written the same bits of code, over and over, and thought, “You know, if only this was big enough to be a gem, I would pluck it out.” Often, we think of a RubyGem as a larger library of code that we “bolt on” to an app. And, these smaller code blobs become a hassle to distribute to the multiple apps that use them.

A small micro-library, done the right way, at the right time, can greatly improve an app.

But, when can you benefit from extracting a micro-library? And, how do you build and publish that code into a RubyGem? I’ll go through the process, from A to Z.

Adam Cuppy (he/him)

October 05, 2017
Tweet

More Decks by Adam Cuppy (he/him)

Other Decks in Programming

Transcript

  1. App Bundle $ bundle install Bundler + RubyGems + MyApp

    RubyGems.org rails-5.1 rspec-core-3.2 Private Gem Server priv_gem-1.0 priv_gem2—1.0
  2. 1. Modify code 2. Increment VERSION constant 3. Rebuild and

    Release 4. Update apps: $ cd /path/to/app; bundle update my_gem New Release
  3. It’s when the cost of maintaining an internal library, exceeds

    the cost of maintaining an external dependency.
  4. podcast.codingzeal.com We discuss an interesting article or link from the

    week in the world of business, software, teams and open source