rubocop-codeur 0.1.7

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
+ SHA256:
3
+ metadata.gz: 423e4fdec4e6422e6dc81c779ae1fb2763218c2fd9851f94290ff41a9d7d5f87
4
+ data.tar.gz: a7409123fea6d3819f035d1c1e7c2c89a82172ff1c9d35e016abe360ff486efd
5
+ SHA512:
6
+ metadata.gz: 444d646a1439fb4158b33363721b0656bce9e63c8d041d05db0f108ee69b94c38c64b1c955e6dd27605b83de6a387ad42f2b254d3b4039efafa7f39e816dca07
7
+ data.tar.gz: 7de9b33053c030ba6e72f9ac1db0d24ac3efcf02d318c2cab2dfd72905160f8c5f41a1ff1aed6968b92574a6b5d4c73e82f7535a01b4a5fd1cfab0afc85cd3ff
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2020 Codeur SARL
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Rubocop Codeur
2
+ Shared rubocop config gem for every Ruby projects at Codeur SARL
3
+
4
+ ## Installation
5
+ Add this lines to your application's Gemfile:
6
+ ```ruby
7
+ group :development do
8
+ gem 'rubocop-codeur'
9
+ end
10
+ ```
11
+
12
+ Or, for a Ruby library, add this to your gemspec:
13
+ ```ruby
14
+ spec.add_development_dependency 'rubocop-codeur'
15
+ ```
16
+ ## Usage
17
+ Create a `.rubocop.yml` with the following directives:
18
+ ```yml
19
+ inherit_gem:
20
+ rubocop-codeur:
21
+ - default.yml
22
+ ```
23
+
24
+ Then run:
25
+ `bundle exec rubocop`
26
+
27
+ You don't need to include rubocop directly in your application's dependencies.
28
+ `rubocop-codeur will include `rubocop`, `rubocop-minitest`, `rubocop-performance` and `rubocop-rails` dependencies.
29
+
30
+ It might be necessary to override style rules set in this gem for some projects or to add specific ones. Rule inheritance provided by Rubocop works like the following:
31
+ `inherit_gem → inherit_from → local rules`
32
+
33
+ For example:
34
+ ```yml
35
+ inherit_gem:
36
+ rubocop-codeur:
37
+ - default.yml
38
+
39
+ inherit_from: .some_rubocop_config_file.yml
40
+
41
+ AllCops:
42
+ Exclude:
43
+ - path/to/exluded/file.rb
44
+ ```
45
+
46
+ Note that those overriding should be avoided as much as possible.
47
+
48
+ ## Release
49
+ Before all, configure your credentials for `dev-codeur` RubyGems account:
50
+
51
+ 1. Login to RubyGems with the `dev-codeur` account
52
+ 2. Create a token which have rights to push gems (https://rubygems.org/profile/api_keys)
53
+ 3. Add it to your config:
54
+ ```
55
+ echo ":rubygems_api_key: YOUR_API_KEY" >> ~/.gem/credentials
56
+ ```
57
+
58
+ You just have to run default command:
59
+ ```
60
+ rake release
61
+ ```
62
+
63
+ Else, to publish a new version of this gem, you'll need to build it with
64
+ `gem build rubocop-codeur.gemspec` and then push it manually:
65
+ ```
66
+ gem push rubocop-codeur-X.X.X.gem
67
+ ```
data/default.yml ADDED
@@ -0,0 +1,165 @@
1
+ require:
2
+ - rubocop-minitest
3
+ - rubocop-performance
4
+ - rubocop-rails
5
+
6
+ AllCops:
7
+ Exclude:
8
+ - 'db/schema.rb'
9
+ - 'node_modules/**/*'
10
+ - 'public/**/*'
11
+ - 'tmp/**/*'
12
+ - 'vendor/**/*'
13
+ - 'bin/*'
14
+ TargetRubyVersion: 2.6
15
+ TargetRailsVersion: 6.0
16
+ NewCops: enable
17
+
18
+ Rails:
19
+ Enabled: true
20
+
21
+ Layout/AccessModifierIndentation:
22
+ EnforcedStyle: outdent
23
+ IndentationWidth: 2
24
+
25
+ Layout/ArgumentAlignment:
26
+ EnforcedStyle: with_first_argument
27
+
28
+ Layout/FirstArrayElementIndentation:
29
+ EnforcedStyle: consistent
30
+
31
+ Layout/FirstHashElementIndentation:
32
+ EnforcedStyle: consistent
33
+
34
+ Layout/HashAlignment:
35
+ EnforcedHashRocketStyle: table
36
+ EnforcedColonStyle: table
37
+
38
+ Layout/LineLength:
39
+ Max: 200
40
+ AutoCorrect: false
41
+ Exclude:
42
+ - 'db/migrate/*'
43
+
44
+ Layout/MultilineMethodCallIndentation:
45
+ EnforcedStyle: indented
46
+
47
+ Layout/ParameterAlignment:
48
+ EnforcedStyle: with_fixed_indentation
49
+ IndentationWidth: 2
50
+
51
+ Lint/RaiseException:
52
+ Enabled: true
53
+
54
+ Lint/StructNewOverride:
55
+ Enabled: true
56
+
57
+ Metrics/AbcSize:
58
+ Max: 65
59
+ Exclude:
60
+ - 'db/migrate/*'
61
+
62
+ Metrics/BlockLength:
63
+ Max: 60
64
+ Exclude:
65
+ - 'config/routes.rb'
66
+ - 'lib/tasks/**/*'
67
+
68
+ Metrics/ClassLength:
69
+ Max: 300
70
+
71
+ Metrics/CyclomaticComplexity:
72
+ Max: 10
73
+
74
+ Metrics/MethodLength:
75
+ Max: 60
76
+ Exclude:
77
+ - 'db/migrate/*'
78
+
79
+ Metrics/ModuleLength:
80
+ Max: 300
81
+
82
+ Metrics/PerceivedComplexity:
83
+ Max: 10
84
+
85
+ Minitest/TestMethodName:
86
+ Enabled: false
87
+
88
+ # Disabled because it doesn't with symbols like: record_001
89
+ Naming/VariableNumber:
90
+ Enabled: false
91
+
92
+ Rails/BulkChangeTable:
93
+ Enabled: false
94
+
95
+ Rails/CreateTableWithTimestamps:
96
+ Exclude:
97
+ - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
98
+
99
+ Rails/FilePath:
100
+ EnforcedStyle: arguments
101
+
102
+ Rails/ReversibleMigration:
103
+ Exclude:
104
+ - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
105
+
106
+ Rails/SaveBang:
107
+ Enabled: false
108
+
109
+ Rails/SkipsModelValidations:
110
+ Enabled: false
111
+ Exclude:
112
+ - 'lib/tasks/**/*'
113
+ - 'db/migrate/*.rb'
114
+
115
+ Rails/UnknownEnv:
116
+ Environments:
117
+ - development
118
+ - test
119
+ - staging
120
+ - production
121
+
122
+ Style/AsciiComments:
123
+ Enabled: false
124
+
125
+ Style/ClassAndModuleChildren:
126
+ AutoCorrect: true
127
+
128
+ Style/ConditionalAssignment:
129
+ Enabled: false
130
+
131
+ Style/Documentation:
132
+ Enabled: false
133
+
134
+ Style/EmptyMethod:
135
+ EnforcedStyle: expanded
136
+
137
+ Style/GuardClause:
138
+ MinBodyLength: 3
139
+
140
+ Style/HashEachMethods:
141
+ Enabled: true
142
+ AutoCorrect: true
143
+
144
+ Style/HashTransformKeys:
145
+ Enabled: true
146
+ AutoCorrect: true
147
+
148
+ Style/HashTransformValues:
149
+ Enabled: true
150
+ AutoCorrect: true
151
+
152
+ Style/IfUnlessModifier:
153
+ Enabled: false
154
+
155
+ Style/MultipleComparison:
156
+ Enabled: false
157
+
158
+ Style/NestedTernaryOperator:
159
+ Enabled: false
160
+
161
+ Style/NumericPredicate:
162
+ Enabled: false
163
+
164
+ Style/SymbolArray:
165
+ MinSize: 7
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubocop_codeur/version'
4
+
5
+ module RubocopCodeur
6
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubocopCodeur
4
+ VERSION = '0.1.7'
5
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubocop-codeur
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.7
5
+ platform: ruby
6
+ authors:
7
+ - Dev-team Codeur
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-02-11 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: 1.9.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.9.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.10'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.10.2
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '0.10'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.10.2
47
+ - !ruby/object:Gem::Dependency
48
+ name: rubocop-performance
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.9'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.9.2
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.9'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.9.2
67
+ - !ruby/object:Gem::Dependency
68
+ name: rubocop-rails
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '2.9'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 2.9.1
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '2.9'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 2.9.1
87
+ description: Shared rubocop config gem for every Ruby projects at Codeur SARL
88
+ email:
89
+ - dev@codeur.com
90
+ executables: []
91
+ extensions: []
92
+ extra_rdoc_files: []
93
+ files:
94
+ - MIT-LICENSE
95
+ - README.md
96
+ - default.yml
97
+ - lib/rubocop_codeur.rb
98
+ - lib/rubocop_codeur/version.rb
99
+ homepage: https://github.com/codeur/rubocop-codeur
100
+ licenses:
101
+ - MIT
102
+ metadata:
103
+ homepage_uri: https://github.com/codeur/rubocop-codeur
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: '2.6'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.0.3
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: Codeur rubocop config gem
123
+ test_files: []