sequra-style 1.19.0 → 1.20.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: 47e2880848be7928ef68435e320055b4d2003f4b321d172094fa77f123f5139e
4
- data.tar.gz: d8ef008a1b7ba0477c45a19d52eb965d86a994fe5c7c203c67ecc2941f2ac798
3
+ metadata.gz: 661f451967ba1e1afca29a509c74b5c1b348a69a34a943daef8cb61d77e87561
4
+ data.tar.gz: 73f5e38e830888fe241c9d5a1a301aadf8faf8cefe7ac6fa34a8e6c2b6b7a502
5
5
  SHA512:
6
- metadata.gz: 19d7b3760cf692ed282a02b99416f5d3e6f9fc288a8f5ecf8086e40459215f8665c27fc90f336183e42dcc37823668364a9d8503fa8a462b3afc5ad0d68885cb
7
- data.tar.gz: 17bd16a9f9499060f4ee8e986c0f7a12e32a5a1f5d28ba494b9b5ca2d6ac8e78dda03254ea83d75c8073bc7823c60a738f171dd492e76910269fd41f1f5574da
6
+ metadata.gz: f584e06021f2b4baba58199ec9a75b4414030a512decbfc26257eb11ee77d2a8ccb46d44a729df698aed296167e18e2958da7e5c200003342239ea204c6a491a
7
+ data.tar.gz: 3947c3bcd7aba4e21ffe5528111663d06511706308b46fbff7b50706bd7c0eea2b3c6815ad91bb5c6103ad26888d84c861ec3387aa6fd6ea72010cdcc03e3ad6
@@ -0,0 +1,57 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ # This gem is the shared rubocop config, so its gemspec ranges decide what every
6
+ # seQura Ruby repo resolves. Dependabot refreshes Gemfile.lock and never rewrites
7
+ # them: a cop bump landing everywhere at once stays a human decision.
8
+ versioning-strategy: "lockfile-only"
9
+ schedule:
10
+ interval: "weekly"
11
+ day: "monday"
12
+ time: "08:00"
13
+ timezone: "Europe/Madrid"
14
+ open-pull-requests-limit: 5
15
+ # PR titles are linted for conventional commits, and "chore" keeps release-please
16
+ # from cutting a release for a lockfile change.
17
+ commit-message:
18
+ prefix: "chore(deps)"
19
+ prefix-development: "chore(deps-dev)"
20
+ labels: ["dependencies", "ruby"]
21
+ # Applies to version updates only: security fixes are never held back.
22
+ cooldown:
23
+ default-days: 7
24
+ semver-major-days: 30
25
+ semver-minor-days: 7
26
+ semver-patch-days: 3
27
+ groups:
28
+ bundler-minor-patch:
29
+ dependency-type: "production"
30
+ patterns: ["*"]
31
+ update-types: ["minor", "patch"]
32
+ # Development dependencies never reach consumers: green CI is enough to merge.
33
+ bundler-dev-minor-patch:
34
+ dependency-type: "development"
35
+ patterns: ["*"]
36
+ update-types: ["minor", "patch"]
37
+ # Majors stay ungrouped so each keeps its own reviewable PR.
38
+
39
+ - package-ecosystem: "github-actions"
40
+ directory: "/"
41
+ schedule:
42
+ interval: "weekly"
43
+ day: "monday"
44
+ time: "08:00"
45
+ timezone: "Europe/Madrid"
46
+ open-pull-requests-limit: 3
47
+ commit-message:
48
+ prefix: "chore(deps)"
49
+ labels: ["dependencies", "github-actions"]
50
+ # github-actions supports default-days only: the semver tiers are documented as
51
+ # unsupported for it, so they would be silently ignored here.
52
+ cooldown:
53
+ default-days: 7
54
+ groups:
55
+ github-actions-minor-patch:
56
+ patterns: ["*"]
57
+ update-types: ["minor", "patch"]
@@ -15,6 +15,6 @@ jobs:
15
15
  name: Validate PR title
16
16
  runs-on: ubuntu-latest
17
17
  steps:
18
- - uses: amannn/action-semantic-pull-request@v5
18
+ - uses: amannn/action-semantic-pull-request@v6
19
19
  env:
20
20
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -3,18 +3,26 @@ on:
3
3
  push:
4
4
  branches:
5
5
  - 'master'
