Book Image

Rake Task Management Essentials

By : Andrey Koleshko
Book Image

Rake Task Management Essentials

By: Andrey Koleshko

Overview of this book

Table of Contents (18 chapters)
Rake Task Management Essentials
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Using Rake's file utilities


Rake provides us with a few helpful modules and methods. They may be very useful in some cases, especially while working with files. Knowing them might help you keep Rakefiles clean and precise. The following is a list of these features:

  • The FileList module

  • The FileUtils module

  • The pathmap method

The next three sections will explore them in detail.

Using the FileList module functionality to collect the files

There is only one thing remaining in our Rakefile that would be great to get rid of. Currently, there is a need to change the list of articles manually. Luckily, Rake provides us with a tool to solve this problem—Rake::FileList. It provides agile instruments to tune your own list of files to be generated. It is flexible enough to filter the list of files by the category of your choice. It also enables you to filter out temp files that are generated by your editor, folders that have to be ignored, and files with some features that can be detected dynamically (timestamps...