rubocop-rubomatic-rails 1.5.0 → 1.6.0.rc.pre.2
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 +4 -4
- data/CHANGELOG.adoc +17 -0
- data/config/rails.yml +13 -1
- data/config/rspec_rails.yml +43 -0
- data/config/rubocop.yml +2 -0
- data/lib/rubocop/cop/rubomatic-rails/generator/cop_readme_injector.rb +1 -1
- data/lib/rubocop/rubomatic-rails/plugin.rb +34 -0
- data/lib/rubocop/rubomatic-rails/version.rb +15 -1
- data/lib/rubocop-rubomatic-rails.rb +1 -3
- metadata +39 -9
- data/lib/rubocop/rubomatic-rails/inject.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fcb51a26550c302447f465a8393c373ff54c2ba4bbe380e156e311379e9d1e7
|
4
|
+
data.tar.gz: '00581c764412c2c596685853b96f82473cf7665f2fec887b744aa0591b5d4ca9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d7e9af433910670a30fa46c90a57777d151aac4663c92cc9ea50b717b9569a9527550229b041e8c6b1cea6de6665a2474dc9f84668d1757c0c990f792e141f9
|
7
|
+
data.tar.gz: aefce1c2c725002a602f001a97b24ebcc578ca5d463751bbbbed667f5f637a7b9a881cd0147a15f6f5b612507bf52e1e764218c5a2cb9ac2ed750537804f9562
|
data/CHANGELOG.adoc
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
== 1.6.0 (2025-06-12)
|
2
|
+
|
3
|
+
* Upgrade to ``ruobcop-rubomatic 1.6.0``
|
4
|
+
** This includes the change from ``require:`` to ``plugins:``.
|
5
|
+
While ``require:`` will still work, there will be a deprecation warning
|
6
|
+
* Upgrade to ``rubocop-rails 2.32.0``
|
7
|
+
** Enabled ``Rails/MultipleRoutePaths``
|
8
|
+
** Enabled ``Rails/StrongParametersExpect`` (Only in ``Rails 8+``)
|
9
|
+
* Added ``rubocop-rspec_rails 2.31.0``
|
10
|
+
** Enabled ``RSpecRails/AvoidSetupHook``
|
11
|
+
** Enabled ``RSpecRails/HaveHttpStatus``
|
12
|
+
** Enabled ``RSpecRails/HttpStatus``
|
13
|
+
** Enabled ``RSpecRails/InferredSpecType``
|
14
|
+
** Enabled ``RSpecRails/MinitestAssertions``
|
15
|
+
** Enabled ``RSpecRails/NegationBeValid``
|
16
|
+
** Enabled ``RSpecRails/TravelAround``
|
17
|
+
|
1
18
|
== 1.5.0 (2024-10-23)
|
2
19
|
|
3
20
|
=== Cops
|
data/config/rails.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
plugins: rubocop-rails
|
2
2
|
|
3
3
|
Rails/ActionControllerFlashBeforeRender:
|
4
4
|
Enabled: true
|
@@ -351,6 +351,13 @@ Rails/MigrationClassName:
|
|
351
351
|
Include:
|
352
352
|
- db/migrate/*.rb
|
353
353
|
|
354
|
+
Rails/MultipleRoutePaths:
|
355
|
+
Enabled: true
|
356
|
+
Severity: error
|
357
|
+
Include:
|
358
|
+
- '**/config/routes.rb'
|
359
|
+
- '**/config/routes/**/*.rb'
|
360
|
+
|
354
361
|
Rails/NegateInclude:
|
355
362
|
Enabled: true
|
356
363
|
|
@@ -573,6 +580,11 @@ Rails/SquishedSQLHeredocs:
|
|
573
580
|
Rails/StripHeredoc:
|
574
581
|
Enabled: true
|
575
582
|
|
583
|
+
Rails/StrongParametersExpect:
|
584
|
+
Enabled: <%= `rails -v`.split(' ').last.to_i >= 8 %>
|
585
|
+
Include:
|
586
|
+
- '**/app/controllers/**/*.rb'
|
587
|
+
|
576
588
|
Rails/TableNameAssignment:
|
577
589
|
Enabled: true
|
578
590
|
Include:
|
@@ -0,0 +1,43 @@
|
|
1
|
+
plugins: rubocop-rspec_rails
|
2
|
+
|
3
|
+
RSpecRails/AvoidSetupHook:
|
4
|
+
Enabled: true
|
5
|
+
|
6
|
+
RSpecRails/HaveHttpStatus:
|
7
|
+
Enabled: true
|
8
|
+
ResponseMethods:
|
9
|
+
- response
|
10
|
+
- last_response
|
11
|
+
|
12
|
+
RSpecRails/HttpStatus:
|
13
|
+
Enabled: true
|
14
|
+
EnforcedStyle: symbolic
|
15
|
+
|
16
|
+
RSpecRails/InferredSpecType:
|
17
|
+
Enabled: true
|
18
|
+
Inferences:
|
19
|
+
channels: channel
|
20
|
+
controllers: controller
|
21
|
+
features: feature
|
22
|
+
generator: generator
|
23
|
+
helpers: helper
|
24
|
+
jobs: job
|
25
|
+
mailboxes: mailbox
|
26
|
+
mailers: mailer
|
27
|
+
models: model
|
28
|
+
requests: request
|
29
|
+
integration: request
|
30
|
+
api: request
|
31
|
+
routing: routing
|
32
|
+
system: system
|
33
|
+
views: view
|
34
|
+
|
35
|
+
RSpecRails/MinitestAssertions:
|
36
|
+
Enabled: true
|
37
|
+
|
38
|
+
RSpecRails/NegationBeValid:
|
39
|
+
Enabled: true
|
40
|
+
EnforcedStyle: be_invalid
|
41
|
+
|
42
|
+
RSpecRails/TravelAround:
|
43
|
+
Enabled: true
|
data/config/rubocop.yml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
inherit_from:
|
2
2
|
- ./rails.yml
|
3
|
+
- ./rspec_rails.yml
|
3
4
|
|
4
5
|
inherit_gem:
|
5
6
|
rubocop-rubomatic: config/rubocop.yml
|
@@ -23,6 +24,7 @@ AllCops:
|
|
23
24
|
- '.irbrc'
|
24
25
|
- 'db/schema.rb'
|
25
26
|
TargetRubyVersion: <%= ENV['RUBY_MAJOR'] %>
|
27
|
+
TargetRailsVersion: <%= `rails -v`.split(' ').last.to_f %>
|
26
28
|
SuggestExtensions: false
|
27
29
|
StyleGuideBaseURL: https://github.com/BrandsInsurance/expert-chainsaw/blob/main/ruby/RUBY_STYLE_GUIDE.adoc
|
28
30
|
ActiveSupportExtensionsEnabled: true
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'lint_roller'
|
4
|
+
|
5
|
+
module RuboCop
|
6
|
+
module RubomaticRails
|
7
|
+
# A plugin that integrates RuboCop Performance with RuboCop's plugin system.
|
8
|
+
class Plugin < LintRoller::Plugin
|
9
|
+
# :nodoc:
|
10
|
+
def about
|
11
|
+
LintRoller::About.new(
|
12
|
+
name: 'rubocop-rubomatic-rails',
|
13
|
+
version: VERSION::STRING,
|
14
|
+
homepage: 'https://github.com/BrandsInsurance/rubocop-rubomatic-rails',
|
15
|
+
description: 'A collection of RuboCop cops to check for performance optimizations in Ruby code.'
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
# :nodoc:
|
20
|
+
def supported?(context)
|
21
|
+
context.engine == :rubocop
|
22
|
+
end
|
23
|
+
|
24
|
+
# :nodoc:
|
25
|
+
def rules(_context)
|
26
|
+
LintRoller::Rules.new(
|
27
|
+
type: :path,
|
28
|
+
config_format: :rubocop,
|
29
|
+
value: Pathname.new(__dir__).join('../../../config/default.yml')
|
30
|
+
)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
module RuboCop
|
4
4
|
module RubomaticRails
|
5
|
-
VERSION
|
5
|
+
module VERSION
|
6
|
+
MAJOR = 1
|
7
|
+
MINOR = 6
|
8
|
+
TINY = 0
|
9
|
+
|
10
|
+
# Set PRE to nil unless it's a pre-release (beta, rc, etc.)
|
11
|
+
PRE = 'rc.pre.2'
|
12
|
+
|
13
|
+
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.').freeze
|
14
|
+
|
15
|
+
# @return [String]
|
16
|
+
def self.to_s
|
17
|
+
STRING
|
18
|
+
end
|
19
|
+
end
|
6
20
|
end
|
7
21
|
end
|
@@ -4,9 +4,7 @@ require 'rubocop'
|
|
4
4
|
|
5
5
|
require_relative 'rubocop/cop/rubomatic-rails/generator'
|
6
6
|
require_relative 'rubocop/rubomatic-rails'
|
7
|
-
require_relative 'rubocop/rubomatic-rails/
|
7
|
+
require_relative 'rubocop/rubomatic-rails/plugin'
|
8
8
|
require_relative 'rubocop/rubomatic-rails/version'
|
9
9
|
|
10
|
-
RuboCop::RubomaticRails::Inject.defaults!
|
11
|
-
|
12
10
|
require_relative 'rubocop/cop/rubomatic_rails_cops'
|
metadata
CHANGED
@@ -1,43 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-rubomatic-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0.rc.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brands Insurance
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lint_roller
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.1.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rubocop-rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
33
|
+
version: 2.32.0
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
40
|
+
version: 2.32.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-rspec_rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.31.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.31.0
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: rubocop-rubomatic
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
61
|
+
version: 1.6.0
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
68
|
+
version: 1.6.0
|
41
69
|
description:
|
42
70
|
email:
|
43
71
|
- documents@brandsinsurance.com
|
@@ -50,6 +78,7 @@ files:
|
|
50
78
|
- README.adoc
|
51
79
|
- config/default.yml
|
52
80
|
- config/rails.yml
|
81
|
+
- config/rspec_rails.yml
|
53
82
|
- config/rubocop.yml
|
54
83
|
- lib/rubocop-rubomatic-rails.rb
|
55
84
|
- lib/rubocop/cop/rubomatic-rails/generator.rb
|
@@ -57,12 +86,13 @@ files:
|
|
57
86
|
- lib/rubocop/cop/rubomatic-rails/generator/dept_readme_injector.rb
|
58
87
|
- lib/rubocop/cop/rubomatic_rails_cops.rb
|
59
88
|
- lib/rubocop/rubomatic-rails.rb
|
60
|
-
- lib/rubocop/rubomatic-rails/
|
89
|
+
- lib/rubocop/rubomatic-rails/plugin.rb
|
61
90
|
- lib/rubocop/rubomatic-rails/version.rb
|
62
91
|
homepage: https://github.com/BrandsInsurance/rubocop-rubomatic-rails
|
63
92
|
licenses:
|
64
93
|
- MIT
|
65
94
|
metadata:
|
95
|
+
default_lint_roller_plugin: RuboCop::RubomaticRails::Plugin
|
66
96
|
rubygems_mfa_required: 'true'
|
67
97
|
homepage_uri: https://github.com/BrandsInsurance/rubocop-rubomatic-rails
|
68
98
|
source_code_uri: https://github.com/BrandsInsurance/rubocop-rubomatic-rails
|
@@ -78,9 +108,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
108
|
version: 3.0.1
|
79
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
110
|
requirements:
|
81
|
-
- - "
|
111
|
+
- - ">"
|
82
112
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
113
|
+
version: 1.3.1
|
84
114
|
requirements: []
|
85
115
|
rubygems_version: 3.2.15
|
86
116
|
signing_key:
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module RuboCop
|
4
|
-
module RubomaticRails
|
5
|
-
module Inject
|
6
|
-
# This was a generated method from https://github.com/rubocop/rubocop-extension-generator
|
7
|
-
#
|
8
|
-
def self.defaults!
|
9
|
-
path = CONFIG_DEFAULT.to_s
|
10
|
-
hash = ConfigLoader.__send__(:load_yaml_configuration, path)
|
11
|
-
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
12
|
-
|
13
|
-
puts("configuration from #{path}") if ConfigLoader.debug?
|
14
|
-
|
15
|
-
config = ConfigLoader.merge_with_default(config, path)
|
16
|
-
|
17
|
-
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|