rubocop-discourse 3.9.1 → 3.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77217a0f29ec6a88cb9cd14fc09d951b5d6a6801bdc79b4705a3a18d29ca87bd
4
- data.tar.gz: 0ba701b3bb6ef09efacf793df893be4be9808de1d492a0851195dcb95ed01326
3
+ metadata.gz: 5b3535299ced6e96016ee33586fe7e9b8e0b910c6cc2a441972acb9e3c6b9207
4
+ data.tar.gz: 99f0a0dd461aebbc1267dba788730ade31af6a02f0709ae51c8afba65b109d98
5
5
  SHA512:
6
- metadata.gz: 0fc6f9d26180f1b00c98d0c5661776c56489fcda4be09f6431aee482a6a49cf1879e6827475cc374ff7f19cfcf952977f1d47f63e0ecc5bce321900d0e0dcf76
7
- data.tar.gz: 8aa918ebf81e7e5d1c7fa1570b96d92ecd71c90d1d143ef8ae786d5325a2fc49763b87db414d0e7db0aafa0f4af3ab75822432bfee0df63e1cdb5de161bf4747
6
+ metadata.gz: 48c1e9c95219737c00fd847c9f030f4e3704147b64dd16cc5a79449cec341535d870f498430afc7b47115ad6edb31adddcc54e145e60d100292fef7576e3b689
7
+ data.tar.gz: 2b19583ee4c90bb79e1dfcfe5919bf1fe9c13786ecd8a8d6b4cfe0bfaa0fc8952ae280a721631d4968b736ac13c34857290698b989bbcf8ce30dafa57bf6c0d7
@@ -34,7 +34,7 @@ jobs:
34
34
  - uses: actions/checkout@v3
35
35
 
36
36
  - name: Release Gem
37
- uses: discourse/publish-rubygems-action@v2
37
+ uses: discourse/publish-rubygems-action@v3
38
38
  env:
39
39
  RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
40
40
  GIT_EMAIL: team@discourse.org
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require 'spec_helper'
data/config/default.yml CHANGED
@@ -1,8 +1,7 @@
1
1
  Discourse/NoChdir:
2
2
  Enabled: true
3
3
  Exclude:
4
- - 'spec/**/*' # Specs are run sequentially, so chdir can be used
5
- - 'plugins/*/spec/**/*'
4
+ - "**/spec/**/*" # Specs are run sequentially, so chdir can be used
6
5
 
7
6
  Discourse/NoTimeNewWithoutArgs:
8
7
  Enabled: true
@@ -13,8 +12,8 @@ Discourse/NoURIEscapeEncode:
13
12
  Discourse/NoAddReferenceOrAliasesActiveRecordMigration:
14
13
  Enabled: true
15
14
  Include:
16
- - '**/db/migrate/*'
17
- - '**/db/post_migrate/*'
15
+ - "**/db/migrate/*"
16
+ - "**/db/post_migrate/*"
18
17
 
19
18
  Discourse/NoNokogiriHtmlFragment:
20
19
  Enabled: true
@@ -22,51 +21,45 @@ Discourse/NoNokogiriHtmlFragment:
22
21
  Discourse/NoResetColumnInformationInMigrations:
23
22
  Enabled: false
24
23
  Include:
25
- - '**/db/migrate/*'
26
- - '**/db/post_migrate/*'
24
+ - "**/db/migrate/*"
25
+ - "**/db/post_migrate/*"
27
26
 
28
27
  # Specs
29
28
 
30
29
  Discourse/NoDirectMultisiteManipulation:
31
30
  Enabled: true
32
- Patterns:
33
- - _spec.rb
34
- - '(?:^|/)spec/'
31
+ Include:
32
+ - "**/spec/**/*"
35
33
 
36
34
  Discourse/TimeEqMatcher:
37
35
  Enabled: true
38
- Patterns:
39
- - _spec.rb
40
- - '(?:^|/)spec/'
36
+ Include:
37
+ - "**/spec/**/*"
41
38
 
