upennlib-rubocop 1.1.0 → 1.2.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: d92f8d5475c4a64b24e783ac198b2fa9e61faac9c3eb3029d87e2043824dedf0
4
- data.tar.gz: 74851036d3023c32527f0acb1dd202601b64c91f8fe74481e11cf5b7c4625bf8
3
+ metadata.gz: 84a418d12e8ff592448b93d31b55d6ba579bd70a47f5fffbdd86b7987f277605
4
+ data.tar.gz: c94df285474498d629afe33c0e4a54b8b30452d4f90826b047f60d7791dac545
5
5
  SHA512:
6
- metadata.gz: 2d47baa68d167f7113258550cf2bba49e986fe90d69860e7e07fae0c12ef3835eadcf3f31d8aeaddae031ec04a9b9518b139179e5c8b32f8f292ee5b0772136a
7
- data.tar.gz: a4708f8fe29b941da92f1dd12d194c34cb01ff20ec4955ac4aca5c9485c6cedf13f6c3a9658af911d8abc8a5cfe686aa3082ba4d70f66a371ca708a4a6e32029
6
+ metadata.gz: d2518b3dcc8638aeb97752ed9769f659503fe0788022013079a8dec254459caadbfa5b9453c119a53fbf025ebff7c30909435f556bebe8d8a64be30f70e14040
7
+ data.tar.gz: 81da4fb784aae040581460316111056581a58c59838745b6669b231b924f608ed0e21e235639be7e238c63f471d0e790224e215c52e6aec174d0c762816e4661
data/README.md CHANGED
@@ -4,13 +4,12 @@
4
4
  ## Purpose
5
5
  This gem will centralize our RuboCop configuration and ensure we are using the same version of RuboCop across various projects. Projects that use this gem should avoid adding their own custom, project-specific RuboCop configuration. Instead developers should make an MR to this project with the suggested changes and an explanation as to why its necessary. The goal of this gem is to avoid having projects with different RuboCop rules because it makes it hard for developers to focus on writing code if the style changes from project to project.
6
6
 
7
-
8
7
  ## Installation & Usage
9
8
 
10
9
  Add this line to your Gemfile:
11
10
 
12
11
  ```ruby
13
- gem 'upennlib-rubocop', require: false
12
+ gem 'upennlib-rubocop', '~> 1.0', require: false
14
13
  ```
15
14
 
16
15
  And then execute:
@@ -33,6 +32,10 @@ Understandably, it can be difficult to address all RuboCop issues when adding ru
33
32
  rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000
