rf-stylez 0.14.0 → 0.15.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
2
  SHA256:
3
- metadata.gz: 61997bdfb767ee58340845830dd03f1a71f9432318818ddca2c511f70d570dbb
4
- data.tar.gz: 96b7a3c0213e4980736a2a32f45827776b9eb376399f2ca2a32fcff468da1f28
3
+ metadata.gz: dabfb6bdefd559bfb1ca403063aac170af0afa2911071e07d4371c68ee920fac
4
+ data.tar.gz: de44cce547e0d636b77f4dad9fafbeb1506d6b8867d91b9fdcb176027f0d13be
5
5
  SHA512:
6
- metadata.gz: f9f9830783fc1680ff00cbcc316f324e330815d59f603c2c539830f76df2fd12b887d44a3f53c22d560450533860bb5209fdb79c00b827e5c0ec3f6c1a0623c8
7
- data.tar.gz: 042cff1fe645245641e7cdd34250f343b9853c53939de469106794fb4021aefc83f2572b495efc01630b6ca2b8a9aa82b89b521c968c1b6b46edcf7a6e781dbc
6
+ metadata.gz: d5e4a563aed6f99e1adac6d022432145b003f2a43f733eebde65e59dd7499d3bbe0b8e6f08da2452c1881b02cdb5e57770f17b52ed22b55e48aa242200b58f25
7
+ data.tar.gz: 5dc42162dcc4aec2543d069a26252ad738d79cc4425a7530a541652cf9dc3b7fc75fb1da991c325016ece7cfb58ed75e1687ee1d80de8b3ae51c1673c6f36bd2
data/Gemfile CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org' do
4
- # Specify your gem's dependencies in rf-stylez.gemspec
5
- gemspec
6
- end
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
data/bin/rf-stylez CHANGED
@@ -4,9 +4,12 @@ require "bundler/setup"
4
4
  require "rf/stylez"
5
5
 
6
6
  command = ARGV.first
7
- unless command == 'check-latest'
8
- STDERR.puts('Usage: rf-stylez check-latest')
9
- return
7
+ case command
8
+ when 'check-latest'
9
+ Rf::Stylez::UpdateCheck.check
10
+ when 'reek-config-path'
11
+ puts(Rf::Stylez.reek_config_path)
12
+ else
13
+ STDERR.puts('Usage: rf-stylez [check-latest][reek-config-path]')
10
14
  end
11
15
 
12
- Rf::Stylez::UpdateCheck.check
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rf
4
4
  module Stylez
5
- VERSION = '0.14.0'
5
+ VERSION = '0.15.0'
6
6
  end
7
7
  end
data/lib/rf/stylez.rb CHANGED
@@ -13,5 +13,8 @@ require 'rubocop/cop/lint/no_vcr_recording'
13
13
 
14
14
  module Rf
15
15
  module Stylez
16
+ def self.reek_config_path
17
+ File.expand_path("../../ruby/.reek.yml", __dir__)
18
+ end
16
19
  end
17
20
  end
data/rf-stylez.gemspec CHANGED
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_runtime_dependency 'rubocop', '1.15.0'
23
23
  spec.add_runtime_dependency 'rubocop-rails', '2.10.1'
24
24
  spec.add_runtime_dependency 'rubocop-rspec', '2.3.0'
25
+ spec.add_runtime_dependency 'reek', '~> 6.1'
25
26
  spec.add_runtime_dependency 'get_env', '~> 0.2.0'
26
27
  spec.add_runtime_dependency 'semantic_versioning', '~> 0.2'
27
28
  spec.add_runtime_dependency 'unparser', '~> 0.6'
data/ruby/.reek.yml ADDED
@@ -0,0 +1,62 @@
1
+ ---
2
+ ### Generic smell configuration
3
+
4
+ # You can check all defaults at https://github.com/troessner/reek/blob/master/docs/defaults.reek.yml
5
+ detectors:
6
+ # IrresponsibleModule duplicates rubocop top-level comment rule
7
+ IrresponsibleModule:
8
+ enabled: false
9
+
10
+ NestedIterators:
11
+ max_allowed_nesting: 1
12
+
13
+ UtilityFunction:
14
+ public_methods_only: true
15
+
16
+ TooManyStatements:
17
+ max_statements: 10
18
+
19
+ TooManyMethods:
20
+ max_methods: 20
21
+
22
+ TooManyInstanceVariables:
23
+ max_instance_variables: 8
24
+
25
+ ### Directory specific configuration
26
+
27
+ # You can configure smells on a per-directory base.
28
+ # E.g. the classic Rails case: controllers smell of NestedIterators (see /docs/Nested-Iterators.md) and
29
+ # helpers smell of UtilityFunction (see docs/Utility-Function.md)
30
+ #
31
+ # Note that we only allow configuration on a directory level, not a file level,
32
+ # so all paths have to point to directories.
33
+ # A Dir.glob pattern can be used.
34
+ directories:
35
+ "app/controllers":
36
+ NestedIterators:
37
+ max_allowed_nesting: 2
38
+ UnusedPrivateMethod:
39
+ enabled: false
40
+ InstanceVariableAssumption:
41
+ enabled: false
42
+ "app/helpers":
43
+ UtilityFunction:
44
+ enabled: false
45
+ "app/mailers":
46
+ InstanceVariableAssumption:
47
+ enabled: false
48
+ "app/models":
49
+ InstanceVariableAssumption:
50
+ enabled: false
51
+ "app/rack/api":
52
+ MissingSafeMethod:
53
+ exclude:
54
+ - validate_param!
55
+ InstanceVariableAssumption:
56
+ enabled: false
57
+
58
+ exclude_paths:
59
+ - db/
60
+ - script/
61
+ - bin/
62
+ - app/jobs/data_correction/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rf-stylez
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emanuel Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.3.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: reek
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '6.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '6.1'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: get_env
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -177,7 +191,6 @@ files:
177
191
  - ".gitignore"
178
192
  - ".rspec"
179
193
  - ".rubocop.yml"
180
- - ".travis.yml"
181
194
  - Gemfile
182
195
  - LICENSE
183
196
  - README.md
@@ -197,6 +210,7 @@ files:
197
210
  - lib/rubocop/cop/lint/use_positive_int32_validator.rb
198
211
  - rails/rubocop.yml
199
212
  - rf-stylez.gemspec
213
+ - ruby/.reek.yml
200
214
  - ruby/rubocop.yml
201
215
  - ruby/rubocop_lint.yml
202
216
  homepage: https://github.com/rainforestapp/rf-stylez
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6.3
4
- - 2.5.1
5
- - 2.4.4
6
- before_install: gem install bundler -v 1.10.6