42
39
  Discourse/NoJsonParseResponse:
43
40
  Enabled: false
44
- Patterns:
45
- - _spec.rb
46
- - '(?:^|/)spec/'
41
+ Include:
42
+ - "**/spec/**/*"
47
43
 
48
44
  Discourse/NoMockingJobs:
49
45
  Enabled: true
50
- Patterns:
51
- - _spec.rb
52
- - '(?:^|/)spec/'
46
+ Include:
47
+ - "**/spec/**/*"
53
48
 
54
49
  Discourse/OnlyTopLevelMultisiteSpecs:
55
50
  Enabled: true
56
- Patterns:
57
- - _spec.rb
58
- - '(?:^|/)spec/'
51
+ Include:
52
+ - "**/spec/**/*"
59
53
 
60
54
  Discourse/NoMixingMultisiteAndStandardSpecs:
61
55
  Enabled: true
62
- Patterns:
63
- - _spec.rb
64
- - '(?:^|/)spec/'
56
+ Include:
57
+ - "**/spec/**/*"
65
58
 
66
59
  Discourse/Plugins/CallRequiresPlugin:
67
60
  Enabled: true
68
61
  Include:
69
- - 'app/controllers/**/*'
62
+ - "app/controllers/**/*"
70
63
 
71
64
  Discourse/Plugins/UsePluginInstanceOn:
72
65
  Enabled: true
@@ -74,16 +67,16 @@ Discourse/Plugins/UsePluginInstanceOn:
74
67
  Discourse/Plugins/NamespaceMethods:
75
68
  Enabled: true
76
69
  Exclude:
77
- - '**/spec/**/*'
78
- - '**/tasks/**/*.rake'
79
- - '**/db/fixtures/**/*'
70
+ - "**/spec/**/*"
71
+ - "**/tasks/**/*.rake"
72
+ - "**/db/fixtures/**/*"
80
73
 
81
74
  Discourse/Plugins/NamespaceConstants:
82
75
  Enabled: true
83
76
  Exclude:
84
- - '**/spec/**/*'
85
- - '**/tasks/**/*.rake'
86
- - '**/db/fixtures/**/*'
77
+ - "**/spec/**/*"
78
+ - "**/tasks/**/*.rake"
79
+ - "**/db/fixtures/**/*"
87
80
 
88
81
  Discourse/Plugins/UseRequireRelative:
89
82
  Enabled: true
data/rubocop-core.yml CHANGED
@@ -39,8 +39,7 @@ Style/GlobalVars:
39
39
  Exclude:
40
40
  - "lib/tasks/**/*"
41
41
  - "script/**/*"
42
- - "spec/**/*.rb"
43
- - "plugins/*/spec/**/*"
42
+ - "**/spec/**/*"
44
43
 
45
44
  Style/InvertibleUnlessCondition:
46
45
  Enabled: true
@@ -142,4 +141,4 @@ Lint/SafeNavigationConsistency:
142
141
  Enabled: true
143
142
 
144
143
  Lint/OrAssignmentToConstant:
145
- Enabled: true
144
+ Enabled: true
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rubocop-discourse"
5
- s.version = "3.9.1"
5
+ s.version = "3.9.2"
6
6
  s.summary = "Custom rubocop cops used by Discourse"
7
7
  s.authors = ["Discourse Team"]
8
8
  s.license = "MIT"
data/rubocop-rspec.yml CHANGED
@@ -228,11 +228,11 @@ RSpec/Dialect:
228
228
  Enabled: true
229
229
  PreferredMethods:
230
230
  background: :before
231
- scenario: :it
232
- xscenario: :xit
233
- given: :let
234
- given!: :let!
235
- feature: :describe
231
+ scenario: :it
232
+ xscenario: :xit
233
+ given: :let
234
+ given!: :let!
235
+ feature: :describe
236
236
 
