optimum-energy-rubocop 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +28 -0
- data/optimum-energy-rubocop.gemspec +13 -0
- data/optimum_energy_rubocop.yml +161 -0
- metadata +64 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5a6143df05ddd076de8a6ec13b0ae679209f7c054ff77b229b7d5eed04379e92
|
4
|
+
data.tar.gz: c2ef3d5e0fdb194b67e50183b375bda39bb2f9c814a75642ad718607b140ee17
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6df9b4334fc2945b8c61ccba374795095b2b70db478eea690f12bf90cc6f648425b3109181939ead58fb4080e38438e9665788c498def0d85e0eeb2c52f64406
|
7
|
+
data.tar.gz: e35acc739d6e271adaf3bdc52bce35307a86c0c3ef84c103283a4c838f0c104bfce864606c233a63187892e69a31bf585711f97f7765317d75e6bd34cca47c3a
|
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: optimum_energy_rubocop.yml
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
optimum-energy-rubocop (0.0.8)
|
5
|
+
rubocop (~> 0.50)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.0)
|
11
|
+
jaro_winkler (1.5.2)
|
12
|
+
parallel (1.12.1)
|
13
|
+
parser (2.5.3.0)
|
14
|
+
ast (~> 2.4.0)
|
15
|
+
powerpack (0.1.2)
|
16
|
+
rainbow (3.0.0)
|
17
|
+
rubocop (0.62.0)
|
18
|
+
jaro_winkler (~> 1.5.1)
|
19
|
+
parallel (~> 1.10)
|
20
|
+
parser (>= 2.5, != 2.5.1.1)
|
21
|
+
powerpack (~> 0.1)
|
22
|
+
rainbow (>= 2.2.2, < 4.0)
|
23
|
+
ruby-progressbar (~> 1.7)
|
24
|
+
unicode-display_width (~> 1.4.0)
|
25
|
+
ruby-progressbar (1.10.0)
|
26
|
+
unicode-display_width (1.4.1)
|
27
|
+
|
28
|
+
PLATFORMS
|
29
|
+
ruby
|
30
|
+
|
31
|
+
DEPENDENCIES
|
32
|
+
optimum-energy-rubocop!
|
33
|
+
|
34
|
+
BUNDLED WITH
|
35
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Landon Schropp
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Optimum Energy Rubocop
|
2
|
+
|
3
|
+
This is the [shared](https://rubocop.readthedocs.io/en/latest/configuration/) team Rubocop
|
4
|
+
configuration for [Optimum Energy](http://optimumenergyco.com/).
|
5
|
+
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
First, add the gem to your Gemfile. We recommend not locking in the version of the gem because we
|
10
|
+
regularly update this repo as we come across new rules.
|
11
|
+
|
12
|
+
```
|
13
|
+
gem 'optimum-energy-rubocop'
|
14
|
+
```
|
15
|
+
|
16
|
+
Create a `.rubocop.yml` file and add this configuration.
|
17
|
+
|
18
|
+
```
|
19
|
+
require:
|
20
|
+
- optimum-energy-rubocop
|
21
|
+
|
22
|
+
inherit_from:
|
23
|
+
- optimum_energy_rubocop.yml
|
24
|
+
```
|
25
|
+
|
26
|
+
## Running Rubocop
|
27
|
+
|
28
|
+
To run the cops, run `rubocop` from the command line.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Gem::Specification.new do |spec|
|
2
|
+
spec.name = 'optimum-energy-rubocop'
|
3
|
+
spec.version = File.read('VERSION.txt')
|
4
|
+
spec.authors = [ 'Optimum Energy' ]
|
5
|
+
|
6
|
+
spec.summary = 'The shared Rubocop configuration for Optimum Energy'
|
7
|
+
spec.homepage = 'https://github.com/optimiumenergyco/optimum-energy-rubocop'
|
8
|
+
spec.license = 'MIT'
|
9
|
+
|
10
|
+
spec.files = `git ls-files -z`.split("\x0")
|
11
|
+
|
12
|
+
spec.add_dependency 'rubocop', '~> 0.50'
|
13
|
+
end
|
@@ -0,0 +1,161 @@
|
|
1
|
+
# This styleguide is built on top of the default Rubocop styleguide, located here:
|
2
|
+
# https://github.com/bbatsov/rubocop/blob/master/config/default.yml.
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
Exclude:
|
6
|
+
- 'db/schema.rb'
|
7
|
+
|
8
|
+
Rails:
|
9
|
+
Enabled: true
|
10
|
+
|
11
|
+
Metrics/AbcSize:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/AlignHash:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Layout/AlignParameters:
|
18
|
+
EnforcedStyle: with_fixed_indentation
|
19
|
+
|
20
|
+
Layout/CaseIndentation:
|
21
|
+
EnforcedStyle: end
|
22
|
+
|
23
|
+
# Ideally, I would like to insert empty lines at the beginning on a class definition, but not at the
|
24
|
+
# end. https://github.com/bbatsov/rubocop/issues/4812
|
25
|
+
Layout/EmptyLinesAroundClassBody:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Layout/EmptyLinesAroundBlockBody:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Layout/EmptyLinesAroundModuleBody:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Layout/EmptyLineBetweenDefs:
|
35
|
+
AllowAdjacentOneLineDefs: true
|
36
|
+
NumberOfEmptyLines: 1
|
37
|
+
|
38
|
+
Layout/EndOfLine:
|
39
|
+
EnforcedStyle: lf
|
40
|
+
|
41
|
+
Layout/ExtraSpacing:
|
42
|
+
AllowForAlignment: false
|
43
|
+
|
44
|
+
Layout/FirstParameterIndentation:
|
45
|
+
EnforcedStyle: consistent
|
46
|
+
|
47
|
+
Layout/IndentArray:
|
48
|
+
EnforcedStyle: consistent
|
49
|
+
|
50
|
+
Layout/IndentHash:
|
51
|
+
EnforcedStyle: consistent
|
52
|
+
|
53
|
+
Layout/MultilineMethodCallIndentation:
|
54
|
+
EnforcedStyle: indented
|
55
|
+
|
56
|
+
Layout/MultilineOperationIndentation:
|
57
|
+
EnforcedStyle: indented
|
58
|
+
|
59
|
+
Layout/SpaceInsideArrayLiteralBrackets:
|
60
|
+
EnforcedStyle: space
|
61
|
+
|
62
|
+
Layout/SpaceAroundOperators:
|
63
|
+
AllowForAlignment: false
|
64
|
+
|
65
|
+
Layout/SpaceBeforeFirstArg:
|
66
|
+
AllowForAlignment: false
|
67
|
+
|
68
|
+
Layout/SpaceInsideStringInterpolation:
|
69
|
+
EnforcedStyle: space
|
70
|
+
|
71
|
+
Naming/FileName:
|
72
|
+
ExpectMatchingDefinition: true
|
73
|
+
Exclude:
|
74
|
+
- 'config/**/*'
|
75
|
+
- 'bin/**/*'
|
76
|
+
- 'db/**/*'
|
77
|
+
- 'spec/**/*'
|
78
|
+
|
79
|
+
Style/ConditionalAssignment:
|
80
|
+
EnforcedStyle: assign_to_condition
|
81
|
+
|
82
|
+
Style/Copyright:
|
83
|
+
Enabled: false
|
84
|
+
|
85
|
+
# TODO: Consider turning this on for controller methods in the future if we extract Swagger
|
86
|
+
# documentation from them.
|
87
|
+
Style/Documentation:
|
88
|
+
Enabled: false
|
89
|
+
|
90
|
+
Style/FormatString:
|
91
|
+
EnforcedStyle: percent
|
92
|
+
|
93
|
+
# This won't be necessary when we upgrade to Ruby 3.0. Until then, rather than adding a comment to
|
94
|
+
# every file, we should simply not mutate strings.
|
95
|
+
Style/FrozenStringLiteralComment:
|
96
|
+
EnforcedStyle: never
|
97
|
+
|
98
|
+
Style/StringLiterals:
|
99
|
+
Exclude:
|
100
|
+
- 'spec/**/*'
|
101
|
+
|
102
|
+
Style/ReturnNil:
|
103
|
+
Enabled: true
|
104
|
+
|
105
|
+
Style/SymbolArray:
|
106
|
+
MinSize: 3
|
107
|
+
|
108
|
+
Style/WordArray:
|
109
|
+
MinSize: 3
|
110
|
+
|
111
|
+
Metrics/BlockLength:
|
112
|
+
Enabled: true
|
113
|
+
Max: 100
|
114
|
+
Exclude:
|
115
|
+
- 'spec/**/*'
|
116
|
+
|
117
|
+
Metrics/ClassLength:
|
118
|
+
Enabled: true
|
119
|
+
Max: 300
|
120
|
+
|
121
|
+
Metrics/CyclomaticComplexity:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Metrics/MethodLength:
|
125
|
+
Max: 50
|
126
|
+
|
127
|
+
Metrics/LineLength:
|
128
|
+
Max: 100
|
129
|
+
AllowHeredoc: false
|
130
|
+
AllowURI: false
|
131
|
+
|
132
|
+
Metrics/PerceivedComplexity:
|
133
|
+
Enabled: false
|
134
|
+
|
135
|
+
Layout/BlockAlignment:
|
136
|
+
EnforcedStyleAlignWith: start_of_block
|
137
|
+
|
138
|
+
Layout/EndAlignment:
|
139
|
+
EnforcedStyleAlignWith: start_of_line
|
140
|
+
|
141
|
+
Rails/RequestReferer:
|
142
|
+
EnforcedStyle: referrer
|
143
|
+
|
144
|
+
Rails/Date:
|
145
|
+
EnforcedStyle: strict
|
146
|
+
|
147
|
+
Rails/TimeZone:
|
148
|
+
EnforcedStyle: flexible
|
149
|
+
|
150
|
+
Rails/FilePath:
|
151
|
+
Enabled: false
|
152
|
+
|
153
|
+
# TODO: Enable once this is fixed: https://github.com/bbatsov/rubocop/issues/5236
|
154
|
+
Rails/InverseOf:
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Style/MultilineTernaryOperator:
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Rails/NotNullColumn:
|
161
|
+
Enabled: false
|
metadata
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: optimum-energy-rubocop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Optimum Energy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.50'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.50'
|
27
|
+
description:
|
28
|
+
email:
|
29
|
+
executables: []
|
30
|
+
extensions: []
|
31
|
+
extra_rdoc_files: []
|
32
|
+
files:
|
33
|
+
- ".rubocop.yml"
|
34
|
+
- Gemfile
|
35
|
+
- Gemfile.lock
|
36
|
+
- LICENSE.txt
|
37
|
+
- README.md
|
38
|
+
- optimum-energy-rubocop.gemspec
|
39
|
+
- optimum_energy_rubocop.yml
|
40
|
+
homepage: https://github.com/optimiumenergyco/optimum-energy-rubocop
|
41
|
+
licenses:
|
42
|
+
- MIT
|
43
|
+
metadata: {}
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options: []
|
46
|
+
require_paths:
|
47
|
+
- lib
|
48
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
53
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0'
|
58
|
+
requirements: []
|
59
|
+
rubyforge_project:
|
60
|
+
rubygems_version: 2.7.3
|
61
|
+
signing_key:
|
62
|
+
specification_version: 4
|
63
|
+
summary: The shared Rubocop configuration for Optimum Energy
|
64
|
+
test_files: []
|