guard-ragel 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/ragel.rb +12 -4
- metadata +3 -3
data/lib/guard/ragel.rb
CHANGED
@@ -56,20 +56,28 @@ module Guard
|
|
56
56
|
# Build the files given
|
57
57
|
def run_on_change(paths)
|
58
58
|
changed_files = paths.reject{ |f| File.basename(f)[0] == "_" }.map do |file|
|
59
|
+
|
59
60
|
begin
|
60
61
|
output_file = build_ragel(file)
|
61
|
-
|
62
|
-
::Guard::
|
62
|
+
message = "Generated '#{output_file}' from '#{file}'"
|
63
|
+
::Guard::UI.info "Guard::Ragel #{message}", :reset => true
|
64
|
+
if options[:notification]
|
65
|
+
::Guard::Notifier.notify(message, :title => "Guard::Ragel", :image => :success)
|
66
|
+
end
|
63
67
|
output_file
|
64
68
|
|
65
69
|
rescue RagelError => error
|
66
|
-
|
70
|
+
message = "Failed to generate '#{output_file}' from '#{file}', error #{error.message}"
|
71
|
+
::Guard::UI.error "Guard::Ragel #{message}"
|
67
72
|
if options[:notification]
|
68
|
-
::Guard::Notifier.notify(
|
73
|
+
::Guard::Notifier.notify(message, :title => "Guard::Ragel", :image => :error)
|
69
74
|
end
|
70
75
|
nil
|
76
|
+
|
71
77
|
end
|
78
|
+
|
72
79
|
end.compact
|
80
|
+
|
73
81
|
notify changed_files
|
74
82
|
end
|
75
83
|
|
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Barker
|