upennlib-rubocop 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c9e4e8cd547cf1648e25a760f15c6463a6b59e07
4
+ data.tar.gz: f24e2d6ce2af49f642968fa16490f85fb6dcfae2
5
+ SHA512:
6
+ metadata.gz: c0f77802ed8278d3a71e0dea370860d6c6ada800b6cf531dded97bd6219f25dd55604304374c500b5bf71d56ed0a7df75fd8ba1b4e4e07a19f71fdf94000ecfa
7
+ data.tar.gz: dcd4a8dff50fe032635e2a1beb3b0ac8f35656d0d511a23dba770b81b9c347ed8b2c0f6483ba7d59603da349b18ffaddbf61025d3678249852c33797d135b27d
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # UPenn Libraries RuboCop
2
+ [RuboCop](https://rubocop.org/) defaults for UPenn Libraries projects. Enforces a consistent Ruby style on our applications and gems.
3
+
4
+ ## Purpose
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
+
7
+
8
+ ## Installation & Usage
9
+
10
+ Add this line to your Gemfile:
11
+
12
+ ```ruby
13
+ gem 'upennlib-rubocop', require: false
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ ```
19
+ $ bundle install
20
+ ```
21
+
22
+ In your `.rubocop.yml`:
23
+
24
+ ```yml
25
+ inherit_gem:
26
+ upennlib-rubocop: upennlib_rubocop_defaults.yml
27
+ ```
28
+
29
+ ## .rubocop_todo.yml
30
+ Understandably, it can be difficult to address all RuboCop issues when adding rubocop to a current project. If you want to delay fixing these issues, creating a `.rubocop_todo.yml` creates a list of exclusions for your RuboCop configuration. Using the following command creates a rubocop_todo configuration that only excludes files from cops instead of enabling/disabling cops and changing configuration values.
31
+
32
+ ```
33
+ rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000
34
+ ```
35
+
36
+
@@ -0,0 +1,15 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'upennlib-rubocop'
3
+ s.version = '1.0.1'
4
+ s.summary = "Rubocop style configuration to be used in UPenn Libraries Projects"
5
+ s.description = "UPenn Libraries Rubocop Configuration"
6
+ s.authors = ["Carla Galarza", "Mike Kanning"]
7
+ s.email = 'cgalarza@upenn.edu'
8
+ s.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
9
+
10
+ s.add_dependency 'rubocop', '~> 1.24'
11
+ s.add_dependency 'rubocop-performance'
12
+ s.add_dependency 'rubocop-rails'
13
+ s.add_dependency 'rubocop-rake'
14
+ s.add_dependency 'rubocop-rspec'
15
+ end
@@ -0,0 +1,36 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rails
4
+ - rubocop-rake
5
+ - rubocop-rspec
6
+
7
+ inherit_mode:
8
+ merge:
9
+ - Exclude # Merging exclude array values, instead of overriding
10
+
11
+ AllCops:
12
+ NewCops: enable # Enabling all new cops. Problematic cops can be disabled on a case-by-case basis.
13
+
14
+ Metrics/BlockLength:
15
+ IgnoredMethods: ['configure_blacklight']
16
+ Exclude:
17
+ - 'Rakefile'
18
+ - '**/*.rake'
19
+ - 'spec/**/*.rb'
20
+ - 'config/environments/**.rb'
21
+
22
+ Style/FrozenStringLiteralComment:
23
+ EnforcedStyle: always_true # Force frozen string literal comment to always be set to true
24
+
25
+ Style/Documentation:
26
+ Exclude:
27
+ - db/migrate/* # Migrations don't need top-level class documentation
28
+
29
+ # Allowing two expectations per test in order to allow for aggregated failures, see: https://rspec.rubystyle.guide/#expectation-per-example
30
+ RSpec/MultipleExpectations:
31
+ Max: 2
32
+
33
+ # Don't require calls to +super+ because sometimes the superclass method has no behavior or behavior you explicitly want to avoid
34
+ # See: https://github.com/rubocop/ruby-style-guide/issues/809
35
+ Lint/MissingSuper:
36
+ Enabled: false
metadata ADDED
@@ -0,0 +1,116 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: upennlib-rubocop
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Carla Galarza
8
+ - Mike Kanning
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2022-05-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rubocop
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.24'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.24'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rubocop-performance
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: rubocop-rails
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop-rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rubocop-rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ description: UPenn Libraries Rubocop Configuration
85
+ email: cgalarza@upenn.edu
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - README.md
91
+ - upennlib-rubocop.gemspec
92
+ - upennlib_rubocop_defaults.yml
93
+ homepage:
94
+ licenses: []
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubyforge_project:
112
+ rubygems_version: 2.5.2
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: Rubocop style configuration to be used in UPenn Libraries Projects
116
+ test_files: []