thredded-workgroup 0.2.1 → 0.3.0
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/.rubocop.yml +13 -4
- data/.rubocop_todo.yml +270 -48
- data/.travis.yml +20 -28
- data/CHANGELOG.md +7 -0
- data/Guardfile +1 -1
- data/RELEASE_CHECKLIST.md +1 -2
- data/Rakefile +4 -0
- data/app/controllers/concerns/thredded/workgroup/all_unread_followed_topics.rb +5 -1
- data/app/controllers/thredded/posts_controller.rb +2 -2
- data/app/views/thredded/workgroup/topics/_topics_with_last_post.html.erb +1 -1
- data/bin/update_from_thredded +1 -1
- data/lib/thredded/workgroup/version.rb +1 -1
- data/shared.gemfile +23 -20
- data/thredded-workgroup.gemspec +11 -11
- metadata +43 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd3f561fa2d3875a1567bb8fb18e7eef3eea9b0f0ddda253e24519b81f18a0e0
|
4
|
+
data.tar.gz: a4146790adbf4bb887e060bcf57ada5ec298fea625b1b5ca0d39339237f8b30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd55e69e51a3096cf2cf141f5bfe4a0d96a9c8f900a48ff7f7d820500838b64567b533aa1ef1b0f6776c8c4a35cff2e2bcbcd10bd2c3569c9a85fad6bac42eb
|
7
|
+
data.tar.gz: 10d829b326e7171f34a033e126796143dd1469e336e850e088d7feeea585940e08be3aae53b1868c82fdba08331e8d33d25752a4992f34f01e7a1e283010d7f0
|
data/.rubocop.yml
CHANGED
@@ -1,10 +1,19 @@
|
|
1
|
-
inherit_from:
|
2
|
-
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-performance
|
5
|
+
- rubocop-rails
|
6
|
+
- rubocop-rspec
|
7
|
+
|
3
8
|
AllCops:
|
4
|
-
TargetRubyVersion: 2.
|
9
|
+
TargetRubyVersion: 2.6
|
5
10
|
Exclude:
|
6
11
|
- 'spec/dummy/db/**/*'
|
7
12
|
- 'vendor/**/*'
|
13
|
+
DisplayCopNames: true
|
14
|
+
NewCops: enable
|
15
|
+
CacheRootDirectory: tmp # ie. tmp/rubocop_cache
|
16
|
+
UseCache: true
|
8
17
|
|
9
18
|
Metrics/AbcSize:
|
10
19
|
Enabled: false
|
@@ -15,7 +24,7 @@ Metrics/ClassLength:
|
|
15
24
|
Metrics/BlockLength:
|
16
25
|
Exclude:
|
17
26
|
- 'spec/factories/*'
|
18
|
-
|
27
|
+
Layout/LineLength:
|
19
28
|
Max: 120
|
20
29
|
|
21
30
|
Metrics/MethodLength:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,40 +1,95 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2022-02-26 17:50:27 UTC using RuboCop version 1.25.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 1
|
10
10
|
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters:
|
11
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
12
12
|
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
13
13
|
Bundler/OrderedGems:
|
14
14
|
Exclude:
|
15
15
|
- 'shared.gemfile'
|
16
16
|
|
17
|
-
# Offense count:
|
17
|
+
# Offense count: 7
|
18
18
|
# Cop supports --auto-correct.
|
19
|
-
# Configuration parameters:
|
19
|
+
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
|
20
20
|
# Include: **/*.gemspec
|
21
21
|
Gemspec/OrderedDependencies:
|
22
22
|
Exclude:
|
23
23
|
- 'thredded-workgroup.gemspec'
|
24
24
|
|
25
|
-
# Offense count:
|
25
|
+
# Offense count: 1
|
26
|
+
# Cop supports --auto-correct.
|
27
|
+
# Configuration parameters: Include.
|
28
|
+
# Include: **/*.gemspec
|
29
|
+
Gemspec/RequireMFA:
|
30
|
+
Exclude:
|
31
|
+
- 'thredded-workgroup.gemspec'
|
32
|
+
|
33
|
+
# Offense count: 1
|
34
|
+
# Configuration parameters: Include.
|
35
|
+
# Include: **/*.gemspec
|
36
|
+
Gemspec/RequiredRubyVersion:
|
37
|
+
Exclude:
|
38
|
+
- 'thredded-workgroup.gemspec'
|
39
|
+
|
40
|
+
# Offense count: 6
|
26
41
|
# Cop supports --auto-correct.
|
27
42
|
Layout/EmptyLineAfterGuardClause:
|
28
43
|
Exclude:
|
44
|
+
- 'app/controllers/thredded/application_controller.rb'
|
29
45
|
- 'spec/dummy/app/controllers/application_controller.rb'
|
30
46
|
- 'spec/dummy/app/controllers/concerns/store_location_fullpath.rb'
|
31
|
-
- 'spec/
|
47
|
+
- 'spec/dummy/app/controllers/sessions_controller.rb'
|
48
|
+
- 'spec/support/system/fake_content.rb'
|
32
49
|
|
33
50
|
# Offense count: 1
|
34
51
|
# Cop supports --auto-correct.
|
35
|
-
|
52
|
+
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
53
|
+
Layout/EmptyLineBetweenDefs:
|
36
54
|
Exclude:
|
37
|
-
- '
|
55
|
+
- 'app/controllers/thredded/application_controller.rb'
|
56
|
+
|
57
|
+
# Offense count: 1
|
58
|
+
# Cop supports --auto-correct.
|
59
|
+
Layout/EmptyLines:
|
60
|
+
Exclude:
|
61
|
+
- 'Rakefile'
|
62
|
+
|
63
|
+
# Offense count: 1
|
64
|
+
# Cop supports --auto-correct.
|
65
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
|
66
|
+
# SupportedStyles: space, no_space
|
67
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
68
|
+
Layout/SpaceBeforeBlockBraces:
|
69
|
+
Exclude:
|
70
|
+
- 'spec/system/user_marks_topic_as_read_spec.rb'
|
71
|
+
|
72
|
+
# Offense count: 2
|
73
|
+
# Cop supports --auto-correct.
|
74
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
75
|
+
# SupportedStyles: space, no_space
|
76
|
+
# SupportedStylesForEmptyBraces: space, no_space
|
77
|
+
Layout/SpaceInsideBlockBraces:
|
78
|
+
Exclude:
|
79
|
+
- 'spec/system/user_marks_topic_as_read_spec.rb'
|
80
|
+
|
81
|
+
# Offense count: 2
|
82
|
+
# Cop supports --auto-correct.
|
83
|
+
Lint/AmbiguousOperatorPrecedence:
|
84
|
+
Exclude:
|
85
|
+
- 'spec/factories/thredded.rb'
|
86
|
+
|
87
|
+
# Offense count: 2
|
88
|
+
# Configuration parameters: AllowedMethods.
|
89
|
+
# AllowedMethods: enums
|
90
|
+
Lint/ConstantDefinitionInBlock:
|
91
|
+
Exclude:
|
92
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
38
93
|
|
39
94
|
# Offense count: 1
|
40
95
|
# Configuration parameters: MaximumRangeSize.
|
@@ -42,17 +97,155 @@ Lint/MissingCopEnableDirective:
|
|
42
97
|
Exclude:
|
43
98
|
- 'thredded-workgroup.gemspec'
|
44
99
|
|
100
|
+
# Offense count: 1
|
101
|
+
# Cop supports --auto-correct-all.
|
102
|
+
Lint/NonDeterministicRequireOrder:
|
103
|
+
Exclude:
|
104
|
+
- 'spec/spec_helper.rb'
|
105
|
+
|
45
106
|
# Offense count: 1
|
46
107
|
# Cop supports --auto-correct.
|
47
|
-
Lint/
|
108
|
+
Lint/RedundantCopDisableDirective:
|
48
109
|
Exclude:
|
49
110
|
- 'thredded-workgroup.gemspec'
|
50
111
|
|
112
|
+
# Offense count: 1
|
113
|
+
# Cop supports --auto-correct.
|
114
|
+
Lint/SendWithMixinArgument:
|
115
|
+
Exclude:
|
116
|
+
- 'lib/thredded/workgroup/route_delegator.rb'
|
117
|
+
|
51
118
|
# Offense count: 11
|
52
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
53
|
-
#
|
119
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
120
|
+
# IgnoredMethods: refine
|
54
121
|
Metrics/BlockLength:
|
55
|
-
Max:
|
122
|
+
Max: 126
|
123
|
+
|
124
|
+
# Offense count: 1
|
125
|
+
# Configuration parameters: MinSize.
|
126
|
+
Performance/CollectionLiteralInLoop:
|
127
|
+
Exclude:
|
128
|
+
- 'spec/support/system/fake_content.rb'
|
129
|
+
|
130
|
+
# Offense count: 1
|
131
|
+
# Cop supports --auto-correct.
|
132
|
+
Performance/RegexpMatch:
|
133
|
+
Exclude:
|
134
|
+
- 'Rakefile'
|
135
|
+
|
136
|
+
# Offense count: 4
|
137
|
+
# Cop supports --auto-correct.
|
138
|
+
RSpec/Capybara/CurrentPathExpectation:
|
139
|
+
Exclude:
|
140
|
+
- 'spec/system/user_adds_post_and_is_redirected_spec.rb'
|
141
|
+
- 'spec/system/user_marks_post_as_unread_spec.rb'
|
142
|
+
|
143
|
+
# Offense count: 7
|
144
|
+
# Configuration parameters: Prefixes.
|
145
|
+
# Prefixes: when, with, without
|
146
|
+
RSpec/ContextWording:
|
147
|
+
Exclude:
|
148
|
+
- 'spec/controllers/thredded/topics_controller_spec.rb'
|
149
|
+
- 'spec/system/views_navs_spec.rb'
|
150
|
+
|
151
|
+
# Offense count: 1
|
152
|
+
# Cop supports --auto-correct.
|
153
|
+
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
154
|
+
# SupportedStyles: described_class, explicit
|
155
|
+
RSpec/DescribedClass:
|
156
|
+
Exclude:
|
157
|
+
- 'spec/view_models/topic_view_spec.rb'
|
158
|
+
|
159
|
+
# Offense count: 5
|
160
|
+
# Cop supports --auto-correct.
|
161
|
+
# Configuration parameters: AllowConsecutiveOneLiners.
|
162
|
+
RSpec/EmptyLineAfterExample:
|
163
|
+
Exclude:
|
164
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
165
|
+
- 'spec/system/views_navs_spec.rb'
|
166
|
+
|
167
|
+
# Offense count: 8
|
168
|
+
# Cop supports --auto-correct.
|
169
|
+
RSpec/EmptyLineAfterFinalLet:
|
170
|
+
Exclude:
|
171
|
+
- 'spec/controllers/thredded/topics_controller_spec.rb'
|
172
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
173
|
+
- 'spec/system/main_app_pages_spec.rb'
|
174
|
+
- 'spec/system/user_clicks_to_follow_unfollow_topic_spec.rb'
|
175
|
+
- 'spec/system/views_navs_spec.rb'
|
176
|
+
- 'spec/view_models/topic_view_spec.rb'
|
177
|
+
|
178
|
+
# Offense count: 7
|
179
|
+
# Cop supports --auto-correct.
|
180
|
+
RSpec/EmptyLineAfterHook:
|
181
|
+
Exclude:
|
182
|
+
- 'spec/system/main_app_pages_spec.rb'
|
183
|
+
- 'spec/system/user_clicks_to_follow_unfollow_topic_spec.rb'
|
184
|
+
- 'spec/system/views_navs_spec.rb'
|
185
|
+
- 'spec/view_models/topic_view_spec.rb'
|
186
|
+
|
187
|
+
# Offense count: 10
|
188
|
+
# Configuration parameters: CountAsOne.
|
189
|
+
RSpec/ExampleLength:
|
190
|
+
Max: 9
|
191
|
+
|
192
|
+
# Offense count: 18
|
193
|
+
# Cop supports --auto-correct.
|
194
|
+
# Configuration parameters: Include.
|
195
|
+
# Include: spec/factories.rb, spec/factories/**/*.rb, features/support/factories/**/*.rb
|
196
|
+
RSpec/FactoryBot/FactoryClassName:
|
197
|
+
Exclude:
|
198
|
+
- 'spec/factories/thredded.rb'
|
199
|
+
|
200
|
+
# Offense count: 1
|
201
|
+
# Cop supports --auto-correct.
|
202
|
+
# Configuration parameters: EnforcedStyle.
|
203
|
+
# SupportedStyles: implicit, each, example
|
204
|
+
RSpec/HookArgument:
|
205
|
+
Exclude:
|
206
|
+
- 'spec/spec_helper.rb'
|
207
|
+
|
208
|
+
# Offense count: 2
|
209
|
+
RSpec/LeakyConstantDeclaration:
|
210
|
+
Exclude:
|
211
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
212
|
+
|
213
|
+
# Offense count: 7
|
214
|
+
RSpec/LetSetup:
|
215
|
+
Exclude:
|
216
|
+
- 'spec/controllers/thredded/topics_controller_spec.rb'
|
217
|
+
- 'spec/system/user_adds_post_and_is_redirected_spec.rb'
|
218
|
+
- 'spec/system/user_clicks_to_follow_unfollow_topic_spec.rb'
|
219
|
+
- 'spec/system/views_navs_spec.rb'
|
220
|
+
|
221
|
+
# Offense count: 1
|
222
|
+
# Configuration parameters: .
|
223
|
+
# SupportedStyles: have_received, receive
|
224
|
+
RSpec/MessageSpies:
|
225
|
+
EnforcedStyle: receive
|
226
|
+
|
227
|
+
# Offense count: 11
|
228
|
+
RSpec/MultipleExpectations:
|
229
|
+
Max: 4
|
230
|
+
|
231
|
+
# Offense count: 12
|
232
|
+
# Configuration parameters: AllowSubject.
|
233
|
+
RSpec/MultipleMemoizedHelpers:
|
234
|
+
Max: 8
|
235
|
+
|
236
|
+
# Offense count: 2
|
237
|
+
# Configuration parameters: IgnoreSharedExamples.
|
238
|
+
RSpec/NamedSubject:
|
239
|
+
Exclude:
|
240
|
+
- 'spec/view_models/topic_view_spec.rb'
|
241
|
+
|
242
|
+
# Offense count: 6
|
243
|
+
# Cop supports --auto-correct.
|
244
|
+
RSpec/ScatteredLet:
|
245
|
+
Exclude:
|
246
|
+
- 'spec/system/user_adds_post_and_is_redirected_spec.rb'
|
247
|
+
- 'spec/system/user_clicks_to_follow_unfollow_topic_spec.rb'
|
248
|
+
- 'spec/system/views_navs_spec.rb'
|
56
249
|
|
57
250
|
# Offense count: 1
|
58
251
|
# Cop supports --auto-correct.
|
@@ -67,6 +260,13 @@ Rails/FilePath:
|
|
67
260
|
Exclude:
|
68
261
|
- 'spec/spec_helper.rb'
|
69
262
|
|
263
|
+
# Offense count: 2
|
264
|
+
# Configuration parameters: Include.
|
265
|
+
# Include: spec/**/*.rb, test/**/*.rb
|
266
|
+
Rails/I18nLocaleAssignment:
|
267
|
+
Exclude:
|
268
|
+
- 'spec/dummy/app/controllers/concerns/set_locale.rb'
|
269
|
+
|
70
270
|
# Offense count: 1
|
71
271
|
# Configuration parameters: Include.
|
72
272
|
# Include: app/controllers/**/*.rb
|
@@ -74,6 +274,26 @@ Rails/LexicallyScopedActionFilter:
|
|
74
274
|
Exclude:
|
75
275
|
- 'app/controllers/thredded/workgroup/navs_controller.rb'
|
76
276
|
|
277
|
+
# Offense count: 4
|
278
|
+
# Cop supports --auto-correct-all.
|
279
|
+
# Configuration parameters: Include.
|
280
|
+
# Include: **/Rakefile, **/*.rake
|
281
|
+
Rails/RakeEnvironment:
|
282
|
+
Exclude:
|
283
|
+
- 'Rakefile'
|
284
|
+
|
285
|
+
# Offense count: 1
|
286
|
+
# Configuration parameters: Include.
|
287
|
+
# Include: spec/**/*.rb, test/**/*.rb
|
288
|
+
Rails/TimeZoneAssignment:
|
289
|
+
Exclude:
|
290
|
+
- 'spec/spec_helper.rb'
|
291
|
+
|
292
|
+
# Offense count: 1
|
293
|
+
Style/CombinableLoops:
|
294
|
+
Exclude:
|
295
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
296
|
+
|
77
297
|
# Offense count: 1
|
78
298
|
# Cop supports --auto-correct.
|
79
299
|
# Configuration parameters: EnforcedStyle.
|
@@ -88,59 +308,66 @@ Style/Encoding:
|
|
88
308
|
Exclude:
|
89
309
|
- 'thredded-workgroup.gemspec'
|
90
310
|
|
91
|
-
# Offense count:
|
311
|
+
# Offense count: 8
|
92
312
|
# Cop supports --auto-correct.
|
93
313
|
Style/ExpandPathArguments:
|
94
314
|
Exclude:
|
95
315
|
- 'Rakefile'
|
96
316
|
- 'bin/rails.rb'
|
97
|
-
- 'spec/
|
98
|
-
- 'spec/gemfiles/rails_5_1.gemfile'
|
317
|
+
- 'spec/dummy/config.ru'
|
99
318
|
- 'spec/gemfiles/rails_5_2.gemfile'
|
100
319
|
- 'spec/spec_helper.rb'
|
101
320
|
- 'thredded-workgroup.gemspec'
|
102
321
|
|
103
|
-
# Offense count:
|
322
|
+
# Offense count: 1
|
104
323
|
# Cop supports --auto-correct.
|
105
|
-
|
106
|
-
# SupportedStyles: when_needed, always, never
|
107
|
-
Style/FrozenStringLiteralComment:
|
324
|
+
Style/GlobalStdStream:
|
108
325
|
Exclude:
|
109
|
-
- '
|
110
|
-
- 'spec/gemfiles/rails_5_0.gemfile'
|
111
|
-
- 'spec/gemfiles/rails_5_1.gemfile'
|
112
|
-
- 'spec/gemfiles/rails_5_2.gemfile'
|
326
|
+
- 'spec/dummy/config/environments/production.rb'
|
113
327
|
|
114
|
-
# Offense count:
|
328
|
+
# Offense count: 1
|
115
329
|
# Cop supports --auto-correct.
|
116
330
|
Style/IfUnlessModifier:
|
117
331
|
Exclude:
|
118
|
-
- 'spec/
|
119
|
-
|
332
|
+
- 'spec/system/user_clicks_to_follow_unfollow_topic_spec.rb'
|
333
|
+
|
334
|
+
# Offense count: 1
|
335
|
+
Style/OpenStructUse:
|
336
|
+
Exclude:
|
337
|
+
- 'spec/factories/thredded.rb'
|
120
338
|
|
121
|
-
# Offense count:
|
339
|
+
# Offense count: 4
|
122
340
|
# Cop supports --auto-correct.
|
123
341
|
# Configuration parameters: PreferredDelimiters.
|
124
342
|
Style/PercentLiteralDelimiters:
|
125
343
|
Exclude:
|
126
|
-
- 'Guardfile'
|
127
344
|
- 'Rakefile'
|
128
345
|
- 'lib/thredded/workgroup/engine.rb'
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
346
|
+
|
347
|
+
# Offense count: 2
|
348
|
+
# Cop supports --auto-correct-all.
|
349
|
+
# Configuration parameters: Methods.
|
350
|
+
Style/RedundantArgument:
|
351
|
+
Exclude:
|
352
|
+
- 'spec/lib/thredded/all_view_hooks_spec.rb'
|
353
|
+
- 'spec/support/system/fake_content.rb'
|
354
|
+
|
355
|
+
# Offense count: 2
|
356
|
+
# Cop supports --auto-correct.
|
357
|
+
Style/RedundantBegin:
|
358
|
+
Exclude:
|
359
|
+
- 'Rakefile'
|
360
|
+
- 'spec/dummy/bin/yarn'
|
361
|
+
|
135
362
|
|
136
363
|
# Offense count: 2
|
137
364
|
# Cop supports --auto-correct.
|
138
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil,
|
139
|
-
#
|
365
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
366
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
140
367
|
Style/SafeNavigation:
|
141
368
|
Exclude:
|
142
369
|
- 'Rakefile'
|
143
|
-
- 'spec/
|
370
|
+
- 'spec/system/user_adds_post_and_is_redirected_spec.rb'
|
144
371
|
|
145
372
|
# Offense count: 3
|
146
373
|
# Cop supports --auto-correct.
|
@@ -148,17 +375,12 @@ Style/StderrPuts:
|
|
148
375
|
Exclude:
|
149
376
|
- 'Rakefile'
|
150
377
|
|
151
|
-
# Offense count:
|
152
|
-
# Cop supports --auto-correct.
|
153
|
-
# Configuration parameters:
|
154
|
-
|
155
|
-
Style/StringLiterals:
|
378
|
+
# Offense count: 2
|
379
|
+
# Cop supports --auto-correct-all.
|
380
|
+
# Configuration parameters: Mode.
|
381
|
+
Style/StringConcatenation:
|
156
382
|
Exclude:
|
157
|
-
- '
|
158
|
-
- 'spec/gemfiles/rails_5_0.gemfile'
|
159
|
-
- 'spec/gemfiles/rails_5_1.gemfile'
|
160
|
-
- 'spec/gemfiles/rails_5_2.gemfile'
|
161
|
-
- 'thredded-workgroup.gemspec'
|
383
|
+
- 'spec/support/system/fake_content.rb'
|
162
384
|
|
163
385
|
# Offense count: 3
|
164
386
|
# Cop supports --auto-correct.
|
data/.travis.yml
CHANGED
@@ -1,45 +1,37 @@
|
|
1
|
-
|
2
|
-
sudo: required
|
3
|
-
dist: trusty
|
4
|
-
|
5
|
-
addons:
|
6
|
-
apt:
|
7
|
-
sources:
|
8
|
-
- ubuntu-sdk-team
|
9
|
-
packages:
|
10
|
-
- libqt5webkit5-dev
|
11
|
-
- qtdeclarative5-dev
|
1
|
+
dist: bionic
|
12
2
|
|
13
3
|
language: ruby
|
14
4
|
rvm:
|
15
|
-
- 2.
|
5
|
+
- 2.6
|
16
6
|
cache: bundler
|
17
7
|
bundler_args: --path ../../vendor/bundle --without debug
|
18
8
|
gemfile:
|
19
|
-
- spec/gemfiles/rails_5_0.gemfile
|
20
|
-
- spec/gemfiles/rails_5_1.gemfile
|
21
9
|
- spec/gemfiles/rails_5_2.gemfile
|
22
10
|
|
23
|
-
|
24
|
-
global:
|
25
|
-
- QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
|
26
|
-
matrix:
|
27
|
-
# Username and password from http://docs.travis-ci.com/user/database-setup/
|
28
|
-
- DB=sqlite3 DBC_VERBOSE=true
|
29
|
-
# - DB=mysql2 DB_USERNAME=root DB_PASSWORD=""
|
30
|
-
- DB=postgresql DB_USERNAME=postgres DB_PASSWORD=""
|
31
|
-
|
32
|
-
matrix:
|
11
|
+
jobs:
|
33
12
|
fast_finish: true
|
34
13
|
allow_failures:
|
35
14
|
- env: DB=sqlite3 DBC_VERBOSE=true
|
15
|
+
include:
|
16
|
+
- name: audit
|
17
|
+
gemfile: spec/gemfiles/rails_5_2.gemfile
|
18
|
+
before_script: ""
|
19
|
+
script:
|
20
|
+
- bundle show rubocop
|
21
|
+
- bundle exec rubocop
|
22
|
+
- cp $BUNDLE_GEMFILE Gemfile.lock
|
23
|
+
- bundle exec bundle-audit check --update -v
|
24
|
+
- gemfile: spec/gemfiles/rails_5_2.gemfile
|
25
|
+
rvm: 2.6
|
26
|
+
env: DB=postgresql DB_USERNAME=postgres DB_PASSWORD=""
|
27
|
+
services: postgresql
|
28
|
+
- gemfile: spec/gemfiles/rails_5_2.gemfile
|
29
|
+
rvm: 2.6
|
30
|
+
env: DB=sqlite3 DBC_VERBOSE=true
|
31
|
+
|
36
32
|
|
37
33
|
before_script:
|
38
34
|
- RAILS_ENV=test bundle exec rake db:create db:migrate
|
39
35
|
|
40
36
|
script:
|
41
37
|
- xvfb-run bundle exec rspec
|
42
|
-
- bundle show rubocop
|
43
|
-
- bundle exec rubocop
|
44
|
-
- cp $BUNDLE_GEMFILE Gemfile.lock
|
45
|
-
- bundle exec bundle-audit check --update -v
|
data/CHANGELOG.md
CHANGED
data/Guardfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# More info at https://github.com/guard/guard#readme
|
4
4
|
|
5
5
|
## Uncomment and set this to only include directories you want to watch
|
6
|
-
# directories %w(app lib config test spec
|
6
|
+
# directories %w(app lib config test spec system) \
|
7
7
|
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
8
8
|
|
9
9
|
## Note: if you are using the `directories` clause above and you are not
|
data/RELEASE_CHECKLIST.md
CHANGED
@@ -2,7 +2,6 @@ The checklist for releasing a new version of Thredded.
|
|
2
2
|
|
3
3
|
Pre-requisites for the releaser:
|
4
4
|
|
5
|
-
* The [gem-release gem](https://github.com/svenfuchs/gem-release): `gem install gem-release`.
|
6
5
|
* Push access to RubyGems.
|
7
6
|
|
8
7
|
Release checklist:
|
@@ -14,6 +13,6 @@ Release checklist:
|
|
14
13
|
- [ ] Tag the release and push it to rubygems:
|
15
14
|
|
16
15
|
```bash
|
17
|
-
|
16
|
+
rake release
|
18
17
|
```
|
19
18
|
- [ ] Copy the release notes from the changelog to [GitHub Releases](https://github.com/thredded/thredded/releases).
|
data/Rakefile
CHANGED
@@ -5,7 +5,11 @@ module Thredded
|
|
5
5
|
module AllUnreadFollowedTopics
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
included do
|
8
|
-
|
8
|
+
if defined?(Pundit::Authorization)
|
9
|
+
include Pundit::Authorization
|
10
|
+
else
|
11
|
+
include Pundit
|
12
|
+
end
|
9
13
|
helper_method :all_unread_followed_topics_count
|
10
14
|
end
|
11
15
|
|
@@ -10,11 +10,11 @@ module Thredded
|
|
10
10
|
)
|
11
11
|
authorize_creating @post_form.post
|
12
12
|
|
13
|
-
if @post_form.save
|
13
|
+
if @post_form.save
|
14
14
|
# TODO: extract as a hook on thredded#posts_controller `after_create(post)`
|
15
15
|
redirect_after_create(@post_form.post)
|
16
16
|
else
|
17
|
-
|
17
|
+
render :new
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= render @topics, show_messageboard: !messageboard_or_nil %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<%=
|
8
|
+
<%= button_to t("thredded.nav.mark_all_read"),
|
9
9
|
mark_all_topics_read_path,
|
10
10
|
class: 'thredded--button thredded--button-light thredded--button-wide',
|
11
11
|
method: :put -%>
|
data/bin/update_from_thredded
CHANGED
@@ -20,7 +20,7 @@ rm -fR ./spec/dummy/
|
|
20
20
|
cp -pR $(bundle show thredded)/spec/dummy ./spec/dummy
|
21
21
|
|
22
22
|
# update some standard helpful files
|
23
|
-
cp $(bundle show thredded)/spec/support/
|
23
|
+
cp $(bundle show thredded)/spec/support/system/fake_content.rb spec/support/system/fake_content.rb
|
24
24
|
cp $(bundle show thredded)/spec/lib/thredded/all_view_hooks_spec.rb spec/lib/thredded/all_view_hooks_spec.rb
|
25
25
|
|
26
26
|
# restore thredded-workgroup config, emoji
|
data/shared.gemfile
CHANGED
@@ -1,31 +1,34 @@
|
|
1
|
-
|
2
|
-
gem 'test_after_commit', group: :test #only enabled on rails v4
|
3
|
-
gem 'thredded', github: 'thredded/thredded', branch: 'master'
|
1
|
+
# frozen_string_literal: true
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
gem "rake"
|
4
|
+
gem "thredded", github: "thredded/thredded", branch: "master"
|
5
|
+
|
6
|
+
unless ENV["TRAVIS"]
|
8
7
|
group :development do
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
end
|
14
|
-
group :development, :test do
|
15
|
-
gem "capybara-webkit", '1.15.1'
|
8
|
+
gem "guard"
|
9
|
+
gem "guard-rails"
|
10
|
+
gem "guard-livereload"
|
11
|
+
gem "rack-livereload"
|
16
12
|
end
|
17
13
|
end
|
18
14
|
|
19
|
-
|
15
|
+
group :development, :test do
|
16
|
+
gem "webdrivers", require: false
|
17
|
+
end
|
18
|
+
group :test do
|
19
|
+
gem "selenium-webdriver", require: false
|
20
|
+
end
|
21
|
+
|
22
|
+
gem "sassc", ">= 1.12.1"
|
20
23
|
|
21
24
|
group :debug do
|
22
|
-
gem
|
23
|
-
gem
|
24
|
-
gem
|
25
|
+
gem "derailed"
|
26
|
+
gem "pry-rails"
|
27
|
+
gem "rack-mini-profiler"
|
25
28
|
|
26
29
|
platform :mri do
|
27
|
-
gem
|
28
|
-
gem
|
29
|
-
gem
|
30
|
+
gem "byebug"
|
31
|
+
gem "flamegraph"
|
32
|
+
gem "stackprof"
|
30
33
|
end
|
31
34
|
end
|
data/thredded-workgroup.gemspec
CHANGED
@@ -16,29 +16,29 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.description = "Write a longer description or delete this line."
|
17
17
|
s.homepage = "https://github.com/red56/thredded-workgroup."
|
18
18
|
s.license = "MIT"
|
19
|
-
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|
|
19
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|system)/}) }
|
20
20
|
s.bindir = "exe"
|
21
21
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
s.require_paths = ["lib"]
|
23
23
|
|
24
24
|
# needs thredded, you can specify a specific fork or version (in **your** gemfile) if you need to!
|
25
|
-
s.add_dependency "thredded", "
|
25
|
+
s.add_dependency "thredded", ">= 0.16.1"
|
26
26
|
|
27
27
|
# bundler added dependencies
|
28
|
-
s.add_development_dependency "bundler"
|
29
|
-
s.add_development_dependency "rake"
|
30
|
-
s.add_development_dependency "rspec"
|
28
|
+
s.add_development_dependency "bundler"
|
29
|
+
s.add_development_dependency "rake"
|
30
|
+
s.add_development_dependency "rspec"
|
31
31
|
|
32
32
|
# test dependencies
|
33
|
-
s.add_development_dependency "capybara"
|
34
|
-
s.add_development_dependency "capybara-webkit"
|
35
|
-
s.add_development_dependency "database_cleaner"
|
33
|
+
s.add_development_dependency "capybara"
|
36
34
|
s.add_development_dependency "factory_bot_rails"
|
37
35
|
s.add_development_dependency "faker", ">= 1.6.2"
|
38
36
|
s.add_development_dependency "launchy"
|
39
37
|
s.add_development_dependency "rspec-rails", ">= 3.5.0"
|
40
|
-
s.add_development_dependency "rubocop",
|
41
|
-
s.add_development_dependency "
|
38
|
+
s.add_development_dependency "rubocop", "= 1.25.1"
|
39
|
+
s.add_development_dependency "rubocop-rails", "= 2.13.2"
|
40
|
+
s.add_development_dependency "rubocop-rspec", "= 2.8.0"
|
41
|
+
s.add_development_dependency "rubocop-performance", "= 1.13.2"
|
42
42
|
s.add_development_dependency "bundle-audit"
|
43
43
|
|
44
44
|
# dummy app dependencies
|
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
|
|
52
52
|
s.add_development_dependency "rails_email_preview", ">= 2.0.1"
|
53
53
|
s.add_development_dependency "roadie-rails"
|
54
54
|
s.add_development_dependency "i18n-tasks"
|
55
|
-
s.add_development_dependency
|
55
|
+
s.add_development_dependency "twemoji"
|
56
56
|
s.add_development_dependency "web-console"
|
57
57
|
s.add_development_dependency "jquery-rails"
|
58
58
|
|
metadata
CHANGED
@@ -1,22 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thredded-workgroup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Diggins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thredded
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.16'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: 0.16.1
|
@@ -24,9 +21,6 @@ dependencies:
|
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.16'
|
30
24
|
- - ">="
|
31
25
|
- !ruby/object:Gem::Version
|
32
26
|
version: 0.16.1
|
@@ -34,60 +28,60 @@ dependencies:
|
|
34
28
|
name: bundler
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
31
|
+
- - ">="
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
33
|
+
version: '0'
|
40
34
|
type: :development
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- - "
|
38
|
+
- - ">="
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
40
|
+
version: '0'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rake
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
47
|
+
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
58
52
|
- - ">="
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
54
|
+
version: '0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: rspec
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
|
-
- - "
|
59
|
+
- - ">="
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
61
|
+
version: '0'
|
68
62
|
type: :development
|
69
63
|
prerelease: false
|
70
64
|
version_requirements: !ruby/object:Gem::Requirement
|
71
65
|
requirements:
|
72
|
-
- - "
|
66
|
+
- - ">="
|
73
67
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
68
|
+
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
70
|
name: capybara
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
|
-
- - "
|
73
|
+
- - ">="
|
80
74
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
75
|
+
version: '0'
|
82
76
|
type: :development
|
83
77
|
prerelease: false
|
84
78
|
version_requirements: !ruby/object:Gem::Requirement
|
85
79
|
requirements:
|
86
|
-
- - "
|
80
|
+
- - ">="
|
87
81
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
82
|
+
version: '0'
|
89
83
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
84
|
+
name: factory_bot_rails
|
91
85
|
requirement: !ruby/object:Gem::Requirement
|
92
86
|
requirements:
|
93
87
|
- - ">="
|
@@ -101,21 +95,21 @@ dependencies:
|
|
101
95
|
- !ruby/object:Gem::Version
|
102
96
|
version: '0'
|
103
97
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
98
|
+
name: faker
|
105
99
|
requirement: !ruby/object:Gem::Requirement
|
106
100
|
requirements:
|
107
101
|
- - ">="
|
108
102
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
103
|
+
version: 1.6.2
|
110
104
|
type: :development
|
111
105
|
prerelease: false
|
112
106
|
version_requirements: !ruby/object:Gem::Requirement
|
113
107
|
requirements:
|
114
108
|
- - ">="
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
110
|
+
version: 1.6.2
|
117
111
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
112
|
+
name: launchy
|
119
113
|
requirement: !ruby/object:Gem::Requirement
|
120
114
|
requirements:
|
121
115
|
- - ">="
|
@@ -129,75 +123,75 @@ dependencies:
|
|
129
123
|
- !ruby/object:Gem::Version
|
130
124
|
version: '0'
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
126
|
+
name: rspec-rails
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
129
|
- - ">="
|
136
130
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
131
|
+
version: 3.5.0
|
138
132
|
type: :development
|
139
133
|
prerelease: false
|
140
134
|
version_requirements: !ruby/object:Gem::Requirement
|
141
135
|
requirements:
|
142
136
|
- - ">="
|
143
137
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
138
|
+
version: 3.5.0
|
145
139
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
140
|
+
name: rubocop
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
|
-
- -
|
143
|
+
- - '='
|
150
144
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
145
|
+
version: 1.25.1
|
152
146
|
type: :development
|
153
147
|
prerelease: false
|
154
148
|
version_requirements: !ruby/object:Gem::Requirement
|
155
149
|
requirements:
|
156
|
-
- -
|
150
|
+
- - '='
|
157
151
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
152
|
+
version: 1.25.1
|
159
153
|
- !ruby/object:Gem::Dependency
|
160
|
-
name:
|
154
|
+
name: rubocop-rails
|
161
155
|
requirement: !ruby/object:Gem::Requirement
|
162
156
|
requirements:
|
163
|
-
- -
|
157
|
+
- - '='
|
164
158
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
159
|
+
version: 2.13.2
|
166
160
|
type: :development
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
163
|
requirements:
|
170
|
-
- -
|
164
|
+
- - '='
|
171
165
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
166
|
+
version: 2.13.2
|
173
167
|
- !ruby/object:Gem::Dependency
|
174
|
-
name: rubocop
|
168
|
+
name: rubocop-rspec
|
175
169
|
requirement: !ruby/object:Gem::Requirement
|
176
170
|
requirements:
|
177
171
|
- - '='
|
178
172
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
173
|
+
version: 2.8.0
|
180
174
|
type: :development
|
181
175
|
prerelease: false
|
182
176
|
version_requirements: !ruby/object:Gem::Requirement
|
183
177
|
requirements:
|
184
178
|
- - '='
|
185
179
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
180
|
+
version: 2.8.0
|
187
181
|
- !ruby/object:Gem::Dependency
|
188
|
-
name:
|
182
|
+
name: rubocop-performance
|
189
183
|
requirement: !ruby/object:Gem::Requirement
|
190
184
|
requirements:
|
191
|
-
- -
|
185
|
+
- - '='
|
192
186
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
187
|
+
version: 1.13.2
|
194
188
|
type: :development
|
195
189
|
prerelease: false
|
196
190
|
version_requirements: !ruby/object:Gem::Requirement
|
197
191
|
requirements:
|
198
|
-
- -
|
192
|
+
- - '='
|
199
193
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
194
|
+
version: 1.13.2
|
201
195
|
- !ruby/object:Gem::Dependency
|
202
196
|
name: bundle-audit
|
203
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -513,8 +507,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
507
|
- !ruby/object:Gem::Version
|
514
508
|
version: '0'
|
515
509
|
requirements: []
|
516
|
-
|
517
|
-
rubygems_version: 2.7.6
|
510
|
+
rubygems_version: 3.0.9
|
518
511
|
signing_key:
|
519
512
|
specification_version: 4
|
520
513
|
summary: Extension to Thredded with features for workgroup messaging (Unread, Unreplied,
|