6
+ # Least privilege for the release job: contents, issues and pull-requests are what
7
+ # release-please needs to open, label and tag the release PR. The gem is pushed to
8
+ # rubygems.org with its own token, so no packages scope is needed here.
9
+ permissions:
10
+ contents: write
11
+ issues: write
12
+ pull-requests: write
6
13
  jobs:
7
14
  release:
8
15
  runs-on: ubuntu-latest
9
16
  steps:
10
- - uses: GoogleCloudPlatform/release-please-action@v3
17
+ # Release type, gem name and version file moved to release-please-config.json:
18
+ # v4 removed those inputs in favour of the manifest configuration, and unknown
19
+ # `with:` keys only warn, so stale inputs would silently stop bumping version.rb.
20
+ - uses: googleapis/release-please-action@v5
11
21
  id: release
12
22
  with:
13
- release-type: ruby
14
- package-name: sequra-style
15
- bump-minor-pre-major: true
16
- version-file: 'lib/sequra/style/version.rb'
17
- - uses: actions/checkout@v2
23
+ config-file: release-please-config.json
24
+ manifest-file: .release-please-manifest.json
25
+ - uses: actions/checkout@v7
18
26
  if: ${{ steps.release.outputs.release_created }}
19
27
  - uses: ruby/setup-ruby@v1
