Skip to content
dismaldenizen edited this page Oct 22, 2010 · 9 revisions

Getting started

Where to put stuff

Burke takes advantage of some common Ruby conventions to shorten your Rakefile. Here are some tips to leverage Burke’s full power:

  • Put the project’s version number in VERSION (follow the RubyGems Versioning Policies)
  • Put the project’s ‘read me’ information in README.<ext>, where <ext> reflects the markup language used within (.md for Markdown, .textile for Textile, .rdoc for RDoc, .txt for plain text)
  • Put the project’s license in LICENSE.txt
  • Put the project’s RSpec examples in the spec folder, with file names following the pattern *_spec.rb
  • Put project-specific RSpec options in the .rspec file
  • Put the project’s tests in the test folder, with file names following the pattern *_test.rb
  • Put the project’s dependencies in a [[Gemfile|http://gembundler.com/man/gemfile.5.html]]

Here’s an example of a simple project which follows conventions:

my_project
├── Gemfile
├── lib
│   └── foo.rb
├── LICENSE.txt
├── Rakefile
├── README.rdoc
├── .rspec
├── spec
│   ├── foo_spec.rb
│   └── spec_helper.rb
└── VERSION

The Rakefile

A minimalist Burke Rakefile looks like this:

require 'rubygems'
require 'burke'

Burke.setup do
  name        'project_name'
  summary     'A short summary of the project.'
  description 'A more lengthy description of the project which differs from the summary.'
end

Assuming that your project follows the conventions mentioned above, tasks will be available for building a gem, installing the gem, running RSpec examples and generating documentation. Not bad for a such a small Rakefile, eh?

Clone this wiki locally