rubocop-discourse 3.1.0 → 3.9.3
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/.github/workflows/ci.yml +2 -2
- data/.rspec +1 -0
- data/.rubocop.yml +7 -0
- data/config/default.yml +51 -24
- data/lib/rubocop/cop/discourse/fabricator_shorthand.rb +62 -0
- data/lib/rubocop/cop/discourse/no_add_reference_active_record_migrations.rb +9 -7
- data/lib/rubocop/cop/discourse/no_chdir.rb +1 -1
- data/lib/rubocop/cop/discourse/no_direct_multisite_manipulation.rb +3 -2
- data/lib/rubocop/cop/discourse/no_json_parse_response.rb +2 -4
- data/lib/rubocop/cop/discourse/no_mixing_multisite_and_standard_specs.rb +4 -7
- data/lib/rubocop/cop/discourse/no_mocking_jobs.rb +3 -2
- data/lib/rubocop/cop/discourse/no_nokogiri_html_fragment.rb +1 -1
- data/lib/rubocop/cop/discourse/no_reset_column_information_in_migrations.rb +6 -5
- data/lib/rubocop/cop/discourse/no_time_new_without_args.rb +2 -4
- data/lib/rubocop/cop/discourse/no_uri_escape_encode.rb +11 -8
- data/lib/rubocop/cop/discourse/only_top_level_multisite_specs.rb +2 -6
- data/lib/rubocop/cop/discourse/plugins/call_requires_plugin.rb +71 -0
- data/lib/rubocop/cop/discourse/plugins/namespace_constants.rb +35 -0
- data/lib/rubocop/cop/discourse/plugins/namespace_methods.rb +37 -0
- data/lib/rubocop/cop/discourse/plugins/no_monkey_patching.rb +92 -0
- data/lib/rubocop/cop/discourse/plugins/use_plugin_instance_on.rb +42 -0
- data/lib/rubocop/cop/discourse/plugins/use_require_relative.rb +32 -0
- data/lib/rubocop/cop/discourse/services/empty_lines_around_blocks.rb +114 -0
- data/lib/rubocop/cop/discourse/services/group_keywords.rb +92 -0
- data/lib/rubocop/cop/discourse/time_eq_matcher.rb +2 -4
- data/lib/rubocop/cop/discourse_cops.rb +1 -1
- data/lib/rubocop/discourse.rb +3 -3
- data/lib/rubocop-discourse.rb +4 -0
- data/rubocop-capybara.yml +5 -0
- data/rubocop-core.yml +81 -4
- data/rubocop-discourse.gemspec +15 -10
- data/rubocop-factory_bot.yml +11 -0
- data/rubocop-layout.yml +4 -0
- data/rubocop-rails.yml +14 -0
- data/rubocop-rspec.yml +29 -23
- data/spec/fixtures/controllers/bad_controller.rb +5 -0
- data/spec/fixtures/controllers/base_controller.rb +11 -0
- data/spec/fixtures/controllers/good_controller.rb +4 -0
- data/spec/fixtures/controllers/inherit_from_outside_controller.rb +5 -0
- data/spec/fixtures/controllers/namespaced_parent_controller.rb +5 -0
- data/spec/fixtures/controllers/no_requires_plugin_controller.rb +5 -0
- data/spec/fixtures/controllers/requires_plugin_controller.rb +6 -0
- data/spec/lib/rubocop/cop/discourse/services/empty_lines_around_blocks_spec.rb +309 -0
- data/spec/lib/rubocop/cop/discourse/services/group_keywords_spec.rb +137 -0
- data/spec/lib/rubocop/cop/fabricator_shorthand_spec.rb +47 -0
- data/spec/lib/rubocop/cop/no_add_reference_active_record_migrations_spec.rb +13 -16
- data/spec/lib/rubocop/cop/no_mixing_multisite_and_standard_specs_spec.rb +10 -14
- data/spec/lib/rubocop/cop/no_mocking_jobs_enqueue_spec.rb +8 -12
- data/spec/lib/rubocop/cop/no_reset_column_information_migrations_spec.rb +8 -10
- data/spec/lib/rubocop/cop/only_top_level_multisite_specs_spec.rb +14 -18
- data/spec/lib/rubocop/cop/plugins/call_requires_plugin_spec.rb +79 -0
- data/spec/lib/rubocop/cop/plugins/namespace_constants_spec.rb +40 -0
- data/spec/lib/rubocop/cop/plugins/namespace_methods_spec.rb +84 -0
- data/spec/lib/rubocop/cop/plugins/no_monkey_patching_spec.rb +91 -0
- data/spec/lib/rubocop/cop/plugins/use_plugin_instance_on_spec.rb +37 -0
- data/spec/lib/rubocop/cop/plugins/use_require_relative_spec.rb +24 -0
- data/spec/lib/rubocop/cop/time_eq_matcher_spec.rb +6 -10
- data/spec/spec_helper.rb +4 -4
- data/stree-compat.yml +10 -1
- metadata +110 -16
metadata
CHANGED
@@ -1,31 +1,58 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-discourse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Discourse Team
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-31 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: activesupport
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '6.1'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '6.1'
|
13
26
|
- !ruby/object:Gem::Dependency
|
14
27
|
name: rubocop
|
15
28
|
requirement: !ruby/object:Gem::Requirement
|
16
29
|
requirements:
|
17
30
|
- - ">="
|
18
31
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
32
|
+
version: 1.59.0
|
20
33
|
type: :runtime
|
21
34
|
prerelease: false
|
22
35
|
version_requirements: !ruby/object:Gem::Requirement
|
23
36
|
requirements:
|
24
37
|
- - ">="
|
25
38
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
39
|
+
version: 1.59.0
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
41
|
name: rubocop-rspec
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.1
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 3.0.1
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rubocop-factory_bot
|
29
56
|
requirement: !ruby/object:Gem::Requirement
|
30
57
|
requirements:
|
31
58
|
- - ">="
|
@@ -38,42 +65,83 @@ dependencies:
|
|
38
65
|
- - ">="
|
39
66
|
- !ruby/object:Gem::Version
|
40
67
|
version: 2.0.0
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rubocop-capybara
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 2.0.0
|
75
|
+
type: :runtime
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.0.0
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rubocop-rails
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.25.0
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 2.25.0
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rubocop-rspec_rails
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 2.30.0
|
103
|
+
type: :runtime
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 2.30.0
|
41
110
|
- !ruby/object:Gem::Dependency
|
42
111
|
name: rake
|
43
112
|
requirement: !ruby/object:Gem::Requirement
|
44
113
|
requirements:
|
45
114
|
- - "~>"
|
46
115
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
116
|
+
version: 13.1.0
|
48
117
|
type: :development
|
49
118
|
prerelease: false
|
50
119
|
version_requirements: !ruby/object:Gem::Requirement
|
51
120
|
requirements:
|
52
121
|
- - "~>"
|
53
122
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
123
|
+
version: 13.1.0
|
55
124
|
- !ruby/object:Gem::Dependency
|
56
125
|
name: rspec
|
57
126
|
requirement: !ruby/object:Gem::Requirement
|
58
127
|
requirements:
|
59
|
-
- - "
|
128
|
+
- - "~>"
|
60
129
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
130
|
+
version: 3.12.0
|
62
131
|
type: :development
|
63
132
|
prerelease: false
|
64
133
|
version_requirements: !ruby/object:Gem::Requirement
|
65
134
|
requirements:
|
66
|
-
- - "
|
135
|
+
- - "~>"
|
67
136
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
description:
|
70
|
-
email:
|
137
|
+
version: 3.12.0
|
71
138
|
executables: []
|
72
139
|
extensions: []
|
73
140
|
extra_rdoc_files: []
|
74
141
|
files:
|
75
142
|
- ".github/workflows/ci.yml"
|
76
143
|
- ".gitignore"
|
144
|
+
- ".rspec"
|
77
145
|
- ".rubocop.yml"
|
78
146
|
- Gemfile
|
79
147
|
- LICENSE
|
@@ -82,6 +150,7 @@ files:
|
|
82
150
|
- config/default.yml
|
83
151
|
- default.yml
|
84
152
|
- lib/rubocop-discourse.rb
|
153
|
+
- lib/rubocop/cop/discourse/fabricator_shorthand.rb
|
85
154
|
- lib/rubocop/cop/discourse/no_add_reference_active_record_migrations.rb
|
86
155
|
- lib/rubocop/cop/discourse/no_chdir.rb
|
87
156
|
- lib/rubocop/cop/discourse/no_direct_multisite_manipulation.rb
|
@@ -93,19 +162,46 @@ files:
|
|
93
162
|
- lib/rubocop/cop/discourse/no_time_new_without_args.rb
|
94
163
|
- lib/rubocop/cop/discourse/no_uri_escape_encode.rb
|
95
164
|
- lib/rubocop/cop/discourse/only_top_level_multisite_specs.rb
|
165
|
+
- lib/rubocop/cop/discourse/plugins/call_requires_plugin.rb
|
166
|
+
- lib/rubocop/cop/discourse/plugins/namespace_constants.rb
|
167
|
+
- lib/rubocop/cop/discourse/plugins/namespace_methods.rb
|
168
|
+
- lib/rubocop/cop/discourse/plugins/no_monkey_patching.rb
|
169
|
+
- lib/rubocop/cop/discourse/plugins/use_plugin_instance_on.rb
|
170
|
+
- lib/rubocop/cop/discourse/plugins/use_require_relative.rb
|
171
|
+
- lib/rubocop/cop/discourse/services/empty_lines_around_blocks.rb
|
172
|
+
- lib/rubocop/cop/discourse/services/group_keywords.rb
|
96
173
|
- lib/rubocop/cop/discourse/time_eq_matcher.rb
|
97
174
|
- lib/rubocop/cop/discourse_cops.rb
|
98
175
|
- lib/rubocop/discourse.rb
|
99
176
|
- lib/rubocop/discourse/inject.rb
|
177
|
+
- rubocop-capybara.yml
|
100
178
|
- rubocop-core.yml
|
101
179
|
- rubocop-discourse.gemspec
|
180
|
+
- rubocop-factory_bot.yml
|
102
181
|
- rubocop-layout.yml
|
182
|
+
- rubocop-rails.yml
|
103
183
|
- rubocop-rspec.yml
|
184
|
+
- spec/fixtures/controllers/bad_controller.rb
|
185
|
+
- spec/fixtures/controllers/base_controller.rb
|
186
|
+
- spec/fixtures/controllers/good_controller.rb
|
187
|
+
- spec/fixtures/controllers/inherit_from_outside_controller.rb
|
188
|
+
- spec/fixtures/controllers/namespaced_parent_controller.rb
|
189
|
+
- spec/fixtures/controllers/no_requires_plugin_controller.rb
|
190
|
+
- spec/fixtures/controllers/requires_plugin_controller.rb
|
191
|
+
- spec/lib/rubocop/cop/discourse/services/empty_lines_around_blocks_spec.rb
|
192
|
+
- spec/lib/rubocop/cop/discourse/services/group_keywords_spec.rb
|
193
|
+
- spec/lib/rubocop/cop/fabricator_shorthand_spec.rb
|
104
194
|
- spec/lib/rubocop/cop/no_add_reference_active_record_migrations_spec.rb
|
105
195
|
- spec/lib/rubocop/cop/no_mixing_multisite_and_standard_specs_spec.rb
|
106
196
|
- spec/lib/rubocop/cop/no_mocking_jobs_enqueue_spec.rb
|
107
197
|
- spec/lib/rubocop/cop/no_reset_column_information_migrations_spec.rb
|
108
198
|
- spec/lib/rubocop/cop/only_top_level_multisite_specs_spec.rb
|
199
|
+
- spec/lib/rubocop/cop/plugins/call_requires_plugin_spec.rb
|
200
|
+
- spec/lib/rubocop/cop/plugins/namespace_constants_spec.rb
|
201
|
+
- spec/lib/rubocop/cop/plugins/namespace_methods_spec.rb
|
202
|
+
- spec/lib/rubocop/cop/plugins/no_monkey_patching_spec.rb
|
203
|
+
- spec/lib/rubocop/cop/plugins/use_plugin_instance_on_spec.rb
|
204
|
+
- spec/lib/rubocop/cop/plugins/use_require_relative_spec.rb
|
109
205
|
- spec/lib/rubocop/cop/time_eq_matcher_spec.rb
|
110
206
|
- spec/spec_helper.rb
|
111
207
|
- stree-compat.yml
|
@@ -113,7 +209,6 @@ homepage: https://github.com/discourse/rubocop-discourse
|
|
113
209
|
licenses:
|
114
210
|
- MIT
|
115
211
|
metadata: {}
|
116
|
-
post_install_message:
|
117
212
|
rdoc_options: []
|
118
213
|
require_paths:
|
119
214
|
- lib
|
@@ -128,8 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
223
|
- !ruby/object:Gem::Version
|
129
224
|
version: '0'
|
130
225
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
132
|
-
signing_key:
|
226
|
+
rubygems_version: 3.6.2
|
133
227
|
specification_version: 4
|
134
228
|
summary: Custom rubocop cops used by Discourse
|
135
229
|
test_files: []
|