rf-stylez 0.12.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: 379e37d37df24166deb38eef0b97d0373a6734aeb738b8bfb80637bf118bc012
4
- data.tar.gz: b6b1d14e28ae49b27e9e25f766d729b8bddea43b5227010b129690bbb58e19db
3
+ metadata.gz: dabfb6bdefd559bfb1ca403063aac170af0afa2911071e07d4371c68ee920fac
4
+ data.tar.gz: de44cce547e0d636b77f4dad9fafbeb1506d6b8867d91b9fdcb176027f0d13be
5
5
  SHA512:
6
- metadata.gz: 6cba253d02a644530d184380ba14d9bc716190866c8e891f547bd791d08d016b8ecbe82ff6bf366a89af79fac879c71b6d58643b8eb4fe1968c793c6bc29bd93
7
- data.tar.gz: 2dbb03b8a502241e7ff0494414753281bf5a5d8352c9e781a3803fcecefdb3a3addf94e399939f0946681cfa904a41f6fca1c104920a827304ba171cfa82801c
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.12.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/
data/ruby/rubocop.yml CHANGED
@@ -135,7 +135,18 @@ Style/MethodCallWithoutArgsParentheses:
135
135
  Style/InfiniteLoop:
136
136
  Enabled: true
137
137
  Style/StringLiterals:
138
- Enabled: true
138
+ Description: 'Checks if uses of quotes match the configured preference.'
139
+ StyleGuide: '#consistent-string-literals'
140
+ Enabled: true
141
+ VersionAdded: '0.9'
142
+ VersionChanged: '0.36'
143
+ EnforcedStyle: double_quotes
144
+ SupportedStyles:
145
+ - single_quotes
146
+ - double_quotes
147
+ # If `true`, strings which span multiple lines using `\` for continuation must
148
+ # use the same type of quotes on each line.
149
+ ConsistentQuotesInMultiline: true
139
150
  Style/AndOr:
140
151
  Enabled: true
141
152
  Style/Not:
@@ -165,12 +176,18 @@ Style/SymbolProc:
165
176
  Enabled: true
166
177
  Style/RegexpLiteral:
167
178
  Enabled: true
179
+ Style/Documentation:
180
+ Enabled: true
181
+ Style/DocumentationMethod:
182
+ Enabled: false
168
183
 
169
184
  Layout/LineLength:
170
185
  Enabled: true
171
186
  Max: 120
172
187
  AllowHeredoc: true
173
188
  AllowURI: true
189
+ Layout/EmptyLineAfterMagicComment:
190
+ Enabled: true
174
191
 
175
192
  # Dumb lint cops
176
193
  Lint/AmbiguousOperator:
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.12.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: 2021-08-23 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