Guard-Ragel

guard-ragel compiles your .rl files automatically when changed.

Install

Guard-Ragel requires the guard rubygem as well as Ragel. If you're using homebrew you can install ragel easily with:

brew install ragel

To install guard-ragel you can:

gem install guard-ragel

Or add it to your bundler Gemfile:

gem 'guard-ragel'

To get a sample entry in your Guardfile:

guard init ragel

Usage

guard 'ragel' do
  watch(%r{^ragel/.+\.rl})
end

Defaults to writing to the same directory in the ruby output format.

An input file of ragel.rl will output a file of ragel.rb in the same directory.

The output format can be inferred from the input filename if it has multiple extensions, e.g:

example.rb.rl

will generate

example.rb

Options

:output_format => :ruby             # The default output format to generate, if
                                    # one cannot be determined from the filename
                                    #
                                    # :c         The host language is C, C++, Obj-C or Obj-C++
                                    # :d         The host language is D
                                    # :go        The host language is Go
                                    # :java      The host language is Java
                                    # :ruby      The host language is Ruby
                                    # :csharp    The host language is C#
                                    # :ocaml     The host language is OCaml
                                    #
:options => ''                      # Any additional command line arguments to send to ragel
:output => nil                      # Optional output directory to place output files in, if
                                    # nil will put output files in the same directory as the source file
:notification => false              # Whether to display notifications after finished,
                                    #  default: true
:extension => nil                   # Override output file extension