Rake Task Management Essentials
3/5
()
About this ebook
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, basic Ruby knowledge is required; however, a huge amount of experience with the language is not necessary.
Related to Rake Task Management Essentials
Related ebooks
Heroku Cloud Application Development Rating: 0 out of 5 stars0 ratingsGradle Effective Implementation Guide Rating: 3 out of 5 stars3/5GitHub Actions Cookbook: A practical guide to automating repetitive tasks and streamlining your development process Rating: 0 out of 5 stars0 ratingsLearning Apache Thrift: Make applications cross-communicate using Apache Thrift! Rating: 0 out of 5 stars0 ratingsWhere to Place My Project: Code Hosting Platforms Rating: 0 out of 5 stars0 ratingsPython Regular Expressions Explained: A Practical Guide with Examples Rating: 0 out of 5 stars0 ratingsAWS Cloud Projects: Strengthen your AWS skills through practical projects, from websites to advanced AI applications Rating: 0 out of 5 stars0 ratingsOpenFlow Cookbook Rating: 5 out of 5 stars5/5A Pythonic Adventure: From Python basics to a working web app Rating: 0 out of 5 stars0 ratingsNoSQL Essentials: Navigating the World of Non-Relational Databases Rating: 0 out of 5 stars0 ratingsHello World: Student to Software Professional - a Transformation Guide Rating: 0 out of 5 stars0 ratingsFoundations of Data Intensive Applications: Large Scale Data Analytics under the Hood Rating: 0 out of 5 stars0 ratingsUltimate Web API Development with Django REST Framework Rating: 0 out of 5 stars0 ratingsPython AI Programming Rating: 0 out of 5 stars0 ratingsUltimate Git and GitHub for Modern Software Development Rating: 0 out of 5 stars0 ratingsDynamic Programming in Java: From Basics to Expert Proficiency Rating: 0 out of 5 stars0 ratingsMastering Python Rating: 0 out of 5 stars0 ratingsThe Keycloak Handbook: Practical Techniques for Identity and Access Management Rating: 0 out of 5 stars0 ratingsMastering SaltStack - Second Edition Rating: 0 out of 5 stars0 ratingsPython for Everyone: A Complete Guide to Coding, Data, and Web Development: Your Guide to the Digital World, #3 Rating: 0 out of 5 stars0 ratingsModern Web Development with Go Rating: 0 out of 5 stars0 ratingsSpring Boot 3.0 Crash Course Rating: 0 out of 5 stars0 ratingsModernizing Legacy Applications in PHP Rating: 0 out of 5 stars0 ratingsInstant Handlebars.js Rating: 0 out of 5 stars0 ratingsBackbone.js Patterns and Best Practices Rating: 0 out of 5 stars0 ratingsjQuery Game Development Essentials Rating: 0 out of 5 stars0 ratingsSphinx Search Beginner's Guide Rating: 4 out of 5 stars4/5Beginning Mobile Application Development in the Cloud Rating: 0 out of 5 stars0 ratingsSoftware Development Accelerated Essentials: What You Didn't Know, You Needed to Know Rating: 0 out of 5 stars0 ratings
Databases For You
SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Practical Data Analysis Rating: 4 out of 5 stars4/5ITIL 4: Digital and IT strategy: Reference and study guide Rating: 5 out of 5 stars5/5Excel 2021 Rating: 4 out of 5 stars4/5Python Projects for Everyone Rating: 0 out of 5 stars0 ratingsBlockchain For Dummies Rating: 4 out of 5 stars4/5Access 2019 For Dummies Rating: 0 out of 5 stars0 ratingsLearn SQL in 24 Hours Rating: 5 out of 5 stars5/5The AI Bible, Making Money with Artificial Intelligence: Real Case Studies and How-To's for Implementation Rating: 4 out of 5 stars4/5The Data Model Resource Book: Volume 3: Universal Patterns for Data Modeling Rating: 0 out of 5 stars0 ratingsCOMPUTER SCIENCE FOR ROOKIES Rating: 0 out of 5 stars0 ratingsSQL in 30 Pages Rating: 4 out of 5 stars4/5Star Schema The Complete Reference Rating: 5 out of 5 stars5/5JAVA for Beginner's Crash Course: Java for Beginners Guide to Program Java, jQuery, & Java Programming Rating: 4 out of 5 stars4/5ITIL 4: High-velocity IT: Reference and study guide Rating: 0 out of 5 stars0 ratingsAccounting Database Design Rating: 5 out of 5 stars5/5AZ-104: Azure Administrator Mastery Rating: 0 out of 5 stars0 ratingsClojure Data Structures and Algorithms Cookbook Rating: 4 out of 5 stars4/5ITIL 4: Direct, plan and improve: Reference and study guide Rating: 0 out of 5 stars0 ratingsLearn SQL using MySQL in One Day and Learn It Well: SQL for beginners with Hands-on Project Rating: 0 out of 5 stars0 ratingsData Science Strategy For Dummies Rating: 0 out of 5 stars0 ratingsVisual Basic 6.0 Programming By Examples Rating: 5 out of 5 stars5/5Mastering Blockchain Rating: 4 out of 5 stars4/5Developing Analytic Talent: Becoming a Data Scientist Rating: 3 out of 5 stars3/5
Reviews for Rake Task Management Essentials
1 rating0 reviews
Book preview
Rake Task Management Essentials - Andrey Koleshko
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
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 (<[email protected]>)
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 that I could write this book from scratch. I would also like to thank Lee Hambley, who shared his experience with me, and as a result, the last chapter of the book is more hands-on. I have no doubt now that Rake has a very successful future despite other competitive tools.
I'm grateful to my wife for allowing me to allocate enough time to write the chapters. Lastly, I would like to acknowledge the creator of Rake, Jim Weirich. He created a really great and powerful tool. Unfortunately, he won't be with us to see this book published. He passed away recently. But anyway, I believe that he would be happy that his creation helped develop this book.
About the Reviewers
Mario Miguel Agüero Obando is a software engineer with experience in both frontend and backend sides of software development. He has worked in intensive data processing applications and also in new UX designs.
He is also an experienced programming trainer and has reviewed several technical books.
Stuart Ellis works for a Ruby on Rails and mobile software development company, where he wears many hats. He has also worked as a .NET and Ruby programmer, tamed various brands of databases, managed different combinations of Windows and Linux, and studied history. He has always been a Yorkshireman.
Avinasha Sastry has been involved in technology and startups right from his college days. He has never worked in big companies because he loves the business challenges in startups as much as he loves technology. He has been working with SupportBee for the last three years. He is an avid reader, a Harry Potter fan, and a globetrotter.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
Support files, eBooks, discount offers and morehttp://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.