Welcome to RakeTasks
RakeTasks provides basic rake tasks for generating documentation, building and installing gems, and running tests. It will also load additional rake tasks if they are in a folder named ‘tasks’. mmmm yummy
The following assumptions are currently made:
-
There is a valid .gemspec file in the root folder that is named the same as the root folder.
-
Tests reside in a folder named either ‘test’ or ‘tests’ and test files are named *_test.rb or test_*.rb.
Additionally, if you have sub-folders under test(s) (i.e. test/unit, test/performance), they will be available using rake test:unit and rake test:performance. Sub-folders that do not contain files matching the test file name patterns will not be included in this set.
You may run a single test from any test file by using the following:
rake test:test_file[test_method]
test_file is the name of the test file without the pattern, so if you have a test named my_class_test.rb with a test method named my_test_method, it would be invoked by:
rake test:my_class[my_test_method]
-
Additional rake tasks are named *.rb and reside in a folder named ‘tasks’.
-
README generation is more intelligent about licensing information. If nothing else is available, RakeTasks will use the gemspec information to populate the license information. If a license folder exists, RakeTasks will look for files that match the license name and include links to both licenses and images in the README.
If a README does not exist, one will be created. If a README does exist, a README_GENERATED file will be created, so as not to overwrite a ‘real’ README file.
The default task will be set in the following order:
-
If tests are found, rake will run test:all.
-
If tests are not found, but an appropriately named .gemspec file is, gem:build will be run.
-
If no tests or .gemspec are found, rdoc:app will be run.
Getting Started
-
Install RakeTasks at the command prompt if you haven’t yet:
gem install rake_tasks
-
Require the gem in your Gemfile:
gem 'rake_tasks', '~> 2.0.0'
-
Require the gem wherever you need to use it:
require 'rake_tasks'
Additional Documentation
rake rdoc:app
License
RakeTasks is released under the LGPLv3 license.