guard-ragel 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/guard/ragel.rb +12 -4
  2. metadata +3 -3
@@ -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
- ::Guard::UI.info " generated '#{output_file}' from '#{file}'", :reset => true
62
- ::Guard::Notifier.notify("rebuilt #{file}", :title => "Guard::Ragel", :image => :success) if options[:notification]
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
- ::Guard::UI.error "Ragel > #{error.message}"
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("rebuild failed > #{error.message}", :title => "Guard::Ragel", :image => :error)
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Barker