ezcater_rubocop 5.0.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/CHANGELOG.md +25 -0
- data/conf/rubocop.yml +10 -7
- data/conf/rubocop_rails.yml +10 -10
- data/lib/ezcater_rubocop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d802b49e1f9a3ff4cfe473c8b642b1b0d6fc48fb283fb7eb11da28896bc42091
|
4
|
+
data.tar.gz: 249b847953b3b3a5a118e46a7018b6683f588d73555bfdf5ed399e6022ccd2e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9f105d31cceed61063a5a5f43ee52d14c122664c1f53a71fa73481222b06b3769010473c344e6884a4a065581d2c1fbc5ab1682c43308670c40e75da0c569ed
|
7
|
+
data.tar.gz: 66a67817b96392aecfaaa5d2a9172b48e83b173866c374a0f6c31bb062c23b4efaaba3efd4059dd1bc41a4636efb91d9bdcfb034a84805ab1f8191b13652cac1
|
data/.github/CODEOWNERS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* @ezcater/ruby-style-group
|
1
|
+
* @ezcater/developer-experience @ezcater/ruby-style-group
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,31 @@ This gem is moving onto its own [Semantic Versioning](https://semver.org/) schem
|
|
6
6
|
|
7
7
|
Prior to v1.0.0 this gem was versioned based on the `MAJOR`.`MINOR` version of RuboCop. The first release of the ezcater_rubocop gem was `v0.49.0`.
|
8
8
|
|
9
|
+
## 5.2.0
|
10
|
+
|
11
|
+
- Add an explicit rule for `Style/HashSyntax`, setting `EnforcedShorthandSyntax: either`.
|
12
|
+
|
13
|
+
Ruby 3.1 introduces syntax where named arguments can be passed
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
name = "Michael"
|
17
|
+
method_with_named_args(name:)
|
18
|
+
```
|
19
|
+
|
20
|
+
rather than
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
name = "Michael"
|
24
|
+
method_with_named_args(name: name)
|
25
|
+
```
|
26
|
+
|
27
|
+
when the variable's name matches the named argument key.
|
28
|
+
|
29
|
+
For now, we have decided to allow either syntax while we upgrade our applications to Ruby 3.1. This is auto-correctable if and when we decide to enforce the new syntax.
|
30
|
+
|
31
|
+
## 5.1.0
|
32
|
+
- Change paths to exclude for various cops to be agnostic of directory structure prior to the matching string. This is to allow apps to have greater flexibility in where files live, but still have them excluded from certain cops. The need for this arose when implementing Stimpack, which moves specs and other files under app/packs/[pack_name].
|
33
|
+
|
9
34
|
## 5.0.0
|
10
35
|
- Enable all added cops since 0.8. There are a lot of new cops now, be sure to use `--regenerate-todo` if you're on a large project that can't be updated easily.
|
11
36
|
|
data/conf/rubocop.yml
CHANGED
@@ -23,7 +23,7 @@ Metrics/AbcSize:
|
|
23
23
|
Metrics/BlockLength:
|
24
24
|
Exclude:
|
25
25
|
- "*.gemspec"
|
26
|
-
- "spec/**/*.rb"
|
26
|
+
- "/**/spec/**/*.rb"
|
27
27
|
|
28
28
|
Metrics/CyclomaticComplexity:
|
29
29
|
Enabled: false
|
@@ -61,12 +61,12 @@ RSpec/ContextWording:
|
|
61
61
|
|
62
62
|
RSpec/DescribeClass:
|
63
63
|
Exclude:
|
64
|
-
- "spec/
|
65
|
-
- "spec/
|
66
|
-
- "spec/routing/**/*.rb"
|
67
|
-
- "spec/views/**/*.rb"
|
68
|
-
- "spec/system/**/*.rb"
|
69
|
-
- "spec/integrations/**/*.rb"
|
64
|
+
- "/**/spec/features/**/*.rb"
|
65
|
+
- "/**/spec/requests/**/*.rb"
|
66
|
+
- "/**/spec/routing/**/*.rb"
|
67
|
+
- "/**/spec/views/**/*.rb"
|
68
|
+
- "/**/spec/system/**/*.rb"
|
69
|
+
- "/**/spec/integrations/**/*.rb"
|
70
70
|
|
71
71
|
RSpec/ExampleLength:
|
72
72
|
Max: 25
|
@@ -340,3 +340,6 @@ Style/HashTransformKeys:
|
|
340
340
|
|
341
341
|
Style/HashTransformValues:
|
342
342
|
Enabled: true
|
343
|
+
|
344
|
+
Style/HashSyntax:
|
345
|
+
EnforcedShorthandSyntax: either
|
data/conf/rubocop_rails.yml
CHANGED
@@ -17,8 +17,8 @@ Metrics/BlockLength:
|
|
17
17
|
- Exclude
|
18
18
|
Exclude:
|
19
19
|
- "app/graphql/**/*.rb"
|
20
|
-
- "config/environments/*.rb"
|
21
|
-
- "lib/tasks/**/*.rake"
|
20
|
+
- "/**/config/environments/*.rb"
|
21
|
+
- "/**/lib/tasks/**/*.rake"
|
22
22
|
|
23
23
|
Rails:
|
24
24
|
Enabled: true
|
@@ -63,19 +63,19 @@ Ezcater/RailsEnv:
|
|
63
63
|
Description: 'Enforce the use of `Rails.configuration.x.<foo>` instead of checking `Rails.env`.'
|
64
64
|
Enabled: true
|
65
65
|
Exclude:
|
66
|
-
- "config/**/*"
|
67
|
-
- "spec/rails_helper.rb"
|
66
|
+
- "/**/config/**/*"
|
67
|
+
- "/**/spec/rails_helper.rb"
|
68
68
|
- "db/**/*"
|
69
|
-
- "lib/tasks/**/*"
|
70
|
-
- "spec/lib/tasks/**/*"
|
69
|
+
- "/**/lib/tasks/**/*"
|
70
|
+
- "/**/spec/lib/tasks/**/*"
|
71
71
|
|
72
72
|
Ezcater/DirectEnvCheck:
|
73
73
|
Description: 'Enforce the use of `Rails.configuration.x.<foo>` instead of checking `ENV`.'
|
74
74
|
Enabled: true
|
75
75
|
Exclude:
|
76
76
|
- "bin/**/*"
|
77
|
-
- "config/**/*"
|
78
|
-
- "spec/rails_helper.rb"
|
77
|
+
- "/**/config/**/*"
|
78
|
+
- "/**/spec/rails_helper.rb"
|
79
79
|
- "db/**/*"
|
80
|
-
- "lib/tasks/**/*"
|
81
|
-
- "spec/lib/tasks/**/*"
|
80
|
+
- "/**/lib/tasks/**/*"
|
81
|
+
- "/**/spec/lib/tasks/**/*"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ezcater_rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ezCater, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|