Rake Task Management Essentials
eBook - ePub

Rake Task Management Essentials

Andrey Koleshko

Compartir libro
  1. 122 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Rake Task Management Essentials

Andrey Koleshko

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Rake Task Management Essentials un PDF/ePUB en línea?
Sí, puedes acceder a Rake Task Management Essentials de Andrey Koleshko en formato PDF o ePUB, así como a otros libros populares de Informatique y Programmation en Ruby. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2014
ISBN
9781783280773
Edición
1
Categoría
Informatique

Rake Task Management Essentials


Table of Contents

Rake Task Management Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
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 first alternative
The second variant
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
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
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
4. Cleaning Up a Build
Setting up a project
The cleaning tasks
Summary
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
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
7. Integration with Rails
Introducing Rake's integration with Rails
Custom rake tasks in a Rails project
Recurrent running of tasks
Summary
8. Testing Rake Tasks
The need for tests
Writing tests for rake tasks
Summary
9. Continuous Integration
Introducing Jenkins
Setting up Jenkins
Configuring Jenkins to run rake tasks
Summary
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
Index

Rake Task Management Essentials

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2014
Production Reference: 1140414
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-077-3
www.packtpub.com
Cover Image by Kim Nousaine ()

Credits

Author
Andrey Koleshko
Reviewers
Mario Miguel Agüero Obando
Stuart Ellis
Avinasha Sastry
Commissioning Editor
Grant Mizen
Acquisition Editor
Neha Nagwekar
Content Development Editor
Priya Singh
Technical Editor
Dennis John
Copy Editor
Stuti Srivastava
Project Coordinator
Harshal Ved
Proofreaders
Simran Bhogal
Ameesha Green
Indexer
Mehreen Deshmukh
Graphics
Sheetal Aute
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

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.

Acknowledgements

I'm thankful to many people who've helped me write this book. But firstly, I would like to thank the publishers who offered me an opportunity to write this book. If it wasn't for them, who knows what would have happened with this book. Thankfully, the Packt Publishing team was very supportive and helped me deliver this useful book with high quality. A big thanks goes to Sergey Avseyev, who always supported me in the technical and difficult parts of the book. He also made me believe...

Índice