guard-brakeman 0.6.0 → 0.6.1

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 +7 -6
  2. metadata +2 -2
@@ -29,8 +29,9 @@ module Guard
29
29
  :notifications => true,
30
30
  :run_on_start => false,
31
31
  :chatty => false,
32
- :min_confidence => 1
33
- }.update(options)
32
+ :min_confidence => 1,
33
+ :quiet => true
34
+ }.merge!(options)
34
35
  end
35
36
 
36
37
  # Gets called once when Guard starts.
@@ -67,7 +68,7 @@ module Guard
67
68
  def run_on_changes paths
68
69
  return run_all unless @tracker.checks
69
70
 
70
- UI.info "\n\nrescanning #{paths}, running all checks"
71
+ info "\n\nrescanning #{paths}, running all checks"
71
72
  report = ::Brakeman::rescan(@tracker, paths)
72
73
  print_changed(report)
73
74
  throw :task_has_failed if report.any_warnings?
@@ -76,7 +77,7 @@ module Guard
76
77
  private
77
78
 
78
79
  def print_failed report
79
- UI.info "\n------ brakeman warnings --------\n"
80
+ info "\n------ brakeman warnings --------\n"
80
81
 
81
82
  icon = report.all_warnings.count > 0 ? :failed : :success
82
83
 
@@ -98,7 +99,7 @@ module Guard
98
99
  end
99
100
 
100
101
  def print_changed report
101
- UI.info "\n------ brakeman warnings --------\n"
102
+ info "\n------ brakeman warnings --------\n"
102
103
 
103
104
  message = []
104
105
  should_alert = false
@@ -169,7 +170,7 @@ module Guard
169
170
  end
170
171
 
171
172
  def info(message, color = :white)
172
- UI.info(UI.send(:color, message, color))
173
+ UI.info(UI.send(:color, message, color)) unless @options[:quiet]
173
174
  end
174
175
 
175
176
  def warning_info(warnings, color = :white)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-brakeman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-07 00:00:00.000000000 Z
13
+ date: 2012-12-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: guard