guard-brakeman 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/brakeman.rb +2 -15
- metadata +84 -47
data/lib/guard/brakeman.rb
CHANGED
@@ -9,20 +9,6 @@ module Guard
|
|
9
9
|
# Guard events: `start`, `stop`, `reload`, `run_all` and `run_on_change`.
|
10
10
|
#
|
11
11
|
class Brakeman < Guard
|
12
|
-
# Initialize Guard::Brakeman.
|
13
|
-
#
|
14
|
-
# @param [Array<Guard::Watcher>] watchers the watchers in the Guard block
|
15
|
-
# @param [Hash] options the options for the Guard
|
16
|
-
# @option options [Boolean] :notification show notifications
|
17
|
-
# @option options [Boolean] :format use a different brakeman format when running individual features - not implemented
|
18
|
-
# @option options [Boolean] :output specify the output file - not implemented
|
19
|
-
# @option options [Array<String>] :disabled specify tests to skip (comma separated) - not implemented
|
20
|
-
#
|
21
|
-
def initialize(watchers = [], options = { })
|
22
|
-
super
|
23
|
-
@last_failed = false
|
24
|
-
end
|
25
|
-
|
26
12
|
# Gets called once when Guard starts.
|
27
13
|
#
|
28
14
|
# @raise [:task_has_failed] when stop has failed
|
@@ -41,7 +27,7 @@ module Guard
|
|
41
27
|
puts 'running all'
|
42
28
|
@tracker.run_checks
|
43
29
|
print_failed(@tracker.checks)
|
44
|
-
throw :task_has_failed if @tracker.checks.all_warnings.
|
30
|
+
throw :task_has_failed if @tracker.checks.all_warnings.any?
|
45
31
|
end
|
46
32
|
|
47
33
|
# Gets called when watched paths and files have changes.
|
@@ -50,6 +36,7 @@ module Guard
|
|
50
36
|
# @raise [:task_has_failed] when stop has failed
|
51
37
|
#
|
52
38
|
def run_on_change(paths)
|
39
|
+
puts "rescanning #{paths}, running all checks"
|
53
40
|
report = ::Brakeman::rescan(@tracker, paths)
|
54
41
|
print_failed(report)
|
55
42
|
throw :task_has_failed if report.any_warnings?
|
metadata
CHANGED
@@ -1,96 +1,133 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-brakeman
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Neil Matatall
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-01-18 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: guard
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 19
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 2
|
32
|
+
- 2
|
21
33
|
version: 0.2.2
|
22
34
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
26
37
|
name: brakeman
|
27
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 11
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 2
|
48
|
+
version: "1.2"
|
33
49
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
37
52
|
name: rspec
|
38
|
-
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
55
|
none: false
|
40
|
-
requirements:
|
56
|
+
requirements:
|
41
57
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 23
|
60
|
+
segments:
|
61
|
+
- 2
|
62
|
+
- 6
|
63
|
+
- 0
|
43
64
|
version: 2.6.0
|
44
65
|
type: :development
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
48
68
|
name: guard-rspec
|
49
|
-
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
71
|
none: false
|
51
|
-
requirements:
|
72
|
+
requirements:
|
52
73
|
- - ~>
|
53
|
-
- !ruby/object:Gem::Version
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 17
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
- 3
|
79
|
+
- 1
|
54
80
|
version: 0.3.1
|
55
81
|
type: :development
|
56
|
-
|
57
|
-
version_requirements: *70314479968680
|
82
|
+
version_requirements: *id004
|
58
83
|
description: Guard::Brakeman automatically scans your Rails app for vulnerabilities
|
59
|
-
email:
|
84
|
+
email:
|
60
85
|
- neil@matatall.com
|
61
86
|
executables: []
|
87
|
+
|
62
88
|
extensions: []
|
89
|
+
|
63
90
|
extra_rdoc_files: []
|
64
|
-
|
91
|
+
|
92
|
+
files:
|
65
93
|
- lib/guard/brakeman/templates/Guardfile
|
66
94
|
- lib/guard/brakeman.rb
|
67
95
|
- LICENSE
|
68
96
|
- README.md
|
69
97
|
homepage: http://rubygems.org/gems/guard-brakeman
|
70
98
|
licenses: []
|
99
|
+
|
71
100
|
post_install_message:
|
72
|
-
rdoc_options:
|
101
|
+
rdoc_options:
|
73
102
|
- --charset=UTF-8
|
74
103
|
- --main=README.md
|
75
104
|
- --exclude='(lib|test|spec)|(Gem|Guard|Rake)file'
|
76
|
-
require_paths:
|
105
|
+
require_paths:
|
77
106
|
- lib
|
78
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
108
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
|
84
|
-
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
117
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
hash: 3
|
122
|
+
segments:
|
123
|
+
- 0
|
124
|
+
version: "0"
|
90
125
|
requirements: []
|
126
|
+
|
91
127
|
rubyforge_project: guard-brakeman
|
92
128
|
rubygems_version: 1.8.10
|
93
129
|
signing_key:
|
94
130
|
specification_version: 3
|
95
131
|
summary: Guard gem for Brakeman
|
96
132
|
test_files: []
|
133
|
+
|