rubocop-pragmatic 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 279663b84fd9327c641c218ec82603a492215cf58d414048d389be04bd67a452
4
- data.tar.gz: a2365bbbb45f3d0f1460e6884f610b3dbbd332c87667c12b69d74ba254dad11e
3
+ metadata.gz: 007af80a5d8315e64b99dc45bce22ffe23d00ae4b63fa41093eb9af884c34c30
4
+ data.tar.gz: b394b5269f29dfc7423dd0fd67b1196f0634b017f71a0003f85e603181c66a5c
5
5
  SHA512:
6
- metadata.gz: 10e147719f7272766e0a5567445cde27723b551382fc6a97c832169f00ebe515807150b153e606c146889775c5042d57f24c56363d98fe24dd38b8081e545467
7
- data.tar.gz: e4f125962e6d30278814882773e7deb48197588ebe831f91c6799f1d723053f4cdf00bd3d7e4e9e08ef86fcd3da66cb3e5aff19d372412edf96b3e3ff55a5308
6
+ metadata.gz: 6d1fa400b4709a36b398a4a2bee13116669f1f2f76915ed375db17db77b92c01c2c81e54b0a0a92b52fca23246942867db43ebf3eadde1c771b5d54ac5e58953
7
+ data.tar.gz: 4434ec5f0fa86d5cdb91754a98f2f418a67422142589186c7d00d089520e15b3b2634427a0cd7272f409595b64c4ba4512437ece9c4aa36578be293ae06ac8e8
data/README.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Pragmatic Ruby Styling for Projects
2
2
 
3
- [![Gem Version](http://img.shields.io/gem/v/rubocop-pragmatic.svg)](https://rubygems.org/gems/strip_attributes)
3
+ [![Gem Version](http://img.shields.io/gem/v/rubocop-pragmatic.svg)](https://rubygems.org/gems/rubocop-pragmatic)
4
4
  [![CI](https://github.com/rmm5t/rubocop-pragmatic/actions/workflows/ci.yml/badge.svg)](https://github.com/rmm5t/rubocop-pragmatic/actions/workflows/ci.yml)
5
- [![Gem Downloads](https://img.shields.io/gem/dt/rubocop-pragmatic.svg)](https://rubygems.org/gems/strip_attributes)
5
+ [![Gem Downloads](https://img.shields.io/gem/dt/rubocop-pragmatic.svg)](https://rubygems.org/gems/rubocop-pragmatic)
6
+
7
+ Setting up a new project with [Rubocop](https://rubocop.org/) can take some
8
+ time. There are several decisions to make and many plugins to consider. This
9
+ gem attempts to alleviate some of this hassle by both currating a default set
10
+ of plugins and a default set of config overrides. Rubocop's defaults are
11
+ usually top notch, but there are a few areas where the cops might be
12
+ considered a little too pedantic and/or strict. This gem attempts to find a
13
+ reasonable and _pragmatic_ middle ground to get a new project off the ground
14
+ and running well with Ruby's favorite linter.
6
15
 
7
16
  ## Installation
8
17
 
@@ -48,13 +57,14 @@ inherit_mode:
48
57
  # Your own specialized rules go here
49
58
  ```
50
59
 
51
- `rubocop-pragmatic` is opionated about minitest, but offers the option to customize with `rubocop-rspec`:
60
+ `rubocop-pragmatic` is opionated about minitest, but offers the option to customize with `rubocop-rspec` and `rubocop-rspec_rails`:
52
61
 
53
62
  ```yml
54
63
  inherit_gem:
55
64
  rubocop-pragmatic:
56
- - ruby.yml
65
+ - rails.yml
57
66
  - rubocop-rspec.yml
67
+ - rubocop-rspec_rails.yml
58
68
 
59
69
  Minitest:
60
70
  Enabled: false
@@ -62,6 +72,21 @@ Minitest:
62
72
  # Your own specialized rules go here
63
73
  ```
64
74
 
75
+ ## Fail Level Recommendation
76
+
77
+ It's also recommended to set `--fail-level=convention`. `Metrics` and
78
+ `Performance` cops run at the "refactor" level while all other cops run at the
79
+ "convention" level. This is intentional as to not return an failure exit code
80
+ for `Metrics` or `Performance` cops. e.g. Sometimes, these cops need to be
81
+ ignored while dealing with hotfixes, etc.
82
+
83
+ This can be set on a project by adding a `.rubocop` file in the root of your
84
+ project:
85
+
86
+ ```txt
87
+ --fail-level=convention
88
+ ```
89
+
65
90
  ## License
66
91
 
67
92
  [MIT License](https://rmm5t.mit-license.org/)
@@ -1,5 +1,5 @@
1
1
  module Rubocop
2
2
  module Pragmatic
3
- VERSION = "0.3.1".freeze
3
+ VERSION = "0.4.0".freeze
4
4
  end
5
5
  end
@@ -0,0 +1,7 @@
1
+ plugins:
2
+ - rubocop-rspec_rails
3
+
4
+ # ----------------------------------------
5
+
6
+ RSpecRails:
7
+ Severity: convention
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-pragmatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan McGeary
@@ -193,6 +193,20 @@ dependencies:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: '2.34'
196
+ - !ruby/object:Gem::Dependency
197
+ name: rubocop-rspec_rails
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '2.32'
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '2.32'
196
210
  email:
197
211
  - ryan@mcgeary.org
198
212
  - 'btalayeminaei@gmail.com '
@@ -218,6 +232,7 @@ files:
218
232
  - rubocop-rails.yml
219
233
  - rubocop-rake.yml
220
234
  - rubocop-rspec.yml
235
+ - rubocop-rspec_rails.yml
221
236
  - rubocop.yml
222
237
  - ruby.yml
223
238
  homepage: https://github.com/rmm5t/rubocop-pragmatic