thredded 0.16.14 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -7
- data/app/assets/javascripts/thredded/components/preview_area.es6 +3 -1
- data/app/controllers/concerns/thredded/render_preview.rb +6 -0
- data/app/controllers/thredded/application_controller.rb +5 -10
- data/app/controllers/thredded/topics_controller.rb +0 -6
- data/app/helpers/thredded/application_helper.rb +1 -1
- data/app/helpers/thredded/icon_helper.rb +1 -1
- data/app/helpers/thredded/urls_helper.rb +1 -1
- data/app/models/concerns/thredded/post_common.rb +5 -4
- data/app/models/concerns/thredded/topic_common.rb +1 -1
- data/app/models/concerns/thredded/user_topic_read_state_common.rb +7 -8
- data/app/models/thredded/messageboard.rb +5 -4
- data/app/models/thredded/notifications_for_followed_topics.rb +1 -1
- data/app/models/thredded/post.rb +3 -2
- data/app/models/thredded/post_moderation_record.rb +8 -9
- data/app/models/thredded/private_post.rb +2 -2
- data/app/models/thredded/private_topic.rb +4 -2
- data/app/models/thredded/topic.rb +2 -2
- data/app/models/thredded/user_detail.rb +1 -1
- data/app/models/thredded/user_extender.rb +1 -1
- data/app/models/thredded/user_private_topic_read_state.rb +3 -0
- data/app/models/thredded/user_topic_read_state.rb +3 -0
- data/app/view_models/thredded/post_view.rb +1 -0
- data/app/view_models/thredded/posts_page_view.rb +10 -9
- data/app/view_models/thredded/private_topics_page_view.rb +10 -6
- data/app/view_models/thredded/topic_posts_page_view.rb +16 -3
- data/app/view_models/thredded/topics_page_view.rb +9 -6
- data/app/views/layouts/thredded/application.html.erb +2 -2
- data/app/views/thredded/messageboards/_form.html.erb +3 -3
- data/app/views/thredded/posts_common/_actions.html.erb +1 -1
- data/app/views/thredded/posts_common/_content.html.erb +1 -1
- data/app/views/thredded/posts_common/actions/_quote.html.erb +1 -1
- data/app/views/thredded/shared/_page.html.erb +1 -1
- data/app/views/thredded/shared/nav/_moderation.html.erb +3 -3
- data/app/views/thredded/shared/nav/_notification_preferences.html.erb +1 -1
- data/app/views/thredded/shared/nav/_private_topics.html.erb +3 -3
- data/app/views/thredded/shared/nav/_standalone.html.erb +2 -2
- data/app/views/thredded/topics/_header.html.erb +1 -1
- data/bin/create_migration_fixture +23 -0
- data/config/i18n-tasks.yml +5 -0
- data/config/locales/de.yml +2 -0
- data/config/locales/en.yml +3 -1
- data/config/locales/es.yml +2 -0
- data/config/locales/fr.yml +2 -0
- data/config/locales/it.yml +4 -2
- data/config/locales/pl.yml +2 -0
- data/config/locales/pt-BR.yml +2 -0
- data/config/locales/ru.yml +2 -0
- data/config/locales/zh-CN.yml +2 -0
- data/db/upgrade_migrations/20180110200009_upgrade_thredded_v0_14_to_v0_15.rb +1 -1
- data/lib/generators/thredded/install/templates/initializer.rb +2 -2
- data/lib/thredded/arel_compat.rb +0 -32
- data/lib/thredded/base_migration.rb +1 -1
- data/lib/thredded/collection_to_strings_with_cache_renderer.rb +91 -28
- data/lib/thredded/compat.rb +35 -0
- data/lib/thredded/database_seeder.rb +11 -4
- data/lib/thredded/db_tools.rb +2 -4
- data/lib/thredded/email_transformer.rb +2 -2
- data/lib/thredded/html_pipeline/onebox_filter.rb +1 -4
- data/lib/thredded/version.rb +1 -1
- data/lib/thredded.rb +3 -23
- metadata +43 -31
- data/bin/rubocop +0 -18
data/lib/thredded.rb
CHANGED
@@ -9,7 +9,7 @@ require 'html/pipeline'
|
|
9
9
|
require 'html/pipeline/sanitization_filter'
|
10
10
|
require 'rinku'
|
11
11
|
require 'kaminari'
|
12
|
-
require '
|
12
|
+
require 'rails_gravatar'
|
13
13
|
require 'active_job'
|
14
14
|
require 'inline_svg'
|
15
15
|
|
@@ -32,6 +32,7 @@ require 'sprockets/es6'
|
|
32
32
|
require 'sassc-rails'
|
33
33
|
|
34
34
|
require 'thredded/version'
|
35
|
+
require 'thredded/compat'
|
35
36
|
require 'thredded/engine'
|
36
37
|
require 'thredded/errors'
|
37
38
|
|
@@ -48,15 +49,6 @@ require 'thredded/collection_to_strings_with_cache_renderer'
|
|
48
49
|
|
49
50
|
require 'thredded/webpack_assets'
|
50
51
|
|
51
|
-
if Rails::VERSION::MAJOR < 5
|
52
|
-
begin
|
53
|
-
require 'where-or'
|
54
|
-
rescue LoadError
|
55
|
-
$stderr.puts "\nthredded: Please add gem 'where-or' to your Gemfile"
|
56
|
-
exit 1 # rubocop:disable Rails/Exit
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
52
|
module Thredded # rubocop:disable Metrics/ModuleLength
|
61
53
|
class << self
|
62
54
|
#== User
|
@@ -252,22 +244,10 @@ module Thredded # rubocop:disable Metrics/ModuleLength
|
|
252
244
|
.includes(:postable)
|
253
245
|
)
|
254
246
|
end
|
255
|
-
|
256
|
-
# @api private
|
257
|
-
def rails_gte_51?
|
258
|
-
@rails_gte_51 = (Rails.gem_version >= Gem::Version.new('5.1.0')) if @rails_gte_51.nil?
|
259
|
-
@rails_gte_51
|
260
|
-
end
|
261
|
-
|
262
|
-
# @api private
|
263
|
-
def rails_supports_csp_nonce?
|
264
|
-
@rails_supports_csp_nonce = (Rails.gem_version >= Gem::Version.new('5.2.0')) if @rails_supports_csp_nonce.nil?
|
265
|
-
@rails_supports_csp_nonce
|
266
|
-
end
|
267
247
|
end
|
268
248
|
|
269
249
|
self.user_name_column = :name
|
270
|
-
self.avatar_url = ->(user) {
|
250
|
+
self.avatar_url = ->(user) { RailsGravatar.src(user.email, 156, 'mm') }
|
271
251
|
self.admin_column = :admin
|
272
252
|
|
273
253
|
self.content_visible_while_pending_moderation = true
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thredded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Oliveira
|
8
8
|
- Gleb Mazovetskiy
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: active_record_union
|
@@ -29,16 +29,16 @@ dependencies:
|
|
29
29
|
name: db_text_search
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0
|
34
|
+
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: friendly_id
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,14 +73,14 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 1.6.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
83
|
+
version: 1.6.0
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: kaminari
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,7 @@ dependencies:
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: 6.0.0.rc2
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
|
-
name:
|
147
|
+
name: rails_gravatar
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
@@ -203,22 +203,16 @@ dependencies:
|
|
203
203
|
name: onebox
|
204
204
|
requirement: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '1.8'
|
209
206
|
- - ">="
|
210
207
|
- !ruby/object:Gem::Version
|
211
|
-
version: 1.8.
|
208
|
+
version: 1.8.99
|
212
209
|
type: :runtime
|
213
210
|
prerelease: false
|
214
211
|
version_requirements: !ruby/object:Gem::Requirement
|
215
212
|
requirements:
|
216
|
-
- - "~>"
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
version: '1.8'
|
219
213
|
- - ">="
|
220
214
|
- !ruby/object:Gem::Version
|
221
|
-
version: 1.8.
|
215
|
+
version: 1.8.99
|
222
216
|
- !ruby/object:Gem::Dependency
|
223
217
|
name: rinku
|
224
218
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,14 +303,14 @@ dependencies:
|
|
309
303
|
requirements:
|
310
304
|
- - "~>"
|
311
305
|
- !ruby/object:Gem::Version
|
312
|
-
version: '
|
306
|
+
version: '3.0'
|
313
307
|
type: :development
|
314
308
|
prerelease: false
|
315
309
|
version_requirements: !ruby/object:Gem::Requirement
|
316
310
|
requirements:
|
317
311
|
- - "~>"
|
318
312
|
- !ruby/object:Gem::Version
|
319
|
-
version: '
|
313
|
+
version: '3.0'
|
320
314
|
- !ruby/object:Gem::Dependency
|
321
315
|
name: cuprite
|
322
316
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,19 +326,19 @@ dependencies:
|
|
332
326
|
- !ruby/object:Gem::Version
|
333
327
|
version: '0.5'
|
334
328
|
- !ruby/object:Gem::Dependency
|
335
|
-
name: database_cleaner
|
329
|
+
name: database_cleaner-active_record
|
336
330
|
requirement: !ruby/object:Gem::Requirement
|
337
331
|
requirements:
|
338
|
-
- - "
|
332
|
+
- - "~>"
|
339
333
|
- !ruby/object:Gem::Version
|
340
|
-
version: '0'
|
334
|
+
version: '2.0'
|
341
335
|
type: :development
|
342
336
|
prerelease: false
|
343
337
|
version_requirements: !ruby/object:Gem::Requirement
|
344
338
|
requirements:
|
345
|
-
- - "
|
339
|
+
- - "~>"
|
346
340
|
- !ruby/object:Gem::Version
|
347
|
-
version: '0'
|
341
|
+
version: '2.0'
|
348
342
|
- !ruby/object:Gem::Dependency
|
349
343
|
name: factory_bot
|
350
344
|
requirement: !ruby/object:Gem::Requirement
|
@@ -387,6 +381,20 @@ dependencies:
|
|
387
381
|
- - ">="
|
388
382
|
- !ruby/object:Gem::Version
|
389
383
|
version: '0'
|
384
|
+
- !ruby/object:Gem::Dependency
|
385
|
+
name: rails-controller-testing
|
386
|
+
requirement: !ruby/object:Gem::Requirement
|
387
|
+
requirements:
|
388
|
+
- - ">="
|
389
|
+
- !ruby/object:Gem::Version
|
390
|
+
version: '0'
|
391
|
+
type: :development
|
392
|
+
prerelease: false
|
393
|
+
version_requirements: !ruby/object:Gem::Requirement
|
394
|
+
requirements:
|
395
|
+
- - ">="
|
396
|
+
- !ruby/object:Gem::Version
|
397
|
+
version: '0'
|
390
398
|
- !ruby/object:Gem::Dependency
|
391
399
|
name: rspec-rails
|
392
400
|
requirement: !ruby/object:Gem::Requirement
|
@@ -960,8 +968,8 @@ files:
|
|
960
968
|
- app/views/thredded/users/_link.html.erb
|
961
969
|
- app/views/thredded/users/_post.html.erb
|
962
970
|
- app/views/thredded/users/_posts.html.erb
|
971
|
+
- bin/create_migration_fixture
|
963
972
|
- bin/rails
|
964
|
-
- bin/rubocop
|
965
973
|
- config/i18n-tasks.yml
|
966
974
|
- config/locales/de.yml
|
967
975
|
- config/locales/en.yml
|
@@ -993,6 +1001,7 @@ files:
|
|
993
1001
|
- lib/thredded/base_migration.rb
|
994
1002
|
- lib/thredded/base_notifier.rb
|
995
1003
|
- lib/thredded/collection_to_strings_with_cache_renderer.rb
|
1004
|
+
- lib/thredded/compat.rb
|
996
1005
|
- lib/thredded/content_formatter.rb
|
997
1006
|
- lib/thredded/database_seeder.rb
|
998
1007
|
- lib/thredded/db_tools.rb
|
@@ -1022,23 +1031,26 @@ homepage: https://thredded.org
|
|
1022
1031
|
licenses:
|
1023
1032
|
- MIT
|
1024
1033
|
metadata: {}
|
1025
|
-
post_install_message:
|
1034
|
+
post_install_message:
|
1026
1035
|
rdoc_options: []
|
1027
1036
|
require_paths:
|
1028
1037
|
- lib
|
1029
1038
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1030
1039
|
requirements:
|
1031
|
-
- - "
|
1040
|
+
- - ">="
|
1041
|
+
- !ruby/object:Gem::Version
|
1042
|
+
version: '2.1'
|
1043
|
+
- - "<"
|
1032
1044
|
- !ruby/object:Gem::Version
|
1033
|
-
version: '
|
1045
|
+
version: '4.0'
|
1034
1046
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1035
1047
|
requirements:
|
1036
1048
|
- - ">="
|
1037
1049
|
- !ruby/object:Gem::Version
|
1038
1050
|
version: '0'
|
1039
1051
|
requirements: []
|
1040
|
-
rubygems_version: 3.
|
1041
|
-
signing_key:
|
1052
|
+
rubygems_version: 3.1.6
|
1053
|
+
signing_key:
|
1042
1054
|
specification_version: 4
|
1043
1055
|
summary: The best Rails forums engine ever.
|
1044
1056
|
test_files: []
|
data/bin/rubocop
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'rubocop' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
require 'pathname'
|
12
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
|
13
|
-
Pathname.new(__FILE__).realpath)
|
14
|
-
|
15
|
-
require 'rubygems'
|
16
|
-
require 'bundler/setup'
|
17
|
-
|
18
|
-
load Gem.bin_path('rubocop', 'rubocop')
|