20
28
  with:
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.20.1"
3
+ }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.20.1](https://github.com/sequra/sequra-style/compare/v1.20.0...v1.20.1) (2026-12-03)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **rubocop:** exclude migrations from Metrics/MethodLength ([#100](https://github.com/sequra/sequra-style/issues/100)) ([5d8e7af](https://github.com/sequra/sequra-style/commit/5d8e7af0d592f401bab8675796a4d0b381572bcd))
9
+
10
+ ## [1.20.0](https://github.com/sequra/sequra-style/compare/v1.19.0...v1.20.0) (2026-08-26)
11
+
12
+
13
+ ### Features
14
+
15
+ * [COR-2792] add Sequra/NoHelpers cop ([#91](https://github.com/sequra/sequra-style/issues/91)) ([443db77](https://github.com/sequra/sequra-style/commit/443db77b813cee105abb3d9a4ea71d54c9c221e6))
16
+
3
17
  ## [1.19.0](https://github.com/sequra/sequra-style/compare/v1.18.0...v1.19.0) (2026-07-29)
4
18
 
5
19
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sequra-style (1.19.0)
4
+ sequra-style (1.20.1)
5
5
  rubocop (~> 1.75)
6
6
  rubocop-performance (~> 1.25)
7
7
  rubocop-rails (~> 2.31)
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (8.1.3)
13
+ activesupport (8.1.4)
14
14
  base64
15
15
  bigdecimal
16
16
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -25,29 +25,30 @@ GEM
25
25
  uri (>= 0.13.1)
26
26
  ast (2.4.3)
27
27
  base64 (0.3.0)
28
- bigdecimal (4.0.1)
29
- concurrent-ruby (1.3.6)
28
+ bigdecimal (4.1.3)
29
+ concurrent-ruby (1.3.8)
30
30
  connection_pool (3.0.2)
31
31
  diff-lcs (1.6.2)
32
32
  drb (2.2.3)
33
- i18n (1.14.8)
33
+ i18n (1.15.2)
34
34
  concurrent-ruby (~> 1.0)
35
- json (2.19.8)
36
- language_server-protocol (3.17.0.5)
35
+ json (3.1.0)
36
+ language_server-protocol (3.17.0.6)
37
37
  lint_roller (1.1.0)
38
38
  logger (1.7.0)
39
- minitest (6.0.1)
40
- prism (~> 1.5)
41
- parallel (1.27.0)
42
- parser (3.3.10.1)
39
+ minitest (6.1.0)
40
+ drb (~> 2.0)
41
+ prism (>= 1.5, < 3)
42
+ parallel (2.3.0)
43
+ parser (3.3.14.0)
43
44
  ast (~> 2.4.1)
44
45
  racc
45
- prism (1.9.0)
46
+ prism (2.1.0)
46
47
  racc (1.8.1)
47
- rack (3.2.6)
48
+ rack (3.2.7)
48
49
  rainbow (3.1.1)
49
50
  rake (13.0.6)
50
- regexp_parser (2.11.3)
51
+ regexp_parser (2.13.4)
51
52
  rspec (3.13.2)
52
53
  rspec-core (~> 3.13.0)
53
54
  rspec-expectations (~> 3.13.0)
@@ -61,40 +62,43 @@ GEM
61
62
  diff-lcs (>= 1.2.0, < 2.0)
62
63
  rspec-support (~> 3.13.0)
63
64
  rspec-support (3.13.7)
64
- rubocop (1.84.1)
65
- json (~> 2.3)
65
+ rubocop (1.92.3)
66
+ json (>= 2.3)
66
67
  language_server-protocol (~> 3.17.0.2)
67
68
  lint_roller (~> 1.1.0)
68
- parallel (~> 1.10)
69
+ parallel (>= 1.10)
69
70
  parser (>= 3.3.0.2)
70
71
  rainbow (>= 2.2.2, < 4.0)
71
- regexp_parser (>= 2.9.3, < 3.0)
72
+ regexp_parser (>= 2.11.3, < 3.0)
72
73
  rubocop-ast (>= 1.49.0, < 2.0)
73
74
  ruby-progressbar (~> 1.7)
74
75
  unicode-display_width (>= 2.4.0, < 4.0)
75
- rubocop-ast (1.49.0)
76
+ rubocop-ast (1.53.0)
77
+ ast (~> 2.4)
76
78
  parser (>= 3.3.7.2)
77
- prism (~> 1.7)
78
- rubocop-performance (1.26.1)
79
+ prism (>= 1.7)
80
+ racc
81
+ rubocop-performance (1.27.0)
79
82
  lint_roller (~> 1.1)
80
- rubocop (>= 1.75.0, < 2.0)
83
+ rubocop (>= 1.89.0, < 2.0)
81
84
  rubocop-ast (>= 1.47.1, < 2.0)
82
- rubocop-rails (2.34.3)
85
+ rubocop-rails (2.38.0)
83
86
  activesupport (>= 4.2.0)
84
87
  lint_roller (~> 1.1)
85
88
  rack (>= 1.1)
86
- rubocop (>= 1.75.0, < 2.0)
89
+ rubocop (>= 1.89.0, < 2.0)
87
90
  rubocop-ast (>= 1.44.0, < 2.0)
88
- rubocop-rspec (3.9.0)
91
+ rubocop-rspec (3.10.2)
89
92
  lint_roller (~> 1.1)
90
- rubocop (~> 1.81)
93
+ regexp_parser (>= 2.0)
94
+ rubocop (~> 1.86, >= 1.86.2)
91
95
  ruby-progressbar (1.13.0)
92
96
  securerandom (0.4.1)
93
97
  tzinfo (2.0.6)
94
98
  concurrent-ruby (~> 1.0)
95
- unicode-display_width (3.2.0)
96
- unicode-emoji (~> 4.1)
97
- unicode-emoji (4.2.0)
99
+ unicode-display_width (3.3.0)
100
+ unicode-emoji (~> 4.3)
101
+ unicode-emoji (4.3.0)
98
102
  uri (1.1.1)
99
103
 
100
104
  PLATFORMS
data/default.yml CHANGED
@@ -379,6 +379,8 @@ Metrics/MethodLength:
379
379
  - hash
380
380
  - heredoc
381
381
  - method_call
382
+ Exclude:
383
+ - db/migrate/*.rb
382
384
 
383
385
  # Avoid long parameter lists (3-4 items max)
384
386
  # https://rubystyle.guide/#too-many-params
@@ -845,6 +847,17 @@ Sequra/AsyncJobPattern:
845
847
  Exclude:
846
848
  - "**/application_job.rb"
847
849
 
850
+ # Forbid Rails helpers. Helpers are globally mixed into every view, so they have
851
+ # no owner, no boundary and nothing to unit test; display logic belongs to
852
+ # presenters, formatters and calculators. Path-based at any nesting depth, so pack
853
+ # helper directories are covered too.
854
+ # Ships disabled so consumer repos opt in once their own `app/helpers/` is empty
855
+ # (paired with `.rubocop_todo.yml` to grandfather the stragglers).
856
+ Sequra/NoHelpers:
857
+ Enabled: false
858
+ Include:
859
+ - "**/app/helpers/**/*.rb"
860
+
848
861
  # Forbid stubbing/spying on Sidekiq enqueue methods in specs. Stubs bypass
849
862
  # `Sidekiq.strict_args!` validation, which has caused silent production
850
863
  # failures (COR-1923). Use `have_enqueued_sidekiq_job` or
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module Cop
5
+ module Sequra
6
+ # Flags any module or class defined under an `app/helpers/` directory.
7
+ #
8
+ # Rails helpers are globally mixed into every view, so they have no owner, no
9
+ # boundary and nothing to unit test. Display logic belongs to presenters (view
10
+ # context), formatters (pure data transformation) and calculators (derived values).
11
+ #
12
+ # The check is path-based, not name-based: a class named `RoutingHelper` outside
13
+ # `app/helpers/` is fine, and anything inside it is not. Any nesting depth is
14
+ # covered, so pack and nested-pack helper directories are caught too.
15
+ #
16
+ # @example
17
+ # # bad - app/helpers/foo_helper.rb, packs/my_pack/app/helpers/foo_helper.rb
18
+ # module FooHelper
19
+ # def label(order) = order.reference
20
+ # end
21
+ #
22
+ # # good - app/presenters/foo_presenter.rb
23
+ # class FooPresenter
24
+ # def label = order.reference
25
+ # end
26
+ class NoHelpers < Base
27
+ MSG = "Do not create helpers. Use presenters, formatters, or calculators instead."
28
+
29
+ HELPER_PATH = %r{(^|/)app/helpers/}
30
+
31
+ def on_module(node)
32
+ add_offense(declaration_range(node)) if helper_file?
33
+ end
34
+
35
+ def on_class(node)
36
+ add_offense(declaration_range(node)) if helper_file?
37
+ end
38
+
39
+ private
40
+
41
+ # Keeps the highlight on the declaration instead of the whole body, which editors
42
+ # would otherwise underline end to end.
43
+ def declaration_range(node)
44
+ node.loc.keyword.join(node.loc.name)
45
+ end
46
+
47
+ def helper_file?
48
+ processed_source.file_path.match?(HELPER_PATH)
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -1,5 +1,5 @@
1
1
  module Sequra
2
2
  module Style
3
- VERSION = "1.19.0"
3
+ VERSION = "1.20.1"
4
4
  end
5
5
  end
data/lib/sequra_style.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "rubocop"
2
2
  require_relative "rubocop/cop/sequra/async_job_pattern"
3
+ require_relative "rubocop/cop/sequra/no_helpers"
3
4
  require_relative "rubocop/cop/sequra/no_sidekiq_perform_stubs"
4
5
  require_relative "rubocop/cop/sequra/prometheus_metric_labels"
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "packages": {
4
+ ".": {
5
+ "release-type": "ruby",
6
+ "package-name": "sequra-style",
7
+ "include-component-in-tag": false,
8
+ "version-file": "lib/sequra/style/version.rb"
9
+ }
10
+ }
11
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequra-style
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sequra engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-30 00:00:00.000000000 Z
11
+ date: 2026-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -123,9 +123,11 @@ extra_rdoc_files: []
123
123
  files:
124
124
  - ".github/CODEOWNERS"
125
125
  - ".github/PULL_REQUEST_TEMPLATE.md"
126
+ - ".github/dependabot.yml"
126
127
  - ".github/workflows/pr_title_validation.yml"
127
128
  - ".github/workflows/release.yml"
128
129
  - ".gitignore"
130
+ - ".release-please-manifest.json"
129
131
  - ".rubocop.yml"
130
132
  - CHANGELOG.md
131
133
  - Gemfile
@@ -141,11 +143,13 @@ files:
141
143
  - docs/decisions/index.md
142
144
  - docs/decisions/template.md
143
145
  - lib/rubocop/cop/sequra/async_job_pattern.rb
146
+ - lib/rubocop/cop/sequra/no_helpers.rb
144
147
  - lib/rubocop/cop/sequra/no_sidekiq_perform_stubs.rb
145
148
  - lib/rubocop/cop/sequra/prometheus_metric_labels.rb
146
149
  - lib/sequra/style.rb
147
150
  - lib/sequra/style/version.rb
148
151
  - lib/sequra_style.rb
152
+ - release-please-config.json
149
153
  - sequra-style.gemspec
150
154
  homepage: https://github.com/sequra/sequra-style
151
155
  licenses: