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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14c21dbe89798e76d232c029d5cae8843e1a25bc313453abbdb9ff6e3a7feed7
4
- data.tar.gz: 14771453a1f39e857f5cb0edee0670ed332dfd71f90db6ae5e40579703037911
3
+ metadata.gz: e9d3de45148c936da6efb0f3f3ae56a53aa3574a52d64334c270a54addd16669
4
+ data.tar.gz: a4d246801ee4e301ba5e12230fc66488b90a6ce6ae6af9d6c510a90ff5e1c10c
5
5
  SHA512:
6
- metadata.gz: d04a46e35c7ab0c314ae88dc431ceb373822074b146c92864a6c992df352bb1d53f3e3ee3d13130e23dda6de0463cf3a1455da26caf60b5ef4be29ba7d0824bb
7
- data.tar.gz: 7d586e920c1b053fae07373a41a496a9c4a4a8b1e7de661a3c902ea461d9a8080dafc97b625ab40290e0f3ca5b3912f0d43a38057a41815d37c011b0d6b32fac
6
+ metadata.gz: fb0e1511bd8dee8785c1f2aadec5e96140ad2d16dff6f4b3303a57e7f19b6b16236f62a7456bb6b2801f7439b2f270b3d92f1e8738ad1ba422896414b1fbc6fa
7
+ data.tar.gz: 876e391294b55080b4ca6eced2fee4788be6e3d9f1ffafdacba0a8fc884c76e236e08d1d572f32da277f7d110384ac69301eac3314a980f472860e6a4cabea42
data/.gitignore CHANGED
@@ -7,6 +7,10 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
+ # development files
11
+ .ruby-gemset
12
+ .ruby-version
13
+
10
14
  # rspec failure tracking
11
15
  .rspec_status
12
16
  *.gem
data/.rubocop.yml CHANGED
@@ -1,10 +1,11 @@
1
- require: rubocop-rails
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', 'xdescribe', 'context', 'xcontext', 'it', 'xit', 'let', 'before', 'after', 'aggregate_failures'
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
@@ -4,4 +4,9 @@ language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
6
  - 2.6.3
7
- before_install: gem install bundler -v 2.0.2
7
+ before_install:
8
+ - gem install bundler -v 2.0.2
9
+ - bundle install
10
+ script:
11
+ - bundle exec rubocop
12
+ - bundle exec rspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- axr (0.6.0)
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.1)
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.0)
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.18.0)
42
- parser (2.6.5.0)
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.0)
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', '~> 0.20'
33
+ spec.add_dependency 'thor', '~> 0.20'
34
34
 
35
- spec.add_development_dependency 'bundler', '~> 2.0'
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', '~> 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'
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 if ctx.familiar_with.map(&:to_s).include?(dependncy.to_s)
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
@@ -7,7 +7,7 @@ module AxR
7
7
  desc 'check PATH', 'Start AxR runner'
8
8
 
9
9
  option :format # TODO: Add formats
10
- option :load # TODO: Add formats
10
+ option :load # TODO: Add formats
11
11
 
12
12
  def check(pattern = nil)
13
13
  $LOAD_PATH << Dir.pwd
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 = AxR::Scanner.new(file_path: file_path).scan
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 ||= if scan_single_file?
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AxR
4
- VERSION = '0.6.1'
4
+ VERSION = '0.6.2'
5
5
  end
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.1
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-02 00:00:00.000000000 Z
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.6
185
+ rubygems_version: 3.0.3
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: Code checker for AxR compliance.