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 +4 -4
- data/README.md +29 -4
- data/lib/rubocop/pragmatic/version.rb +1 -1
- data/rubocop-rspec_rails.yml +7 -0
- metadata +16 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 007af80a5d8315e64b99dc45bce22ffe23d00ae4b63fa41093eb9af884c34c30
|
|
4
|
+
data.tar.gz: b394b5269f29dfc7423dd0fd67b1196f0634b017f71a0003f85e603181c66a5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
[](https://rubygems.org/gems/
|
|
3
|
+
[](https://rubygems.org/gems/rubocop-pragmatic)
|
|
4
4
|
[](https://github.com/rmm5t/rubocop-pragmatic/actions/workflows/ci.yml)
|
|
5
|
-
[](https://rubygems.org/gems/
|
|
5
|
+
[](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
|
-
-
|
|
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/)
|
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.
|
|
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
|