Empty Ruby Templates
Rails has a neat template feature that lets you customise newly created rails apps. There is also the thoughbot suspenders gem that gives a very opinionated set of configuration options for new rails projects.
However, I want my own (much smaller) set of opinionated options, and I want similar templates for creating rails projects, plain old ruby projects, and ruby gems.
Wherever I can, I also want to use the default generators that already come with gems. Guard, rails, bundle, rspec etc can generate many files during their installation process, and using these gems to do the work means I don’t have to keep updating my own versions or risk using outdated templates.
So, I’ve created my own three very simple templates. To keep them (broadly) consistent, I’m not making use of the rails template functionality. I just use a bash script and some template files. I also make used of my Gemfile.local technique that I’ve blogged about elsewhere.
Check the README for the quirks of each of the three versions but basically,
you clone an empty project and run bin/setup
and then fill in a few blanks.
You’ll end up with a ruby project with a few of my preferred defaults (e.g. guard, rspec) and some handy Makefile tasks to easily remember all the different commands to run handy code metrics.
Here they are: