This is a template for a skeleton ruby gem for use with hoe The configuration here are my own preferences, inspired and borrowed from the generators/templates from hoe, bundler and rails.
Caveats: This doesn't seem to work for gem names with dashes, underscores with lowercase is the ruby convention.
gem install hoe
place this template in ~/.hoe_template
git clone git://github.com/jeremyolliver/gem_template.git ~/.hoe_template
create new gem via hoe with:
Install development dependencies:
cd my_new_gem gem install bundler bundle install
TODO:'s in the Source after generating your gems to see configuration and documentation that needs filling in
Writing Rails Engines (controllers or assets)
Note: If you are writing a gem for use with rails, and intend to have either mountable controllers, or assets bundled via asset pipe. Then I highly suggest generating your gem/project with rails generators.
gem update rails rails plugin new <name> --mountable
Read more at http://guides.rubyonrails.org/engines.html
Assumptions / Preferences
- Ruby 1.9.3+ Support only
- Usage of MiniTest::Spec and Simplecov
- Release process of:
- Writing release notes in CHANGELOG.md
- Bump version by editing the constant in lib/foo_gem/version.rb
- Creating a git tag of vMAJOR.MINOR.PATCH (SemVer)
- build and push the gem to rubygems.org
rake release) will perform the previous two steps for you