34
33
  ```
35
34
 
35
+ # Versioning
36
+ The major versions of this gem will mirror the major RuboCop versions. New cops are disabled and new offenses will have
37
+ to be addressed when upgrading to a major version.
38
+
36
39
  ## Publishing Gem
37
40
  To publish a new version of this gem to RubyGems:
38
41
  1. Update the version number in `upennlib-rubocop.gemspec`
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'upennlib-rubocop'
3
- s.version = '1.1.0'
3
+ s.version = '1.2.0'
4
4
  s.summary = "Rubocop style configuration to be used in UPenn Libraries Projects"
5
5
  s.description = "UPenn Libraries Rubocop Configuration"
6
- s.authors = ["Carla Galarza", "Mike Kanning"]
6
+ s.authors = ["Carla Galarza", "Mike Kanning", "Patrick Perkins", "Amrey Mathurin"]
7
7
  s.email = 'cgalarza@upenn.edu'
8
8
  s.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
9
9
 
@@ -10,7 +10,21 @@ inherit_mode:
10
10
  - Exclude # Merging exclude array values, instead of overriding
11
11
 
12
12
  AllCops:
13
- NewCops: enable # Enabling all new cops. Problematic cops can be disabled on a case-by-case basis.
13
+ NewCops: disable # Disabling all new cops. New offenses will be addresses with major upgrades.
14
+
15
+ # Allow for hashes to be aligned by `key` or in a `table` format. Default is just to allow `key`.
16
+ Layout/HashAlignment:
17
+ EnforcedColonStyle:
18
+ - key
19
+ - table
20
+ EnforcedHashRocketStyle:
21
+ - key
22
+ - table
23
+
24
+ # Don't require calls to +super+ because sometimes the superclass method has no behavior or behavior you explicitly want to avoid
25
+ # See: https://github.com/rubocop/ruby-style-guide/issues/809
26
+ Lint/MissingSuper:
27
+ Enabled: false
14
28
 
15
29
  Metrics/BlockLength:
16
30
  AllowedMethods: ['configure_blacklight']
@@ -20,25 +34,27 @@ Metrics/BlockLength:
20
34
  - 'spec/**/*.rb'
21
35
  - 'config/environments/**.rb'
22
36
 
23
- Style/FrozenStringLiteralComment:
24
- EnforcedStyle: always_true # Force frozen string literal comment to always be set to true
25
-
26
- Style/Documentation:
27
- Exclude:
28
- - db/migrate/* # Migrations don't need top-level class documentation
37
+ # Count multiline literals as one line in RSpec examples
38
+ RSpec/ExampleLength:
39
+ CountAsOne:
40
+ - array
41
+ - hash
42
+ - heredoc
29
43
 
30
44
  # Allowing two expectations per test in order to allow for aggregated failures, see: https://rspec.rubystyle.guide/#expectation-per-example
31
45
  RSpec/MultipleExpectations:
32
46
  Max: 2
33
47
 
34
- # Don't require calls to +super+ because sometimes the superclass method has no behavior or behavior you explicitly want to avoid
35
- # See: https://github.com/rubocop/ruby-style-guide/issues/809
36
- Lint/MissingSuper:
37
- Enabled: false
48
+ Style/BlockDelimiters:
49
+ EnforcedStyle: braces_for_chaining
50
+
51
+ Style/Documentation:
52
+ Exclude:
53
+ - db/migrate/* # Migrations don't need top-level class documentation
54
+
55
+ Style/FrozenStringLiteralComment:
56
+ EnforcedStyle: always_true # Force frozen string literal comment to always be set to true
38
57
 
39
58
  # Don't use ruby 3.1 hash value shorthand, see: https://docs.rubocop.org/rubocop/cops_style.html#enforcedshorthandsyntax-never
40
59
  Style/HashSyntax:
41
60
  EnforcedShorthandSyntax: never
42
-
43
- Style/BlockDelimiters:
44
- EnforcedStyle: braces_for_chaining
metadata CHANGED
@@ -1,15 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upennlib-rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carla Galarza
8
8
  - Mike Kanning
9
- autorequire:
9
+ - Patrick Perkins
10
+ - Amrey Mathurin
11
+ autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
12
- date: 2023-03-24 00:00:00.000000000 Z
14
+ date: 2023-10-31 00:00:00.000000000 Z
13
15
  dependencies:
14
16
  - !ruby/object:Gem::Dependency
15
17
  name: rubocop
@@ -105,10 +107,10 @@ files:
105
107
  - README.md
106
108
  - upennlib-rubocop.gemspec
107
109
  - upennlib_rubocop_defaults.yml
108
- homepage:
110
+ homepage:
109
111
  licenses: []
110
112
  metadata: {}
111
- post_install_message:
113
+ post_install_message:
112
114
  rdoc_options: []
113
115
  require_paths:
114
116
  - lib
@@ -123,8 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  - !ruby/object:Gem::Version
124
126
  version: '0'
125
127
  requirements: []
126
- rubygems_version: 3.4.1
127
- signing_key:
128
+ rubygems_version: 3.1.6
129
+ signing_key:
128
130
  specification_version: 4
129
131
  summary: Rubocop style configuration to be used in UPenn Libraries Projects
130
132
  test_files: []