pronto-reek 0.7.1 → 0.11.0

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
- SHA1:
3
- metadata.gz: ed8d5be1f053ea00dd3e19d03f620f075e4e0f28
4
- data.tar.gz: a57344adb5cd977bc81f669a93100bc67ef019ae
2
+ SHA256:
3
+ metadata.gz: ebed4d6ab7362fe0f4f1b37c40c5ba95edaa6a5c1b0f960e20322d613e1c8495
4
+ data.tar.gz: 6005887397fc4ee0ac778ea0a1bb7098487902b4b0fdf0ea4bab4184e92a1b42
5
5
  SHA512:
6
- metadata.gz: eaad1518cce91fbedfcea24c269b1b56205c58a257e867eaaf7e6788d17a82481d84f97a264ad1de6bac0b607aa5b634a5301a1eabb25a30653021e3dc2a3d30
7
- data.tar.gz: db8d893140b77e45303a9e38b47b487343fad7654b2be4bb8584061260de445825fec594f6b845ea5c7b748ea61547bf346f08a170bdb3708c2a50b6a4ddf2db
6
+ metadata.gz: 22f5252739818daea901f4d555b532e62a5b8137fe5256c68f8c8885f558c129b7909669d2ec12c0f325a2807b7b184ee6411d53095d6662a12dbcae495915e1
7
+ data.tar.gz: e91411b91f0784f905e8cfb2c02c750e8de205387bf045b23b9ea20babb43293b96f00b7f9b3ba3c6b9be922326f3e3017a058f64ab69f973501b7c6dece533a
@@ -0,0 +1,3 @@
1
+ # Order is important. The last matching pattern takes the most precedence.
2
+ # Default owners for everything in the repo.
3
+ * @prontolabs/core
@@ -0,0 +1,22 @@
1
+ name: Checks
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ ruby:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true
21
+ - name: rake spec
22
+ run: bundle exec rake spec
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2016 Mindaugas Mozūras
3
+ Copyright (c) 2017 Mindaugas Mozūras
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Pronto runner for Reek
2
2
 
