PacktLib: Rake Task Management Essentials

Rake Task Management Essentials

Credits

About the Author

Acknowledgements

About the Reviewers

www.PacktPub.com

Preface

The Software Task Management Tool – Rake

Installing Rake

Introducing rake tasks

The command-line arguments

Using global Rakefiles to run tasks anywhere

Defining custom rake tasks

Task dependencies – prerequisites

The structure of a Rake project

The code conventions of Rake

Summary

Working with Files

Using file tasks to work with files

The characteristics of the file task dependencies

Creating a folder with the directory method

Using Rake's file utilities

A practical example of automatically generating a config file

Summary

Working with Rules

Understanding the duplication of the file tasks

Using a rule to get rid of the duplicated file tasks

Detecting a source for the rule dynamically

Using a regular expression to match more tasks

Summary

Cleaning Up a Build

Setting up a project

The cleaning tasks

Summary

Running Tasks in Parallel

Defining tasks with parallel prerequisites

Thread safety of multitasks

Multiple task definitions with a common prerequisite

Applying multitasks in practice

Summary

Debugging Rake Tasks

Using command-line arguments for debugging

Getting a dependency's resolution with --prereqs

Using the --rules option to trace the rule resolution

Using the Ruby approach to debug a Rake project

Summary

Integration with Rails

Introducing Rake's integration with Rails

Custom rake tasks in a Rails project

Recurrent running of tasks

Summary

Testing Rake Tasks

The need for tests

Writing tests for rake tasks

Summary

Continuous Integration

Introducing Jenkins

Setting up Jenkins

Configuring Jenkins to run rake tasks

Summary

Relentless Automation

Examples of Rake being used by famous gems

Other examples of Sinatra using Rake

Thor – the next generation of Rake

Summary

Index