guard-brakeman 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/guard/brakeman.rb +13 -5
  2. metadata +4 -4
@@ -47,27 +47,35 @@ module Guard
47
47
  private
48
48
 
49
49
  def print_failed report
50
- puts "\n------ brakeman warnings --------\n"
50
+ UI.warning "\n------ brakeman warnings --------\n"
51
+
52
+ Notifier.notify("#{report.all_warnings.count} brakeman findings", :title => "Brakeman results", :image => :pending)
51
53
  puts report.all_warnings.sort_by { |w| w.confidence }
52
54
  end
53
55
 
54
56
  def print_changed report
55
- puts "\n------ brakeman warnings --------\n"
57
+ UI.info "\n------ brakeman warnings --------\n"
56
58
 
57
59
  unless report.fixed_warnings.empty?
58
- puts "#{report.fixed_warnings.length} fixed warnings:"
60
+ message = "#{report.fixed_warnings.length} fixed warning(s)"
61
+ Notifier.notify(message, :title => "Brakeman results", :image => :success)
62
+ UI.info(message + ":")
59
63
  puts report.fixed_warnings.sort_by { |w| w.confidence }
60
64
  puts
61
65
  end
62
66
 
63
67
  unless report.new_warnings.empty?
64
- puts "#{report.new_warnings.length} new warnings:"
68
+ message = "#{report.new_warnings.length} new warning(s)"
69
+ Notifier.notify(message, :title => "Brakeman results", :image => :failed)
70
+ UI.warning message + ":"
65
71
  puts report.new_warnings.sort_by { |w| w.confidence }
66
72
  puts
67
73
  end
68
74
 
69
75
  unless report.existing_warnings.empty?
70
- puts "#{report.existing_warnings.length} previous warnings:"
76
+ message = "#{report.existing_warnings.length} previous warning(s)"
77
+ Notifier.notify(message, :title => "Brakeman results", :image => :pending)
78
+ UI.warning message + ":"
71
79
  puts report.existing_warnings.sort_by { |w| w.confidence }
72
80
  end
73
81
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-brakeman
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Neil Matatall
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-27 00:00:00 -08:00
18
+ date: 2012-01-31 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency