On Github clerb / make_a_gem_slides
October 2nd, 2014
RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them.
- http://en.wikipedia.org/wiki/RubyGems
Ruby code + [gemname].gemspec
Gem::Specification.new do |s| s.name = 'your_fancy_gem' s.version = '0.0.0' s.date = '2014-10-02' s.summary = "Your Fancy Gem" s.description = "The fanciest gem ever!" s.authors = ["Joel"] s.email = 'joelbyler@gmail.com' s.files = ["lib/fancy.rb"] s.homepage = 'http://rubygems.org/gems/your_fancy_gem' s.license = 'MIT' end
In software engineering, don’t repeat yourself (DRY) is a principle of software development, aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures.
- http://en.wikipedia.org/wiki/Don't_repeat_yourself
Anybody can do it. You just need some code that you want to share
gem 'foo', :path => '/path/to/foo'
gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git'.
source 'rubygems.org' gem 'rails', '4.1.6'