guard-ragel 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +55 -1
- data/lib/guard/ragel/templates/Guardfile +3 -1
- data/lib/guard/ragel.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -1,3 +1,57 @@
|
|
1
|
-
# Guard-
|
1
|
+
# Guard-Ragel
|
2
2
|
|
3
3
|
guard-ragel compiles your .rl files automatically when changed.
|
4
|
+
|
5
|
+
## Install
|
6
|
+
|
7
|
+
Guard-Ragel requires the [guard](https://github.com/mxcl/homebrew) rubygem as
|
8
|
+
well as [Ragel](http://www.complang.org/ragel/). If you're using
|
9
|
+
[homebrew](https://github.com/mxcl/homebrew) you can install ragel easily with:
|
10
|
+
|
11
|
+
brew install ragel
|
12
|
+
|
13
|
+
To install guard-ragel you can:
|
14
|
+
|
15
|
+
gem install guard-ragel
|
16
|
+
|
17
|
+
Or add it to your bundler Gemfile:
|
18
|
+
|
19
|
+
gem 'guard-ragel'
|
20
|
+
|
21
|
+
To get a sample entry in your Guardfile:
|
22
|
+
|
23
|
+
guard init ragel
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
guard 'ragel' do
|
29
|
+
watch(%r{^ragel/.+\.rl})
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
Defaults to writing to the same directory in the ruby output format.
|
34
|
+
|
35
|
+
An input file of ragel.rl will output a file of ragel.rb in the same directory.
|
36
|
+
|
37
|
+
|
38
|
+
## Options
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
:output_format => :ruby # The output format to generate, this defaults to :ruby but supports one of:
|
42
|
+
#
|
43
|
+
# :c The host language is C, C++, Obj-C or Obj-C++
|
44
|
+
# :d The host language is D
|
45
|
+
# :go The host language is Go
|
46
|
+
# :java The host language is Java
|
47
|
+
# :ruby The host language is Ruby
|
48
|
+
# :csharp The host language is C#
|
49
|
+
# :ocaml The host language is OCaml
|
50
|
+
#
|
51
|
+
:options => '' # Any additional command line arguments to send to ragel
|
52
|
+
:output => nil # Optional output directory to place output files in, if
|
53
|
+
# nil will put output files in the same directory as the source file
|
54
|
+
:notification => false # Whether to display notifications after finished,
|
55
|
+
# default: true
|
56
|
+
:extension => nil # Override output file extension
|
57
|
+
```
|
data/lib/guard/ragel.rb
CHANGED
@@ -58,7 +58,7 @@ module Guard
|
|
58
58
|
changed_files = paths.reject{ |f| File.basename(f)[0] == "_" }.map do |file|
|
59
59
|
begin
|
60
60
|
output_file = build_ragel(file)
|
61
|
-
::Guard::UI.info "
|
61
|
+
::Guard::UI.info " generated '#{output_file}' from '#{file}'", :reset => true
|
62
62
|
::Guard::Notifier.notify("rebuilt #{file}", :title => "Guard::Ragel", :image => :success) if options[:notification]
|
63
63
|
output_file
|
64
64
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-ragel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Barker
|
@@ -96,7 +96,7 @@ files:
|
|
96
96
|
- LICENSE
|
97
97
|
- README.md
|
98
98
|
has_rdoc: true
|
99
|
-
homepage:
|
99
|
+
homepage: https://github.com/excepttheweasel/guard-ragel
|
100
100
|
licenses: []
|
101
101
|
|
102
102
|
post_install_message:
|