Has much changed with the release of Bundler? Is there a template that can be used as a base? What are the best practices?
question from:https://stackoverflow.com/questions/3307209/what-is-the-modern-way-to-structure-a-ruby-gemHas much changed with the release of Bundler? Is there a template that can be used as a base? What are the best practices?
question from:https://stackoverflow.com/questions/3307209/what-is-the-modern-way-to-structure-a-ruby-gemSome posts that I have found useful:
Edit (2012-01-10): An excellent all-around guide to gem best practices is RubyGems Guides. I would highly recommend starting here now.
To summarize the key points:
lib/gem.rb
and lib/gem/
structure for code.bin
, any data files in data
and tests in test
or spec
.require
or depend upon files outside of the load path. (VERSION
files often seem to live in odd places in gems.)require 'rubygems'
.$LOAD_PATH
.require File.join(__FILE__, 'foo', 'bar')
, you're doing it wrong.