warder 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/features/quiet.feature +10 -0
- data/features/statistics.feature +22 -0
- data/features/step_definitions/checks_for_rails_best_practices_steps.rb +4 -1
- data/features/step_definitions/checks_for_rails_security_issues_steps.rb +2 -1
- data/features/step_definitions/checks_for_vulnerable_gems_steps.rb +4 -1
- data/features/step_definitions/detects_code_complexity_steps.rb +1 -1
- data/features/step_definitions/run_steps.rb +3 -3
- data/features/step_definitions/statistics_steps.rb +4 -0
- data/features/step_definitions/validates_style_guide_steps.rb +2 -2
- data/lib/warder/bundle_audit_runner.rb +14 -4
- data/lib/warder/cli/arguments.rb +14 -0
- data/lib/warder/code_complexity_runner.rb +9 -6
- data/lib/warder/code_duplication_runner.rb +1 -1
- data/lib/warder/code_smells_runner.rb +1 -1
- data/lib/warder/magick_numbers_runner.rb +2 -2
- data/lib/warder/rails_advice_runner.rb +9 -2
- data/lib/warder/rails_security_runner.rb +8 -3
- data/lib/warder/runner.rb +32 -9
- data/lib/warder/sandi_rules_runner.rb +12 -1
- data/lib/warder/style_guide_runner.rb +2 -2
- data/lib/warder/version.rb +1 -1
- data/spec/fixtures/valid_rails_app/Gemfile +1 -1
- data/spec/fixtures/valid_rails_app/Gemfile_lock +82 -56
- data/warder.gemspec +9 -9
- metadata +23 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6864cd08d2a76c8a2c51ecdb037e6e8d13e87129
|
4
|
+
data.tar.gz: 5790790a28e5193ab6180f1dbcb40cfa9b609e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c4dc3d3aea2b64a9f78f51996b426529ce3fe30960cd4f1d8f9f087593da29a02fd2e11e2633c8c620aa4686c53e2a5a2fcf0471bf0f427c190fc137c96068
|
7
|
+
data.tar.gz: ce2a25f8aa19568f93e373f4e355344f57b36d96746be887169a8de0599fe136e8211a127ecf1521365c0d14fb461ce13f4689729e611eacadda976ffafb3e44
|
data/.travis.yml
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
Feature: run warder in quiet mode
|
2
|
+
In order to silent validators output
|
3
|
+
As a ruby developer
|
4
|
+
I want to run warder with --quiet option
|
5
|
+
|
6
|
+
Scenario: run warder with enabled quiet option
|
7
|
+
Given I have valid file in directory
|
8
|
+
When I run `warder --quiet --magick-numbers`
|
9
|
+
Then warder detects no magick numbers issues
|
10
|
+
And the exit status should be 0
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Feature: run warder in statistics mode
|
2
|
+
In order to get results
|
3
|
+
As a ruby developer
|
4
|
+
I want to run warder with --stats option
|
5
|
+
|
6
|
+
Scenario: run warder with enabled stats option
|
7
|
+
Given I have valid file in directory
|
8
|
+
When I run `warder --stats --magick-numbers`
|
9
|
+
Then 0 magick numbers stats should be printed
|
10
|
+
And the exit status should be 0
|
11
|
+
|
12
|
+
Scenario: run warder with enabled stats option on invalid rails app
|
13
|
+
Given I have invalid_rails_app project in directory
|
14
|
+
When I run `warder --stats --sandi-rules`
|
15
|
+
Then the output should contain "broken 3 out of 4 sandi rules"
|
16
|
+
And the exit status should be 1
|
17
|
+
|
18
|
+
Scenario: run warder with disabled stats option
|
19
|
+
Given I have valid file in directory
|
20
|
+
When I run `warder --no-stats --code-complexity`
|
21
|
+
Then 0 code complexity stats should not be printed
|
22
|
+
And the exit status should be 0
|
@@ -1,5 +1,5 @@
|
|
1
1
|
def rails_best_practices_cmd
|
2
|
-
'rails_best_practices --silent --spec --test --features .'
|
2
|
+
'rails_best_practices --without-color --silent --spec --test --features .'
|
3
3
|
end
|
4
4
|
|
5
5
|
def executing_rails_best_practices
|
@@ -8,4 +8,7 @@ end
|
|
8
8
|
|
9
9
|
def rails_best_practices_output
|
10
10
|
`cd tmp/aruba/#{@projectname}/ && #{rails_best_practices_cmd}`
|
11
|
+
.split("\n")
|
12
|
+
.reject { |line| line.match(/Found \d+ warnings/) }
|
13
|
+
.join("\n")
|
11
14
|
end
|
@@ -3,9 +3,10 @@ def executing_rails_security
|
|
3
3
|
end
|
4
4
|
|
5
5
|
def rails_security_output
|
6
|
+
regexp = Warder::RailsSecurityRunner::PRINTABLE_REGEXP
|
6
7
|
`cd tmp/aruba/#{@projectname}/ && brakeman -q -p .`
|
7
8
|
.split("\n")
|
8
|
-
.reject { |line| !
|
9
|
+
.reject { |line| !regexp.match(line) }
|
9
10
|
.join("\n")
|
10
11
|
end
|
11
12
|
|
@@ -1,11 +1,14 @@
|
|
1
1
|
def executing_gem_freshness
|
2
|
-
"executing 'bundle-audit update
|
2
|
+
"executing 'bundle-audit update &> /dev/null && (cd . && bundle-audit check)'"
|
3
3
|
end
|
4
4
|
|
5
5
|
def gem_freshness_output
|
6
6
|
if @projectname
|
7
7
|
prep = "cd spec/fixtures/#{@projectname}/ && cp Gemfile_lock Gemfile.lock"
|
8
8
|
`#{prep} && bundle-audit check; rm -f Gemfile.lock`
|
9
|
+
.split("\n")
|
10
|
+
.reject { |line| line.match('patched versions found') }
|
11
|
+
.join("\n")
|
9
12
|
else
|
10
13
|
fail NotImplementedError
|
11
14
|
end
|
@@ -6,6 +6,6 @@ def code_complexity_output
|
|
6
6
|
raw_output = command_output_for_project_or_file('flog -a -c -g -m')
|
7
7
|
raw_output.split("\n").reject do |line|
|
8
8
|
/total|average/.match(line) ||
|
9
|
-
Warder::CodeComplexityRunner::
|
9
|
+
Warder::CodeComplexityRunner::FAILURE_THRESHOLD > line.to_i
|
10
10
|
end.join("\n")
|
11
11
|
end
|
@@ -16,13 +16,13 @@ Then(/^warder does nothing$/) do
|
|
16
16
|
step 'the output should match /.{0}/'
|
17
17
|
end
|
18
18
|
|
19
|
-
Then(/^warder detects (.+) (issues|violations)$/) do |what, _|
|
19
|
+
Then(/^warder detects( no)? (.+) (issues|violations)$/) do |no, what, _|
|
20
20
|
executing_output = send(:"executing_#{what.gsub(' ', '_')}")
|
21
|
-
step "the output should contain \"#{executing_output}\""
|
21
|
+
step "the output should#{' not' if no} contain \"#{executing_output}\""
|
22
22
|
|
23
23
|
validation_output = send(:"#{what.gsub(' ', '_')}_output")
|
24
24
|
validation_output.split("\n").each do |string|
|
25
|
-
step "the output should contain \"#{string}\""
|
25
|
+
step "the output should#{' not' if no} contain \"#{string}\""
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
def executing_style_guide
|
2
|
-
"executing 'rubocop --no-color .'"
|
2
|
+
"executing 'rubocop --no-color --format clang .'"
|
3
3
|
end
|
4
4
|
|
5
5
|
def style_guide_output
|
6
|
-
command_output_for_project_or_file('rubocop')
|
6
|
+
command_output_for_project_or_file('rubocop --no-color --format clang')
|
7
7
|
end
|
@@ -5,17 +5,27 @@ module Warder
|
|
5
5
|
CLI_FULL_OPTION = 'bundle-audit'
|
6
6
|
DESCRIPTION = 'Run bundle freshness validation'
|
7
7
|
COMMAND_NAME = 'bundle-audit'
|
8
|
-
FAILURE_REGEXP = /
|
8
|
+
FAILURE_REGEXP = /(No u|U)npatched versions found/
|
9
9
|
|
10
10
|
private
|
11
11
|
|
12
|
+
attr_reader :stats_msg
|
13
|
+
|
12
14
|
def command_with_options
|
13
15
|
path = @options.files.split(' ').first
|
14
|
-
"#{COMMAND_NAME} update
|
16
|
+
"#{COMMAND_NAME} update &> /dev/null && "\
|
17
|
+
"(cd #{path} && #{COMMAND_NAME} check)"
|
18
|
+
end
|
19
|
+
|
20
|
+
def number_of_issues(line)
|
21
|
+
match = FAILURE_REGEXP.match(line)
|
22
|
+
return 0 unless match
|
23
|
+
@stats_msg = line
|
24
|
+
match[1].match('No ') ? 0 : 1
|
15
25
|
end
|
16
26
|
|
17
|
-
def
|
18
|
-
FAILURE_REGEXP.match(line)
|
27
|
+
def printable?(line)
|
28
|
+
super && !FAILURE_REGEXP.match(line)
|
19
29
|
end
|
20
30
|
end
|
21
31
|
end
|
data/lib/warder/cli/arguments.rb
CHANGED
@@ -21,6 +21,8 @@ module Warder
|
|
21
21
|
|
22
22
|
def parse_options
|
23
23
|
OptionParser.new do |opts|
|
24
|
+
quiet(opts)
|
25
|
+
stats(opts)
|
24
26
|
combined(opts)
|
25
27
|
validators(opts)
|
26
28
|
end.parse!(@argv)
|
@@ -44,6 +46,18 @@ module Warder
|
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
49
|
+
def quiet(opts)
|
50
|
+
opts.on('-q', '--quiet', 'Do not echo validators output.') do
|
51
|
+
@options['quiet'] = true
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def stats(opts)
|
56
|
+
opts.on('-t', '--[no-]stats', 'Print statistics.') do |value|
|
57
|
+
@options['stats'] = value
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
47
61
|
def all(opts)
|
48
62
|
opts.on('-A', '--all', 'Run all validators') do |value|
|
49
63
|
all_validators(value)
|
@@ -5,8 +5,8 @@ module Warder
|
|
5
5
|
CLI_FULL_OPTION = 'code-complexity'
|
6
6
|
DESCRIPTION = 'Run code complexity validation'
|
7
7
|
COMMAND_NAME = 'flog'
|
8
|
-
|
9
|
-
FAILURE_REGEXP = /^\s+(
|
8
|
+
FAILURE_THRESHOLD = SCORE
|
9
|
+
FAILURE_REGEXP = /^\s+(?<issues>\d+.\d+)\:\s.*$/
|
10
10
|
TOTAL_REGEXP = /^\s+\d+.\d+\:.*(total|average)$/
|
11
11
|
|
12
12
|
private
|
@@ -15,14 +15,17 @@ module Warder
|
|
15
15
|
"#{COMMAND_NAME} -a -c -g -m #{@options.files}"
|
16
16
|
end
|
17
17
|
|
18
|
+
def number_of_issues(line)
|
19
|
+
return 0 if total?(line)
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
18
23
|
def failed?(line)
|
19
|
-
|
20
|
-
return false if total?(line)
|
21
|
-
match && match[1].to_f > FLOG_SCORE
|
24
|
+
number_of_issues(line) != 0
|
22
25
|
end
|
23
26
|
|
24
27
|
def printable?(line)
|
25
|
-
failed?(line)
|
28
|
+
super && failed?(line)
|
26
29
|
end
|
27
30
|
|
28
31
|
def total?(line)
|
@@ -5,13 +5,20 @@ module Warder
|
|
5
5
|
CLI_FULL_OPTION = 'rails-advice'
|
6
6
|
DESCRIPTION = 'Run rails best practices validation'
|
7
7
|
COMMAND_NAME = 'rails_best_practices'
|
8
|
-
|
8
|
+
COMMAND_OPTIONS = '--without-color --silent --spec --test --features'
|
9
|
+
FAILURE_REGEXP = /Found (?<issues>\d+) warnings?/
|
9
10
|
|
10
11
|
private
|
11
12
|
|
13
|
+
attr_reader :stats_msg
|
14
|
+
|
12
15
|
def command_with_options
|
13
16
|
path = @options.files.split(' ').first
|
14
|
-
"#{COMMAND_NAME}
|
17
|
+
"#{COMMAND_NAME} #{COMMAND_OPTIONS} #{path}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def printable?(line)
|
21
|
+
super && !FAILURE_REGEXP.match(line)
|
15
22
|
end
|
16
23
|
end
|
17
24
|
end
|
@@ -5,8 +5,9 @@ module Warder
|
|
5
5
|
CLI_FULL_OPTION = 'rails-security'
|
6
6
|
DESCRIPTION = 'Run rails security validation'
|
7
7
|
COMMAND_NAME = 'brakeman'
|
8
|
-
FAILURE_REGEXP = /^\|
|
9
|
-
PRINTABLE_REGEXP =
|
8
|
+
FAILURE_REGEXP = /^\| (High|Medium|Weak)/
|
9
|
+
PRINTABLE_REGEXP =
|
10
|
+
/(\| Confidence)|(\| High)|(\| Medium)|(\| Weak)|(\+------------\+)/
|
10
11
|
|
11
12
|
private
|
12
13
|
|
@@ -16,7 +17,11 @@ module Warder
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def printable?(line)
|
19
|
-
PRINTABLE_REGEXP.match(line)
|
20
|
+
super && PRINTABLE_REGEXP.match(line)
|
21
|
+
end
|
22
|
+
|
23
|
+
def number_of_issues(line)
|
24
|
+
FAILURE_REGEXP.match(line) ? 1 : 0
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
data/lib/warder/runner.rb
CHANGED
@@ -7,38 +7,61 @@ module Warder
|
|
7
7
|
def initialize(stdout, options = {})
|
8
8
|
@stdout = stdout
|
9
9
|
@options = options
|
10
|
-
@
|
10
|
+
@issues = 0
|
11
11
|
end
|
12
12
|
|
13
13
|
def perform
|
14
14
|
run_command do |line|
|
15
|
+
@issues += number_of_issues(line)
|
15
16
|
@stdout.puts(line) if printable?(line)
|
16
|
-
@exit_code = 1 if failed?(line)
|
17
17
|
end
|
18
|
-
@
|
18
|
+
@issues > 0 ? 1 : 0
|
19
19
|
end
|
20
20
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def run_command
|
24
|
-
@stdout.puts
|
24
|
+
@stdout.puts(exec_msg) unless quiet?
|
25
25
|
IO.popen(command_with_options).each do |line|
|
26
26
|
yield(line)
|
27
27
|
end
|
28
|
+
@stdout.puts(stats_msg) if stats?
|
29
|
+
end
|
30
|
+
|
31
|
+
def exec_msg
|
32
|
+
"executing '#{command_with_options}'\n"
|
33
|
+
end
|
34
|
+
|
35
|
+
def stats_msg
|
36
|
+
"found #{@issues.to_i} #{klass::CLI_FULL_OPTION.sub('-', ' ')} issues\n"
|
28
37
|
end
|
29
38
|
|
30
39
|
def command_with_options
|
31
40
|
"#{self.class::COMMAND_NAME} #{@options.files}"
|
32
41
|
end
|
33
42
|
|
34
|
-
def
|
35
|
-
klass = self.class
|
43
|
+
def number_of_issues(line)
|
36
44
|
match = klass::FAILURE_REGEXP.match(line)
|
37
|
-
|
45
|
+
return 0 unless match
|
46
|
+
issues = match[:issues].to_i
|
47
|
+
return 0 unless issues > klass::FAILURE_THRESHOLD
|
48
|
+
issues
|
49
|
+
end
|
50
|
+
|
51
|
+
def printable?(_line)
|
52
|
+
!quiet?
|
53
|
+
end
|
54
|
+
|
55
|
+
def quiet?
|
56
|
+
@options['quiet']
|
57
|
+
end
|
58
|
+
|
59
|
+
def stats?
|
60
|
+
@options['stats']
|
38
61
|
end
|
39
62
|
|
40
|
-
def
|
41
|
-
|
63
|
+
def klass
|
64
|
+
self.class
|
42
65
|
end
|
43
66
|
end
|
44
67
|
end
|
@@ -5,7 +5,7 @@ module Warder
|
|
5
5
|
CLI_FULL_OPTION = 'sandi-rules'
|
6
6
|
DESCRIPTION = 'Run Sandi Metz rules validation'
|
7
7
|
COMMAND_NAME = 'sandi_meter'
|
8
|
-
FAILURE_REGEXP = /\d\. (
|
8
|
+
FAILURE_REGEXP = /\d\. (?<percentage>\d+)%/
|
9
9
|
FAILURE_THRESHOLD = 100
|
10
10
|
|
11
11
|
private
|
@@ -14,5 +14,16 @@ module Warder
|
|
14
14
|
path = @options.files.split(' ').first
|
15
15
|
"#{COMMAND_NAME} -d -p #{path}"
|
16
16
|
end
|
17
|
+
|
18
|
+
def number_of_issues(line)
|
19
|
+
match = klass::FAILURE_REGEXP.match(line)
|
20
|
+
return 0 unless match
|
21
|
+
percentage = match[:percentage].to_i
|
22
|
+
klass::FAILURE_THRESHOLD > percentage ? 1 : 0
|
23
|
+
end
|
24
|
+
|
25
|
+
def stats_msg
|
26
|
+
"broken #{@issues.to_i} out of 4 #{CLI_FULL_OPTION.sub('-', ' ')}\n"
|
27
|
+
end
|
17
28
|
end
|
18
29
|
end
|
@@ -4,7 +4,7 @@ module Warder
|
|
4
4
|
CLI_OPTION = 'g'
|
5
5
|
CLI_FULL_OPTION = 'style-guide'
|
6
6
|
DESCRIPTION = 'Run style guide validation'
|
7
|
-
COMMAND_NAME = 'rubocop --no-color'
|
8
|
-
FAILURE_REGEXP = /(
|
7
|
+
COMMAND_NAME = 'rubocop --no-color --format clang'
|
8
|
+
FAILURE_REGEXP = /(?<issues>\d+|no) offense/
|
9
9
|
end
|
10
10
|
end
|
data/lib/warder/version.rb
CHANGED
@@ -1,80 +1,106 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (4.0
|
5
|
-
actionpack (= 4.0
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
actionmailer (4.2.0)
|
5
|
+
actionpack (= 4.2.0)
|
6
|
+
actionview (= 4.2.0)
|
7
|
+
activejob (= 4.2.0)
|
8
|
+
mail (~> 2.5, >= 2.5.4)
|
9
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
10
|
+
actionpack (4.2.0)
|
11
|
+
actionview (= 4.2.0)
|
12
|
+
activesupport (= 4.2.0)
|
13
|
+
rack (~> 1.6.0)
|
12
14
|
rack-test (~> 0.6.2)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
17
|
+
actionview (4.2.0)
|
18
|
+
activesupport (= 4.2.0)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubis (~> 2.7.0)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
23
|
+
activejob (4.2.0)
|
24
|
+
activesupport (= 4.2.0)
|
25
|
+
globalid (>= 0.3.0)
|
26
|
+
activemodel (4.2.0)
|
27
|
+
activesupport (= 4.2.0)
|
28
|
+
builder (~> 3.1)
|
29
|
+
activerecord (4.2.0)
|
30
|
+
activemodel (= 4.2.0)
|
31
|
+
activesupport (= 4.2.0)
|
32
|
+
arel (~> 6.0)
|
33
|
+
activesupport (4.2.0)
|
34
|
+
i18n (~> 0.7)
|
35
|
+
json (~> 1.7, >= 1.7.7)
|
36
|
+
minitest (~> 5.1)
|
37
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
38
|
+
tzinfo (~> 1.1)
|
39
|
+
arel (6.0.0)
|
40
|
+
builder (3.2.2)
|
30
41
|
erubis (2.7.0)
|
42
|
+
globalid (0.3.0)
|
43
|
+
activesupport (>= 4.1.0)
|
31
44
|
hike (1.2.3)
|
32
|
-
i18n (0.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
45
|
+
i18n (0.7.0)
|
46
|
+
json (1.8.2)
|
47
|
+
loofah (2.0.1)
|
48
|
+
nokogiri (>= 1.5.9)
|
49
|
+
mail (2.6.3)
|
50
|
+
mime-types (>= 1.16, < 3)
|
51
|
+
mime-types (2.4.3)
|
52
|
+
mini_portile (0.6.2)
|
53
|
+
minitest (5.5.1)
|
54
|
+
multi_json (1.10.1)
|
55
|
+
nokogiri (1.6.6.2)
|
56
|
+
mini_portile (~> 0.6.0)
|
57
|
+
rack (1.6.0)
|
58
|
+
rack-test (0.6.3)
|
42
59
|
rack (>= 1.0)
|
43
|
-
rails (4.0
|
44
|
-
actionmailer (= 4.0
|
45
|
-
actionpack (= 4.0
|
46
|
-
|
47
|
-
|
60
|
+
rails (4.2.0)
|
61
|
+
actionmailer (= 4.2.0)
|
62
|
+
actionpack (= 4.2.0)
|
63
|
+
actionview (= 4.2.0)
|
64
|
+
activejob (= 4.2.0)
|
65
|
+
activemodel (= 4.2.0)
|
66
|
+
activerecord (= 4.2.0)
|
67
|
+
activesupport (= 4.2.0)
|
48
68
|
bundler (>= 1.3.0, < 2.0)
|
49
|
-
railties (= 4.0
|
50
|
-
sprockets-rails
|
51
|
-
|
52
|
-
|
53
|
-
|
69
|
+
railties (= 4.2.0)
|
70
|
+
sprockets-rails
|
71
|
+
rails-deprecated_sanitizer (1.0.3)
|
72
|
+
activesupport (>= 4.2.0.alpha)
|
73
|
+
rails-dom-testing (1.0.5)
|
74
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
75
|
+
nokogiri (~> 1.6.0)
|
76
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
77
|
+
rails-html-sanitizer (1.0.1)
|
78
|
+
loofah (~> 2.0)
|
79
|
+
railties (4.2.0)
|
80
|
+
actionpack (= 4.2.0)
|
81
|
+
activesupport (= 4.2.0)
|
54
82
|
rake (>= 0.8.7)
|
55
83
|
thor (>= 0.18.1, < 2.0)
|
56
|
-
rake (10.
|
57
|
-
sprockets (2.12.
|
84
|
+
rake (10.4.2)
|
85
|
+
sprockets (2.12.3)
|
58
86
|
hike (~> 1.2)
|
59
87
|
multi_json (~> 1.0)
|
60
88
|
rack (~> 1.0)
|
61
89
|
tilt (~> 1.1, != 1.3.0)
|
62
|
-
sprockets-rails (2.
|
90
|
+
sprockets-rails (2.2.4)
|
63
91
|
actionpack (>= 3.0)
|
64
92
|
activesupport (>= 3.0)
|
65
|
-
sprockets (
|
66
|
-
sqlite3 (1.3.
|
93
|
+
sprockets (>= 2.8, < 4.0)
|
94
|
+
sqlite3 (1.3.10)
|
67
95
|
thor (0.19.1)
|
68
|
-
thread_safe (0.3.
|
96
|
+
thread_safe (0.3.4)
|
69
97
|
tilt (1.4.1)
|
70
|
-
|
71
|
-
|
72
|
-
polyglot (>= 0.3.1)
|
73
|
-
tzinfo (0.3.39)
|
98
|
+
tzinfo (1.2.2)
|
99
|
+
thread_safe (~> 0.1)
|
74
100
|
|
75
101
|
PLATFORMS
|
76
102
|
ruby
|
77
103
|
|
78
104
|
DEPENDENCIES
|
79
|
-
rails (~> 4.0
|
105
|
+
rails (~> 4.2.0)
|
80
106
|
sqlite3
|
data/warder.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Warder::VERSION
|
9
9
|
spec.authors = ['Yura Tolstik']
|
10
10
|
spec.email = ['yltsrc@gmail.com']
|
11
|
-
spec.description =
|
12
|
-
spec.summary =
|
11
|
+
spec.description = 'Warder of ruby code'
|
12
|
+
spec.summary = 'Tool to help improve the quality of ruby code'
|
13
13
|
spec.homepage = 'https://github.com/yltsrc/warder'
|
14
14
|
spec.license = 'MIT'
|
15
15
|
|
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(/^(test|spec|features|cucumber)\//)
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'rubocop', '~> 0.
|
22
|
-
spec.add_dependency 'reek', '~> 1.
|
23
|
-
spec.add_dependency 'flay', '~> 2.5'
|
24
|
-
spec.add_dependency 'flog', '~> 4.
|
21
|
+
spec.add_dependency 'rubocop', '~> 0.28'
|
22
|
+
spec.add_dependency 'reek', '~> 1.6'
|
23
|
+
spec.add_dependency 'flay', '~> 2.5.0'
|
24
|
+
spec.add_dependency 'flog', '~> 4.3'
|
25
25
|
spec.add_dependency 'mago', '~> 0.1'
|
26
26
|
spec.add_dependency 'brakeman', '~> 2.6'
|
27
27
|
spec.add_dependency 'rails_best_practices', '~> 1.15'
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
32
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
33
33
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
34
|
-
spec.add_development_dependency 'cucumber', '~>
|
35
|
-
spec.add_development_dependency 'aruba', '~> 0.
|
36
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
34
|
+
spec.add_development_dependency 'cucumber', '~> 2.0.0.rc.3'
|
35
|
+
spec.add_development_dependency 'aruba', '~> 0.6'
|
36
|
+
spec.add_development_dependency 'simplecov', '~> 0.9'
|
37
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yura Tolstik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.28'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.28'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: reek
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: flay
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.5.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.5.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: flog
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '4.
|
61
|
+
version: '4.3'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '4.
|
68
|
+
version: '4.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mago
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,42 +184,42 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 2.0.0.rc.3
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 2.0.0.rc.3
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: aruba
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0.
|
201
|
+
version: '0.6'
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version: '0.
|
208
|
+
version: '0.6'
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
210
|
name: simplecov
|
211
211
|
requirement: !ruby/object:Gem::Requirement
|
212
212
|
requirements:
|
213
213
|
- - "~>"
|
214
214
|
- !ruby/object:Gem::Version
|
215
|
-
version: '0.
|
215
|
+
version: '0.9'
|
216
216
|
type: :development
|
217
217
|
prerelease: false
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '0.
|
222
|
+
version: '0.9'
|
223
223
|
description: Warder of ruby code
|
224
224
|
email:
|
225
225
|
- yltsrc@gmail.com
|
@@ -246,8 +246,10 @@ files:
|
|
246
246
|
- features/detects_code_duplication.feature
|
247
247
|
- features/detects_code_smells.feature
|
248
248
|
- features/detects_magick_numbers.feature
|
249
|
+
- features/quiet.feature
|
249
250
|
- features/run.feature
|
250
251
|
- features/show_version.feature
|
252
|
+
- features/statistics.feature
|
251
253
|
- features/step_definitions/checks_for_rails_best_practices_steps.rb
|
252
254
|
- features/step_definitions/checks_for_rails_security_issues_steps.rb
|
253
255
|
- features/step_definitions/checks_for_sandi_metz_rules_step.rb
|
@@ -258,6 +260,7 @@ files:
|
|
258
260
|
- features/step_definitions/detects_magick_numbers_steps.rb
|
259
261
|
- features/step_definitions/run_steps.rb
|
260
262
|
- features/step_definitions/show_version_steps.rb
|
263
|
+
- features/step_definitions/statistics_steps.rb
|
261
264
|
- features/step_definitions/validates_style_guide_steps.rb
|
262
265
|
- features/support/env.rb
|
263
266
|
- features/validates_style_guide.feature
|
@@ -349,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
352
|
version: '0'
|
350
353
|
requirements: []
|
351
354
|
rubyforge_project:
|
352
|
-
rubygems_version: 2.
|
355
|
+
rubygems_version: 2.4.5
|
353
356
|
signing_key:
|
354
357
|
specification_version: 4
|
355
358
|
summary: Tool to help improve the quality of ruby code
|
@@ -364,8 +367,10 @@ test_files:
|
|
364
367
|
- features/detects_code_duplication.feature
|
365
368
|
- features/detects_code_smells.feature
|
366
369
|
- features/detects_magick_numbers.feature
|
370
|
+
- features/quiet.feature
|
367
371
|
- features/run.feature
|
368
372
|
- features/show_version.feature
|
373
|
+
- features/statistics.feature
|
369
374
|
- features/step_definitions/checks_for_rails_best_practices_steps.rb
|
370
375
|
- features/step_definitions/checks_for_rails_security_issues_steps.rb
|
371
376
|
- features/step_definitions/checks_for_sandi_metz_rules_step.rb
|
@@ -376,6 +381,7 @@ test_files:
|
|
376
381
|
- features/step_definitions/detects_magick_numbers_steps.rb
|
377
382
|
- features/step_definitions/run_steps.rb
|
378
383
|
- features/step_definitions/show_version_steps.rb
|
384
|
+
- features/step_definitions/statistics_steps.rb
|
379
385
|
- features/step_definitions/validates_style_guide_steps.rb
|
380
386
|
- features/support/env.rb
|
381
387
|
- features/validates_style_guide.feature
|