Rake Task Management Essentials


Rake Task Management Essentials
eBook: $13.99
Formats: PDF, PacktLib, ePub and Mobi formats
$11.89
save 15%!
Print + free eBook + free PacktLib access to the book: $36.98    Print cover: $22.99
$22.99
save 38%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Solve real-world automation challenges with human readable code
  • Build or deploy an application package quickly
  • Easy-to-follow instructions to speed up tasks and manage them efficiently

Book Details

Language : English
Paperback : 122 pages [ 235mm x 191mm ]
Release Date : April 2014
ISBN : 1783280778
ISBN 13 : 9781783280773
Author(s) : Andrey Koleshko
Topics and Technologies : All Books, Application Development, Open Source


Table of Contents

Preface
Chapter 1: The Software Task Management Tool – Rake
Chapter 2: Working with Files
Chapter 3: Working with Rules
Chapter 4: Cleaning Up a Build
Chapter 5: Running Tasks in Parallel
Chapter 6: Debugging Rake Tasks
Chapter 7: Integration with Rails
Chapter 8: Testing Rake Tasks
Chapter 9: Continuous Integration
Chapter 10: Relentless Automation
Index
  • 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
      • Multiple tasks definitions
        • Passing arguments to the tasks
    • The structure of a Rake project
      • Using the import method to load other Rakefiles
      • Running rake tasks from other tasks
    • 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
      • Using the FileList module functionality to collect the files
      • Using pathmap to transform file lists
      • Introducing the FileUtils module
    • 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 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 10: Relentless Automation
    • Examples of Rake being used by famous gems
      • The pain of task execution
      • Sinatra using Rake to run tests
      • Sinatra using Rake to generate documentation
      • Capistrano extending the Rake implementation
    • Other examples of Sinatra using Rake
    • Thor – the next generation of Rake
    • Summary

Andrey Koleshko

Andrey Koleshko had his first touch with programming while at school, when he worked on Pascal. He had been solving basic algorithmic tasks. The first programming language he used at the beginning of his career was Java. He worked with this language for a year and then migrated to the Ruby language, which he worked with for the next four years. Of these four years, he worked with Altoros for three. He had an amazing time there, learning the language and technologies deeply.

Currently, he works at a local cloud hosting company. The company change provided him with the opportunity to deal with a lot of challenges concerning application architecture, code testing, debugging, and deployment processes. As a result, he has been able to contribute to some famous Ruby libraries. More detailed information about his contributions can be found on GitHub at http://github.com/ka8725.

He mostly works with the Rails framework. He openly shares all of his thoughts and his most interesting experiences through his blog at http://railsguides.net. He has recently started to learn the Python programming language.

He lives in Minsk, Belarus, and likes to watch and play sports such as soccer, ping-pong, and volleyball. He also likes travelling to tropical countries with his wife. Teaching people gives him immense pleasure.

Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 1 submitted: last submission 30 Apr 2014

Errata Type: Code       Page: 28 

On page 28, the second code snippet has an error. The first line of the code should read as follows (the change is highlighted):

$ echo '' > settings.yaml

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Rake Task Management Essentials +    Mastering Object-oriented Python =
50% Off
the second eBook
Price for both: $29.95

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • 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

In Detail

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.

Approach

A step-by-step and interactive approach explaining the Rake essentials along with code examples and advanced features.

Who this book is for

If you are a developer who is acquainted with the Ruby language and want to speed up writing the code concerned with files, then this book is for you. To start reading this book, a basic knowledge of Ruby is required; however, an extensive experience with the language is not necessary.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software