237
237
  RSpecRails/HttpStatus:
238
238
  Enabled: true
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Services::EmptyLinesAroundBlocks,
6
4
  :config do
7
5
  subject(:cop) { described_class.new(config) }
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Services::GroupKeywords, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::FabricatorShorthand, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::FabricatorShorthand, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::NoAddReferenceOrAliasesActiveRecordMigration, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::NoAddReferenceOrAliasesActiveRecordMigration, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::NoMixingMultisiteAndStandardSpecs, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::NoMixingMultisiteAndStandardSpecs, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::NoMockingJobs, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::NoMockingJobs, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::NoResetColumnInformationInMigrations, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::NoResetColumnInformationInMigrations, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::OnlyTopLevelMultisiteSpecs, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::OnlyTopLevelMultisiteSpecs, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::CallRequiresPlugin, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::NamespaceConstants, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::NamespaceMethods, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::NoMonkeyPatching, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::UsePluginInstanceOn, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
3
  RSpec.describe RuboCop::Cop::Discourse::Plugins::UseRequireRelative, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "spec_helper"
4
-
5
- describe RuboCop::Cop::Discourse::TimeEqMatcher, :config do
3
+ RSpec.describe RuboCop::Cop::Discourse::TimeEqMatcher, :config do
6
4
  subject(:cop) { described_class.new(config) }
7
5
 
8
6
  let(:config) { RuboCop::Config.new }
data/stree-compat.yml CHANGED
@@ -13,13 +13,13 @@ AllCops:
13
13
  SuggestExtensions: false
14
14
  DisabledByDefault: true
15
15
  Exclude:
16
- - 'db/schema.rb'
17
- - 'bundle/**/*'
18
- - 'vendor/**/*'
19
- - '**/node_modules/**/*'
20
- - 'public/**/*'
21
- - 'plugins/**/gems/**/*'
22
- - 'plugins/**/vendor/**/*'
16
+ - "db/schema.rb"
17
+ - "bundle/**/*"
18
+ - "vendor/**/*"
19
+ - "**/node_modules/**/*"
20
+ - "public/**/*"
21
+ - "plugins/**/gems/**/*"
22
+ - "plugins/**/vendor/**/*"
23
23
 
24
24
  Discourse:
25
25
  Enabled: true
@@ -27,5 +27,4 @@ Discourse:
27
27
  Discourse/FabricatorShorthand:
28
28
  Enabled: true
29
29
  Include:
30
- - 'spec/**/*_spec.rb'
31
- - 'plugins/*/spec/**/*_spec.rb'
30
+ - "**/spec/**/*"
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-discourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.1
4
+ version: 3.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Discourse Team
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-04 00:00:00.000000000 Z
10
+ date: 2025-01-06 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -136,14 +135,13 @@ dependencies:
136
135
  - - "~>"
137
136
  - !ruby/object:Gem::Version
138
137
  version: 3.12.0
139
- description:
140
- email:
141
138
  executables: []
142
139
  extensions: []
143
140
  extra_rdoc_files: []
144
141
  files:
145
142
  - ".github/workflows/ci.yml"
146
143
  - ".gitignore"
144
+ - ".rspec"
147
145
  - ".rubocop.yml"
148
146
  - Gemfile
149
147
  - LICENSE
@@ -211,7 +209,6 @@ homepage: https://github.com/discourse/rubocop-discourse
211
209
  licenses:
212
210
  - MIT
213
211
  metadata: {}
214
- post_install_message:
215
212
  rdoc_options: []
216
213
  require_paths:
217
214
  - lib
@@ -226,8 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
226
223
  - !ruby/object:Gem::Version
227
224
  version: '0'
228
225
  requirements: []
229
- rubygems_version: 3.1.6
230
- signing_key:
226
+ rubygems_version: 3.6.2
231
227
  specification_version: 4
232
228
  summary: Custom rubocop cops used by Discourse
233
229
  test_files: []