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

Crafting Gems: RailsConf 2013

Crafting Gems: RailsConf 2013

Gems underpin almost every piece of Ruby code we write – and so, being able to write your own gems is not only incredibly useful, it provides an avenue for code reuse and open source sharing.

During this session, Pat will talk about the ecosystem around gems and the knowledge required to write your own gems. He’ll also cover some of the tools available to assist with this, along with ideal approaches and best practices for gem development.

Pat Allan

May 01, 2013
Tweet

More Decks by Pat Allan

Other Decks in Technology

Transcript

  1. “If you have libraries you would like to include, please

    send the gem les to either myself or Rich Kilmer” Chad Fowler, 15 March 2004
  2. # pdx.gemspec Gem::Specification.new do |s| s.name = ‘pdx’ s.version =

    ‘0.0.1’ s.authors = [‘Pat Allan’] s.email = [‘[email protected]’] s.homepage = ‘’ s.summary = ‘RailsConf Gem’ s.description = ‘’ s.files = [...] s.test_files = [...] s.executables = [...] end
  3. Authors, Emails & Homepage s.authors = [‘Pat Allan’] s.email =

    [‘[email protected]’] s.homepage = ‘https:// github.com/pat/pdx’
  4. # pdx.gemspec Gem::Specification.new do |s| s.name = ‘pdx’ s.version =

    ‘0.0.1’ s.authors = [‘Pat Allan’] s.email = [‘[email protected]’] s.homepage = ‘’ s.summary = ‘RailsConf Gem’ s.description = ‘’ s.files = [...] s.test_files = [...] s.executables = [...] end
  5. Dependencies ~> 3.1 == [>= 3.1 && < 4.0] ~>

    3.0.3 == [>= 3.0.3 && < 3.1]
  6. # run tests rake spec # generate documentation rake yard

    # default task should run tests rake