Skip to content

JustinLove/guard-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guard-Ruby

This is a trivial guard extension that runs ruby files. You might use it to develop benchmarks or other small one-off scripts that don't require much ceremony.

Install

Install the gem:

$ gem install guard-ruby

Or add it to your Gemfile:

gem 'guard-ruby'

Add an example to your Guardfile:

$ guard init ruby

Usage

Please read the Guard usage doc

Guardfile

The original motivation was for developing benchmarks - single file ruby projects that should be re-run each time they change.

guard 'ruby' do
  # run any benchmarking files
  watch(/bench.*\.rb/)
end

If you provide a block, the return value will be used as the script to run.

guard 'ruby' do
  # run a program when it's data is changed
  watch(/.*\.csv/) { 'convert.rb' }
end

About

Guard for running simple Ruby files, such as benchmarks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages