rubocop-codeur 0.9.8 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58d07f56b8ed8f7b452e8a4f2de6cdcadf776c9b7e373d484f5c062eb668aadf
4
- data.tar.gz: 1cebddf8c9999223dc1bd8c321c187dbc4c2ac84edb3983fee57657679328ed4
3
+ metadata.gz: 600542e155ac64737e0b95228483a09e907dbf6b9bb6064e0c64ccfd4d7c37a0
4
+ data.tar.gz: 819381f123b6f1a6823e2863a7572696d681662c51e5a1e355096ebf26858ddd
5
5
  SHA512:
6
- metadata.gz: 6e2608b680c0bee94bb6f79be92571dc1e8583d18a92d7a00cc8b8228e6efc4b3838f31c1e20c7bd90b53f3db9b60141d9cf88af544757e4561eb5c5045a41fe
7
- data.tar.gz: 4a1c085bc5b091b3358b732dc8976d176a076e3bb5151828f3ee7020f0e7c898993d99725b46be8b0ba15677fd5ad45a4c4cbe13dd55289f29cea39a0cb97af1
6
+ metadata.gz: 329f7b94c8c5eff88ef29911a357995c8f1e54dd2c7dea440ff4cbda5f1a2d41527448c784adb40b08fefa01d0aa50081ba64dc1cf7b3e8bce30622ef741f6dd
7
+ data.tar.gz: b0f75d699e9bab7d8b63fab5da866051fd954e3e392f22a79d4cee142d792116a3b637a7bb1972b1dfa0aaa973c01e975c8e60dca595eb06531528dc3e8bb7f7
data/default.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-capybara
3
3
  - rubocop-codeur
4
4
  - rubocop-minitest
@@ -7,16 +7,16 @@ require:
7
7
 
8
8
  AllCops:
9
9
  Exclude:
10
- - 'db/schema.rb'
11
- - 'db/*_schema.rb'
12
- - 'node_modules/**/*'
13
- - 'public/**/*'
14
- - 'tmp/**/*'
15
- - 'vendor/**/*'
16
- - 'bin/*'
17
- - 'test/dummy/db/schema.rb'
18
- - 'test/dummy/db/*_schema.rb'
19
- - 'test/dummy/tmp/**/*'
10
+ - "db/schema.rb"
11
+ - "db/*_schema.rb"
12
+ - "node_modules/**/*"
13
+ - "public/**/*"
14
+ - "tmp/**/*"
15
+ - "vendor/**/*"
16
+ - "bin/*"
17
+ - "test/dummy/db/schema.rb"
18
+ - "test/dummy/db/*_schema.rb"
19
+ - "test/dummy/tmp/**/*"
20
20
  TargetRubyVersion: 3.1
21
21
  TargetRailsVersion: 7
22
22
  NewCops: enable
@@ -177,7 +177,7 @@ Layout/LineLength:
177
177
  Max: 200
178
178
  AutoCorrect: false
179
179
  Exclude:
180
- - 'db/migrate/*'
180
+ - "db/migrate/*"
181
181
 
182
182
  Layout/MultilineMethodCallIndentation:
183
183
  Enabled: true
@@ -191,7 +191,7 @@ Layout/ParameterAlignment:
191
191
  Lint/DuplicateMethods:
192
192
  Enabled: true
193
193
  Exclude:
194
- - 'db/migrate/*'
194
+ - "db/migrate/*"
195
195
 
196
196
  Lint/MissingSuper:
197
197
  Enabled: false
@@ -206,21 +206,21 @@ Metrics/AbcSize:
206
206
  Enabled: true
207
207
  Max: 65
208
208
  Exclude:
209
- - 'db/migrate/*'
209
+ - "db/migrate/*"
210
210
 
211
211
  Metrics/BlockLength:
212
212
  Enabled: true
213
213
  Max: 60
214
214
  Exclude:
215
- - 'config/routes.rb'
216
- - 'lib/tasks/**/*'
217
- - 'app/states/*'
215
+ - "config/routes.rb"
216
+ - "lib/tasks/**/*"
217
+ - "app/states/*"
218
218
 
219
219
  Metrics/ClassLength:
220
220
  Enabled: true
221
221
  Max: 300
222
222
  Exclude:
223
- - 'app/models/**/*'
223
+ - "app/models/**/*"
224
224
 
225
225
  Metrics/CyclomaticComplexity:
226
226
  Enabled: true
@@ -230,7 +230,7 @@ Metrics/MethodLength:
230
230
  Enabled: true
231
231
  Max: 60
232
232
  Exclude:
233
- - 'db/migrate/*'
233
+ - "db/migrate/*"
234
234
 
235
235
  Metrics/ModuleLength:
236
236
  Enabled: true
@@ -266,7 +266,7 @@ Rails/BulkChangeTable:
266
266
  Rails/CreateTableWithTimestamps:
267
267
  Enabled: true
268
268
  Exclude:
269
- - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
269
+ - "db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb"
270
270
 
271
271
  Rails/EnvironmentVariableAccess:
272
272
  Enabled: true
@@ -282,7 +282,7 @@ Rails/I18nLocaleTexts:
282
282
  Rails/NotNullColumn:
283
283
  Enabled: true
284
284
  Exclude:
285
- - 'db/migrate/201*.rb'
285
+ - "db/migrate/201*.rb"
286
286
 
287
287
  Rails/ReflectionClassName:
288
288
  Enabled: false
@@ -290,7 +290,7 @@ Rails/ReflectionClassName:
290
290
  Rails/ReversibleMigration:
291
291
  Enabled: true
292
292
  Exclude:
293
- - 'db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb'
293
+ - "db/migrate/{2012,2013,2014,2015,2016,2017,2018}*.rb"
294
294
 
295
295
  Rails/SaveBang:
296
296
  Enabled: false
@@ -298,13 +298,13 @@ Rails/SaveBang:
298
298
  Rails/SkipsModelValidations:
299
299
  Enabled: false
300
300
  Exclude:
301
- - 'lib/tasks/**/*'
302
- - 'db/migrate/*.rb'
301
+ - "lib/tasks/**/*"
302
+ - "db/migrate/*.rb"
303
303
 
304
304
  Rails/ThreeStateBooleanColumn:
305
305
  Enabled: true
306
306
  Exclude:
307
- - 'db/migrate/201*.rb'
307
+ - "db/migrate/201*.rb"
308
308
 
309
309
  Rails/TimeZone:
310
310
  Enabled: true
@@ -380,8 +380,8 @@ Style/SymbolArray:
380
380
  Style/FormatStringToken:
381
381
  Enabled: true
382
382
  Exclude:
383
- - 'config/routes.rb'
384
- - 'config/routes/*'
383
+ - "config/routes.rb"
384
+ - "config/routes/*"
385
385
 
386
386
  Style/FrozenStringLiteralComment:
387
387
  SafeAutoCorrect: true
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'lint_roller'
4
+
5
+ module RuboCop
6
+ module Codeur
7
+ # This class represents a RuboCop Codeur plugin.
8
+ class Plugin < LintRoller::Plugin
9
+ def about
10
+ LintRoller::About.new(
11
+ name: 'rubocop-codeur',
12
+ version: VERSION,
13
+ homepage: 'https://github.com/codeur/rubocop-codeur',
14
+ description: 'A collection of RuboCop cops to check design patterns.'
15
+ )
16
+ end
17
+
18
+ def supported?(context)
19
+ context.engine == :rubocop
20
+ end
21
+
22
+ def rules(_context)
23
+ project_root = Pathname.new(__dir__).join('../../..')
24
+
25
+ LintRoller::Rules.new(type: :path, config_format: :rubocop, value: project_root.join('config', 'default.yml'))
26
+ end
27
+ end
28
+ end
29
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Codeur
5
- VERSION = '0.9.8'
5
+ VERSION = '0.10.1'
6
6
  end
7
7
  end
@@ -1,17 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rubocop/codeur/version'
4
- require 'yaml'
5
-
6
3
  module RuboCop
7
4
  # RuboCop Codeur project namespace
8
5
  module Codeur
9
- class Error < StandardError; end
10
-
11
- PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
12
- CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
13
- CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
14
-
15
- private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
16
6
  end
17
7
  end
@@ -44,10 +44,10 @@ module RuboCop
44
44
  return if pattern.nil?
45
45
 
46
46
  if pattern_forbidden?(pattern)
47
- msg = format(MSG_FORBIDDEN, pattern: pattern)
47
+ msg = format(MSG_FORBIDDEN, pattern:)
48
48
  elsif pattern_not_allowed?(pattern)
49
49
  msg = format(MSG_NOT_ALLOWED,
50
- pattern: pattern,
50
+ pattern:,
51
51
  allowed_patterns: allowed_patterns.map { |p| "`#{p}`" }.join(', '))
52
52
  end
53
53
 
@@ -4,8 +4,5 @@ require 'rubocop'
4
4
 
5
5
  require_relative 'rubocop/codeur'
6
6
  require_relative 'rubocop/codeur/version'
7
- require_relative 'rubocop/codeur/inject'
8
-
9
- RuboCop::Codeur::Inject.defaults!
10
-
7
+ require_relative 'rubocop/codeur/plugin'
11
8
  require_relative 'rubocop/cop/codeur_cops'
metadata CHANGED
@@ -1,97 +1,105 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-codeur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codeur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-17 00:00:00.000000000 Z
11
+ date: 2025-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rubocop
14
+ name: lint_roller
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.25'
19
+ version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.25'
26
+ version: '1.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.72.0
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '2.0'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.72.0
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: rubocop-capybara
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '2.17'
53
+ version: '2.21'
34
54
  type: :runtime
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
58
  - - "~>"
39
59
  - !ruby/object:Gem::Version
40
- version: '2.17'
60
+ version: '2.21'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rubocop-minitest
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '0.20'
67
+ version: '0.37'
48
68
  type: :runtime
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
- version: '0.20'
74
+ version: '0.37'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rubocop-performance
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - "~>"
60
80
  - !ruby/object:Gem::Version
61
- version: '1.9'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 1.9.2
81
+ version: '1.24'
65
82
  type: :runtime
66
83
  prerelease: false
67
84
  version_requirements: !ruby/object:Gem::Requirement
68
85
  requirements:
69
86
  - - "~>"
70
87
  - !ruby/object:Gem::Version
71
- version: '1.9'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 1.9.2
88
+ version: '1.24'
75
89
  - !ruby/object:Gem::Dependency
76
90
  name: rubocop-rails
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
93
  - - "~>"
80
94
  - !ruby/object:Gem::Version
81
- version: '2.9'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 2.9.1
95
+ version: 2.30.0
85
96
  type: :runtime
86
97
  prerelease: false
87
98
  version_requirements: !ruby/object:Gem::Requirement
88
99
  requirements:
89
100
  - - "~>"
90
101
  - !ruby/object:Gem::Version
91
- version: '2.9'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 2.9.1
102
+ version: 2.30.0
95
103
  description: Shared rubocop config gem for every Ruby projects at Codeur SARL
96
104
  email:
97
105
  - dev@codeur.com
@@ -103,28 +111,22 @@ files:
103
111
  - ".github/workflows/test.yml"
104
112
  - ".gitignore"
105
113
  - ".rubocop.yml"
106
- - Gemfile
107
- - Gemfile.lock
108
114
  - LICENSE.txt
109
- - README.md
110
115
  - Rakefile
111
- - bin/console
112
- - bin/rake
113
- - bin/setup
114
116
  - config/default.yml
115
117
  - default.yml
116
118
  - lib/rubocop-codeur.rb
117
119
  - lib/rubocop/codeur.rb
118
- - lib/rubocop/codeur/inject.rb
120
+ - lib/rubocop/codeur/plugin.rb
119
121
  - lib/rubocop/codeur/version.rb
120
122
  - lib/rubocop/cop/codeur/rails_app_patterns.rb
121
123
  - lib/rubocop/cop/codeur/rails_avoid_instance_methods_in_helpers.rb
122
124
  - lib/rubocop/cop/codeur_cops.rb
123
- - rubocop-codeur.gemspec
124
125
  homepage: https://github.com/codeur/rubocop-codeur
125
126
  licenses:
126
127
  - MIT
127
- metadata: {}
128
+ metadata:
129
+ default_lint_roller_plugin: RuboCop::Codeur::Plugin
128
130
  post_install_message:
129
131
  rdoc_options: []
130
132
  require_paths:
@@ -140,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  - !ruby/object:Gem::Version
141
143
  version: '0'
142
144
  requirements: []
143
- rubygems_version: 3.3.26
145
+ rubygems_version: 3.5.22
144
146
  signing_key:
145
147
  specification_version: 4
146
148
  summary: Codeur rubocop config gem
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
-
6
- # Specify your gem's dependencies in rubocop-codeur.gemspec
7
- gemspec
8
-
9
- gem 'minitest', '~> 5.16'
10
- gem 'rake', '~> 13.0'
11
- gem 'simplecov', require: false
data/Gemfile.lock DELETED
@@ -1,96 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rubocop-codeur (0.9.8)
5
- rubocop (~> 1.25)
6
- rubocop-capybara (~> 2.17)
7
- rubocop-minitest (~> 0.20)
8
- rubocop-performance (~> 1.9, >= 1.9.2)
9
- rubocop-rails (~> 2.9, >= 2.9.1)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- activesupport (7.1.3.4)
15
- base64
16
- bigdecimal
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- connection_pool (>= 2.2.5)
19
- drb
20
- i18n (>= 1.6, < 2)
21
- minitest (>= 5.1)
22
- mutex_m
23
- tzinfo (~> 2.0)
24
- ast (2.4.2)
25
- base64 (0.2.0)
26
- bigdecimal (3.1.8)
27
- concurrent-ruby (1.3.3)
28
- connection_pool (2.4.1)
29
- docile (1.4.0)
30
- drb (2.2.1)
31
- i18n (1.14.5)
32
- concurrent-ruby (~> 1.0)
33
- json (2.7.2)
34
- language_server-protocol (3.17.0.3)
35
- minitest (5.23.1)
36
- mutex_m (0.2.0)
37
- parallel (1.25.1)
38
- parser (3.3.3.0)
39
- ast (~> 2.4.1)
40
- racc
41
- racc (1.8.0)
42
- rack (3.1.3)
43
- rainbow (3.1.1)
44
- rake (13.2.1)
45
- regexp_parser (2.9.2)
46
- rexml (3.3.0)
47
- strscan
48
- rubocop (1.64.1)
49
- json (~> 2.3)
50
- language_server-protocol (>= 3.17.0)
51
- parallel (~> 1.10)
52
- parser (>= 3.3.0.2)
53
- rainbow (>= 2.2.2, < 4.0)
54
- regexp_parser (>= 1.8, < 3.0)
55
- rexml (>= 3.2.5, < 4.0)
56
- rubocop-ast (>= 1.31.1, < 2.0)
57
- ruby-progressbar (~> 1.7)
58
- unicode-display_width (>= 2.4.0, < 3.0)
59
- rubocop-ast (1.31.3)
60
- parser (>= 3.3.1.0)
61
- rubocop-capybara (2.21.0)
62
- rubocop (~> 1.41)
63
- rubocop-minitest (0.35.0)
64
- rubocop (>= 1.61, < 2.0)
65
- rubocop-ast (>= 1.31.1, < 2.0)
66
- rubocop-performance (1.21.1)
67
- rubocop (>= 1.48.1, < 2.0)
68
- rubocop-ast (>= 1.31.1, < 2.0)
69
- rubocop-rails (2.25.0)
70
- activesupport (>= 4.2.0)
71
- rack (>= 1.1)
72
- rubocop (>= 1.33.0, < 2.0)
73
- rubocop-ast (>= 1.31.1, < 2.0)
74
- ruby-progressbar (1.13.0)
75
- simplecov (0.22.0)
76
- docile (~> 1.1)
77
- simplecov-html (~> 0.11)
78
- simplecov_json_formatter (~> 0.1)
79
- simplecov-html (0.12.3)
80
- simplecov_json_formatter (0.1.4)
81
- strscan (3.1.0)
82
- tzinfo (2.0.6)
83
- concurrent-ruby (~> 1.0)
84
- unicode-display_width (2.5.0)
85
-
86
- PLATFORMS
87
- ruby
88
-
89
- DEPENDENCIES
90
- minitest (~> 5.16)
91
- rake (~> 13.0)
92
- rubocop-codeur!
93
- simplecov
94
-
95
- BUNDLED WITH
96
- 2.3.26
data/README.md DELETED
@@ -1,84 +0,0 @@
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`,
29
- and `rubocop-rails` dependencies.
30
-
31
- It might be necessary to override style rules set in this gem for some projects
32
- or to add specific ones. Rule inheritance provided by RuboCop works like the
33
- following:
34
- `inherit_gem → inherit_from → local rules`
35
-
36
- For example:
37
- ```yml
38
- inherit_gem:
39
- rubocop-codeur:
40
- - default.yml
41
-
42
- inherit_from: .some_rubocop_config_file.yml
43
-
44
- AllCops:
45
- Exclude:
46
- - path/to/exluded/file.rb
47
- ```
48
-
49
- Note that those overriding should be avoided as much as possible.
50
-
51
- ## Testing
52
-
53
- Run:
54
- ```bash
55
- bin/rake test
56
- ```
57
- or simply:
58
- ```bash
59
- bin/rake
60
- ```
61
-
62
- ## Release
63
- Before all, configure your credentials for RubyGems :
64
-
65
- 1. Login to RubyGems
66
- 2. Create a token which have rights to push gems (https://rubygems.org/profile/api_keys)
67
- 3. Add it to your config:
68
- ```
69
- echo ":rubygems_api_key: YOUR_API_KEY" >> ~/.gem/credentials
70
- ```
71
-
72
- You just have to run default command:
73
- ```
74
- rake release
75
- ```
76
-
77
- Else, to publish a new version of this gem, you'll need to build it with
78
- `gem build rubocop-codeur.gemspec` and then push it manually:
79
- ```
80
- gem push rubocop-codeur-X.X.X.gem
81
- ```
82
-
83
- ## License
84
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). Copyright 2021 Codeur SARL.
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'rubocop/codeur'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start(__FILE__)
data/bin/rake DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rake' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('rake', 'rake')
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
4
- # See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
5
- module RuboCop
6
- module Codeur
7
- # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
8
- # bit of our configuration.
9
- module Inject
10
- def self.defaults!
11
- path = CONFIG_DEFAULT.to_s
12
- hash = ConfigLoader.send(:load_yaml_configuration, path)
13
- config = Config.new(hash, path).tap(&:make_excludes_absolute)
14
- puts "configuration from #{path}" if ConfigLoader.debug?
15
- config = ConfigLoader.merge_with_default(config, path)
16
- ConfigLoader.instance_variable_set(:@default_configuration, config)
17
- end
18
- end
19
- end
20
- end
@@ -1,28 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/rubocop/codeur/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'rubocop-codeur'
7
- spec.version = RuboCop::Codeur::VERSION
8
- spec.authors = ['Codeur']
9
- spec.email = ['dev@codeur.com']
10
-
11
- spec.summary = 'Codeur rubocop config gem'
12
- spec.description = 'Shared rubocop config gem for every Ruby projects at Codeur SARL'
13
- spec.homepage = 'https://github.com/codeur/rubocop-codeur'
14
- spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 3.1'
16
-
17
- # Specify which files should be added to the gem when it is released.
18
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
- end
22
-
23
- spec.add_dependency 'rubocop', '~> 1.25'
24
- spec.add_dependency 'rubocop-capybara', '~> 2.17'
25
- spec.add_dependency 'rubocop-minitest', '~> 0.20'
26
- spec.add_dependency 'rubocop-performance', '~> 1.9', '>= 1.9.2'
27
- spec.add_dependency 'rubocop-rails', '~> 2.9', '>= 2.9.1'
28
- end