Rake Task Management Essentials
eBook - ePub

Rake Task Management Essentials

Andrey Koleshko

Buch teilen
  1. 122 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Rake Task Management Essentials

Andrey Koleshko

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Rake Task Management Essentials als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Rake Task Management Essentials von Andrey Koleshko im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Programmation en Ruby. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2014
ISBN
9781783280773

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...

Inhaltsverzeichnis