guard is not a new library. It has been a staple in many areas of Ruby development for years. Many of us use it, but I felt like shedding a bit of light on it as a great too folks should know about in general.
IMPORTANT: Please upgrade to Ruby >= 2.4 before installing Guard! To install for older versions, update Bundler at least 1.12:
gem update bundler and Bundler should correctly resolve to earlier gems for your given Ruby version.
- Ruby 2.1 is officially outdated and unsupported!
- Ruby 2.2 is officially outdated and unsupported!
- Ruby 2.3 is officially outdated and unsupported!
It's frequently used by software developers, web designers, writers and other specialists to avoid mundane, repetitive actions and commands such as "relaunching" tools after changing source files or configurations.
Common use cases include: an IDE replacement, web development tools, designing "smart" and "responsive" build systems/workflows, automating various project tasks and installing/monitoring various system services.
For a full categorized list of known…
Guard automates various tasks by running custom rules whenever file or directories are modified.
At DEV, we use
guard to run tests as files are saved in order to optimize our test-driven-development practices.
I say "we" and "our" without total certainty that it is used across the team and among contributors because it is not needed in our flow. This is probably one of the better things about its use with
rspec. It is the cherry on top.
It's not a heavy-handed default, but so engrained in my own workflow, I almost forget it's not the default.
The gem is most popular in conjunction with Rails and testing, but I'd advise folks to check out its usefulness in any situation where saving a file can kick off a task. The guard ecosystem is vast.
Are there similar tools in other language environments folks check out?