Rake Task Management Essentials

Deploy, test, and build software to solve real-world automation challenges using Rake.

Rake Task Management Essentials

Andrey Koleshko

Deploy, test, and build software to solve real-world automation challenges using Rake.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$9.80
RRP $13.99
Save 29%
Print + eBook
$22.99
RRP $22.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$9.80
$22.99
$29.99p/m after trial
RRP $13.99
RRP $22.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783280773
Paperback122 pages

Book Description

Rake is a build automation tool written in Ruby. It allows you to specify tasks and describe dependencies as well as group tasks in a namespace. Rake uses Ruby's anonymous function blocks to define various tasks, allowing the use of the Ruby syntax. Rake's goal is to automate build processes quickly and expressively.

"Rake Task Management Essentials" is a practical guide that covers the latest techniques in building, testing, and debugging rake tasks to solve real-world automation challenges. The book starts with a basic knowledge of Rake, allowing you to solve repetitive tasks. Then it provides you with information about processes performed with files, which is crucial for understanding the application of the tool. It includes demonstrations to show you how tasks can be run in parallel and how they can be applied in practice. Thereafter, it integrates Rake with Ruby with the help of simple and clear examples. By the end of this book, you will know how Rake has changed the programming world, especially in the Ruby community.

Table of Contents

Chapter 1: 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
Chapter 2: 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
Chapter 3: 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
Chapter 4: Cleaning Up a Build
Setting up a project
The cleaning tasks
Summary
Chapter 5: 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
Chapter 6: 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
Chapter 7: Integration with Rails
Introducing Rake's integration with Rails
Custom rake tasks in a Rails project
Recurrent running of tasks
Summary
Chapter 8: Testing Rake Tasks
The need for tests
Writing tests for rake tasks
Summary
Chapter 9: Continuous Integration
Introducing Jenkins
Setting up Jenkins
Configuring Jenkins to run rake tasks
Summary
Chapter 10: Relentless Automation
Examples of Rake being used by famous gems
Other examples of Sinatra using Rake
Thor – the next generation of Rake
Summary

What You Will Learn

  • Use the rake command-line tool efficiently
  • Learn Rake's language to write clear custom tasks
  • Run tasks in parallel to speed up the overall runtime of the tasks used
  • Work with file transformations to manage file tasks
  • Refactor a Rake project with the rules, prerequisites, and other technical features built into Rake tools
  • Configure a scheduler to run recurring tasks on a server
  • Configure continuous integration with Rake using a Jenkins example
  • Integrate Rake with the Rails web framework to write Rails-specific rake tasks

Authors

Table of Contents

Chapter 1: 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
Chapter 2: 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
Chapter 3: 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
Chapter 4: Cleaning Up a Build
Setting up a project
The cleaning tasks
Summary
Chapter 5: 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
Chapter 6: 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
Chapter 7: Integration with Rails
Introducing Rake's integration with Rails
Custom rake tasks in a Rails project
Recurrent running of tasks
Summary
Chapter 8: Testing Rake Tasks
The need for tests
Writing tests for rake tasks
Summary
Chapter 9: Continuous Integration
Introducing Jenkins
Setting up Jenkins
Configuring Jenkins to run rake tasks
Summary
Chapter 10: Relentless Automation
Examples of Rake being used by famous gems
Other examples of Sinatra using Rake
Thor – the next generation of Rake
Summary

Book Details

ISBN 139781783280773
Paperback122 pages
Read More

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
Rails 4 Application Development HOTSHOT Book Cover
Rails 4 Application Development HOTSHOT
$ 29.99
$ 21.00
Creating Development Environments with Vagrant Book Cover
Creating Development Environments with Vagrant
$ 19.99
$ 14.00
Data Visualization with D3.js Cookbook Book Cover
Data Visualization with D3.js Cookbook
$ 26.99
$ 18.90
Git Version Control Cookbook Book Cover
Git Version Control Cookbook
$ 26.99
$ 18.90
Git: Version Control for Everyone Book Cover
Git: Version Control for Everyone
$ 23.99
$ 16.80