axr 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.rubocop.yml +12 -3
- data/.travis.yml +6 -1
- data/Gemfile.lock +6 -6
- data/axr.gemspec +6 -6
- data/lib/axr/app.rb +1 -1
- data/lib/axr/cli.rb +1 -1
- data/lib/axr/runner.rb +3 -6
- data/lib/axr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9d3de45148c936da6efb0f3f3ae56a53aa3574a52d64334c270a54addd16669
|
4
|
+
data.tar.gz: a4d246801ee4e301ba5e12230fc66488b90a6ce6ae6af9d6c510a90ff5e1c10c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb0e1511bd8dee8785c1f2aadec5e96140ad2d16dff6f4b3303a57e7f19b6b16236f62a7456bb6b2801f7439b2f270b3d92f1e8738ad1ba422896414b1fbc6fa
|
7
|
+
data.tar.gz: 876e391294b55080b4ca6eced2fee4788be6e3d9f1ffafdacba0a8fc884c76e236e08d1d572f32da277f7d110384ac69301eac3314a980f472860e6a4cabea42
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
require: rubocop
|
1
|
+
require: rubocop
|
2
2
|
|
3
3
|
AllCops:
|
4
4
|
TargetRubyVersion: 2.6
|
5
5
|
Exclude:
|
6
6
|
- bin/*
|
7
7
|
- Guardfile
|
8
|
+
- vendor/**/*
|
8
9
|
|
9
10
|
Style/Documentation:
|
10
11
|
Enabled: false
|
@@ -14,10 +15,18 @@ Metrics/LineLength:
|
|
14
15
|
|
15
16
|
Metrics/BlockLength:
|
16
17
|
ExcludedMethods: [
|
17
|
-
'describe',
|
18
|
+
'describe',
|
19
|
+
'xdescribe',
|
20
|
+
'context',
|
21
|
+
'xcontext',
|
22
|
+
'it',
|
23
|
+
'xit',
|
24
|
+
'let',
|
25
|
+
'before',
|
26
|
+
'after',
|
27
|
+
'aggregate_failures'
|
18
28
|
]
|
19
29
|
|
20
|
-
|
21
30
|
Metrics/MethodLength:
|
22
31
|
Max: 15
|
23
32
|
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
axr (0.6.
|
4
|
+
axr (0.6.2)
|
5
5
|
colorize (~> 0.8.1)
|
6
6
|
thor (~> 0.20)
|
7
7
|
|
@@ -12,7 +12,7 @@ GEM
|
|
12
12
|
coderay (1.1.2)
|
13
13
|
colorize (0.8.1)
|
14
14
|
diff-lcs (1.3)
|
15
|
-
ffi (1.11.
|
15
|
+
ffi (1.11.3)
|
16
16
|
formatador (0.2.5)
|
17
17
|
guard (2.16.1)
|
18
18
|
formatador (>= 0.2.4)
|
@@ -29,7 +29,7 @@ GEM
|
|
29
29
|
guard-compat (~> 1.1)
|
30
30
|
rspec (>= 2.99.0, < 4.0)
|
31
31
|
jaro_winkler (1.5.4)
|
32
|
-
listen (3.2.
|
32
|
+
listen (3.2.1)
|
33
33
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
34
34
|
rb-inotify (~> 0.9, >= 0.9.10)
|
35
35
|
lumberjack (1.0.13)
|
@@ -38,8 +38,8 @@ GEM
|
|
38
38
|
notiffany (0.1.3)
|
39
39
|
nenv (~> 0.1)
|
40
40
|
shellany (~> 0.0)
|
41
|
-
parallel (1.
|
42
|
-
parser (2.
|
41
|
+
parallel (1.19.1)
|
42
|
+
parser (2.7.0.0)
|
43
43
|
ast (~> 2.4.0)
|
44
44
|
pry (0.12.2)
|
45
45
|
coderay (~> 1.1.0)
|
@@ -47,7 +47,7 @@ GEM
|
|
47
47
|
rainbow (3.0.0)
|
48
48
|
rake (10.5.0)
|
49
49
|
rb-fsevent (0.10.3)
|
50
|
-
rb-inotify (0.10.
|
50
|
+
rb-inotify (0.10.1)
|
51
51
|
ffi (~> 1.0)
|
52
52
|
rspec (3.9.0)
|
53
53
|
rspec-core (~> 3.9.0)
|
data/axr.gemspec
CHANGED
@@ -30,12 +30,12 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.require_paths = 'lib'
|
31
31
|
|
32
32
|
spec.add_dependency 'colorize', '~> 0.8.1'
|
33
|
-
spec.add_dependency 'thor',
|
33
|
+
spec.add_dependency 'thor', '~> 0.20'
|
34
34
|
|
35
|
-
spec.add_development_dependency 'bundler',
|
35
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
36
36
|
spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
|
37
|
-
spec.add_development_dependency 'pry',
|
38
|
-
spec.add_development_dependency 'rake',
|
39
|
-
spec.add_development_dependency 'rspec',
|
40
|
-
spec.add_development_dependency 'rubocop',
|
37
|
+
spec.add_development_dependency 'pry', '~> 0.12.2'
|
38
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
39
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
40
|
+
spec.add_development_dependency 'rubocop', '~> 0.76.0'
|
41
41
|
end
|
data/lib/axr/app.rb
CHANGED
@@ -38,7 +38,7 @@ module AxR
|
|
38
38
|
|
39
39
|
return false unless ctx && dep
|
40
40
|
return false if ctx.isolated? && ctx.familiar_with.empty?
|
41
|
-
return true
|
41
|
+
return true if ctx.familiar_with.map(&:to_s).include?(dependncy.to_s)
|
42
42
|
|
43
43
|
ctx.level < dep.level
|
44
44
|
end
|
data/lib/axr/cli.rb
CHANGED
data/lib/axr/runner.rb
CHANGED
@@ -16,8 +16,9 @@ module AxR
|
|
16
16
|
|
17
17
|
def invoke
|
18
18
|
files_with_warnings = files_to_scan.each_with_object({}) do |file_path, issues|
|
19
|
-
scan_result
|
19
|
+
scan_result = AxR::Scanner.new(file_path: file_path).scan
|
20
20
|
issues[file_path] = scan_result.warnings if scan_result.warnings.any?
|
21
|
+
|
21
22
|
formatter.single_file(scan_result, file_path)
|
22
23
|
end
|
23
24
|
|
@@ -29,11 +30,7 @@ module AxR
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def files_to_scan
|
32
|
-
@files_to_scan ||=
|
33
|
-
[target]
|
34
|
-
else
|
35
|
-
Dir.glob("#{target_dir}**/*.rb")
|
36
|
-
end
|
33
|
+
@files_to_scan ||= scan_single_file? ? [target] : Dir.glob("#{target_dir}**/*#{DOT_RB}")
|
37
34
|
end
|
38
35
|
|
39
36
|
private
|
data/lib/axr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Volodya Sveredyuk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
- !ruby/object:Gem::Version
|
183
183
|
version: '0'
|
184
184
|
requirements: []
|
185
|
-
rubygems_version: 3.0.
|
185
|
+
rubygems_version: 3.0.3
|
186
186
|
signing_key:
|
187
187
|
specification_version: 4
|
188
188
|
summary: Code checker for AxR compliance.
|