3
- [![Code Climate](https://codeclimate.com/github/mmozuras/pronto-reek.png)](https://codeclimate.com/github/mmozuras/pronto-reek)
4
- [![Build Status](https://travis-ci.org/mmozuras/pronto-reek.png)](https://travis-ci.org/mmozuras/pronto-reek)
3
+ [![Code Climate](https://codeclimate.com/github/prontolabs/pronto-reek.png)](https://codeclimate.com/github/prontolabs/pronto-reek)
4
+ [![Build Status](https://travis-ci.org/prontolabs/pronto-reek.png)](https://travis-ci.org/prontolabs/pronto-reek)
5
5
  [![Gem Version](https://badge.fury.io/rb/pronto-reek.png)](http://badge.fury.io/rb/pronto-reek)
6
- [![Dependency Status](https://gemnasium.com/mmozuras/pronto-reek.png)](https://gemnasium.com/mmozuras/pronto-reek)
6
+ [![Dependency Status](https://gemnasium.com/prontolabs/pronto-reek.png)](https://gemnasium.com/prontolabs/pronto-reek)
7
7
 
8
- Pronto runner for [Reek](https://github.com/troessner/reek), code smell detector for Ruby. [What is Pronto?](https://github.com/mmozuras/pronto)
8
+ Pronto runner for [Reek](https://github.com/troessner/reek), code smell detector for Ruby. [What is Pronto?](https://github.com/prontolabs/pronto)
9
9
 
10
10
  ## Configuration
11
11
 
@@ -4,8 +4,11 @@ require 'reek'
4
4
  module Pronto
5
5
  class Reek < Runner
6
6
  def run
7
- files = ruby_patches.map(&:new_file_full_path)
8
- configuration = ::Reek::Configuration::AppConfiguration.from_path
7
+ files = ruby_patches.map do |patch|
8
+ patch.new_file_full_path.relative_path_from(Pathname.pwd)
9
+ end
10
+
11
+ configuration = ::Reek::Configuration::AppConfiguration.from_path(nil)
9
12
 
10
13
  smells = files.flat_map do |file|
11
14
  ::Reek::Examiner.new(file, configuration: configuration).smells
@@ -30,14 +33,14 @@ module Pronto
30
33
 
31
34
  def new_message(line, error)
32
35
  path = line.patch.delta.new_file[:path]
33
- message = "#{error.message.capitalize} (#{error.smell_type})"
36
+ message = "#{error.message.capitalize} - [#{error.smell_type}](#{error.explanatory_link})"
34
37
 
35
38
  Message.new(path, line, :info, message, nil, self.class)
36
39
  end
37
40
 
38
41
  def patch_for_error(error)
39
42
  ruby_patches.find do |patch|
40
- patch.new_file_full_path.to_s == error.source
43
+ patch.new_file_full_path.relative_path_from(Pathname.pwd).to_s == error.source
41
44
  end
42
45
  end
43
46
  end
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module ReekVersion
3
- VERSION = '0.7.1'.freeze
3
+ VERSION = '0.11.0'.freeze
4
4
  end
5
5
  end
@@ -10,11 +10,11 @@ Gem::Specification.new do |s|
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.author = 'Mindaugas Mozūras'
12
12
  s.email = 'mindaugas.mozuras@gmail.com'
13
- s.homepage = 'http://github.org/mmozuras/pronto-reek'
13
+ s.homepage = 'http://github.com/mmozuras/pronto-reek'
14
14
  s.summary = 'Pronto runner for Reek, code smell detector for Ruby'
15
15
 
16
16
  s.licenses = ['MIT']
17
- s.required_ruby_version = '>= 2.0.0'
17
+ s.required_ruby_version = '>= 2.3.0'
18
18
  s.rubygems_version = '1.8.23'
19
19
 
20
20
  s.files = `git ls-files`.split($RS).reject do |file|
@@ -32,9 +32,9 @@ Gem::Specification.new do |s|
32
32
  s.extra_rdoc_files = ['LICENSE', 'README.md']
33
33
  s.require_paths = ['lib']
34
34
 
35
- s.add_dependency('pronto', '~> 0.7.0')
36
- s.add_dependency('reek', '~> 4.2')
37
- s.add_development_dependency('rake', '~> 11.0')
35
+ s.add_dependency('pronto', '~> 0.11.0')
36
+ s.add_dependency('reek', '>= 4.2', '< 7.0')
37
+ s.add_development_dependency('rake', '~> 12.0')
38
38
  s.add_development_dependency('rspec', '~> 3.4')
39
39
  s.add_development_dependency('rspec-its', '~> 1.2')
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-03 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -16,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.0
19
+ version: 0.11.0
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.7.0
26
+ version: 0.11.0
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
33
  version: '4.2'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '7.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '4.2'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '7.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '11.0'
53
+ version: '12.0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '11.0'
60
+ version: '12.0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rspec
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -88,12 +94,14 @@ extra_rdoc_files:
88
94
  - LICENSE
89
95
  - README.md
90
96
  files:
97
+ - ".github/CODEOWNERS"
98
+ - ".github/workflows/checks.yml"
91
99
  - LICENSE
92
100
  - README.md
93
101
  - lib/pronto/reek.rb
94
102
  - lib/pronto/reek/version.rb
95
103
  - pronto-reek.gemspec
96
- homepage: http://github.org/mmozuras/pronto-reek
104
+ homepage: http://github.com/mmozuras/pronto-reek
97
105
  licenses:
98
106
  - MIT
99
107
  metadata: {}
@@ -105,15 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
113
  requirements:
106
114
  - - ">="
107
115
  - !ruby/object:Gem::Version
108
- version: 2.0.0
116
+ version: 2.3.0
109
117
  required_rubygems_version: !ruby/object:Gem::Requirement
110
118
  requirements:
111
119
  - - ">="
112
120
  - !ruby/object:Gem::Version
113
121
  version: '0'
114
122
  requirements: []
115
- rubyforge_project:
116
- rubygems_version: 2.4.5
123
+ rubygems_version: 3.0.3
117
124
  signing_key:
118
125
  specification_version: 4
119
126
  summary: Pronto runner for Reek, code smell detector for Ruby