thredded 0.6.1 → 0.6.2
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/{CHANGELOG.mkdn → CHANGELOG.md} +13 -0
- data/{README.mkdn → README.md} +1 -1
- data/app/commands/thredded/moderate_post.rb +16 -4
- data/app/models/concerns/thredded/content_moderation_state.rb +15 -9
- data/app/models/concerns/thredded/post_common.rb +0 -14
- data/app/models/thredded/post.rb +17 -0
- data/app/models/thredded/private_post.rb +13 -0
- data/app/models/thredded/topic.rb +3 -3
- data/db/seeds.rb +4 -1
- data/heroku.gemfile +5 -3
- data/heroku.gemfile.lock +49 -57
- data/lib/thredded/content_formatter.rb +2 -0
- data/lib/thredded/version.rb +1 -1
- data/thredded.gemspec +9 -4
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9af60f2898343a1404af723bb3dd314807876a
|
4
|
+
data.tar.gz: 7b6ac99f8869dc6722671e4c7491997815463cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28a32a71b5e598e03fe027194b96b7577be422cae39f4208b28719e991d740ec78e8580be3f03b202f28b1bf19bb825d936608ecf18968ac1ebe5462c6be0b94
|
7
|
+
data.tar.gz: fe05b0331bb1f3fa9d4ed33749dbe78e6e836f5ece7cc53dc864e3ff69792a308e403854a6eb516f21865e7734ca7833cafc009f006a2274f0fe8b9b21b72264
|
@@ -1,3 +1,16 @@
|
|
1
|
+
# v0.6.2
|
2
|
+
|
3
|
+
This is a minor bugfix release.
|
4
|
+
|
5
|
+
## Fixed
|
6
|
+
|
7
|
+
* Moderating posts, topics, and users no longer changes their `updated_at` attribute.
|
8
|
+
* Posts and topics that are not yet visible to all users no longer appear as last posts / topics in the respective
|
9
|
+
topic / messageboard.
|
10
|
+
* Cleaned up dependencies.
|
11
|
+
|
12
|
+
See the full list of changes here: https://github.com/thredded/thredded/compare/v0.6.1...v0.6.2.
|
13
|
+
|
1
14
|
# v0.6.1
|
2
15
|
|
3
16
|
This is a minor bugfix release.
|
data/{README.mkdn → README.md}
RENAMED
@@ -100,7 +100,7 @@ cp `bundle show thredded`/db/upgrade_migrations/20160501151908_upgrade_v0_4_to_v
|
|
100
100
|
rake db:migrate
|
101
101
|
```
|
102
102
|
|
103
|
-
Note that for guaranteed best results you will want to run this with the gem checked out with v0.5.0
|
103
|
+
Note that for guaranteed best results you will want to run this with the gem checked out with v0.5.0.
|
104
104
|
|
105
105
|
### Migrating from Forem
|
106
106
|
|
@@ -16,20 +16,32 @@ module Thredded
|
|
16
16
|
moderation_state: moderation_state,
|
17
17
|
)
|
18
18
|
if post.user_id && post.user_detail.pending_moderation?
|
19
|
-
post.user_detail
|
19
|
+
update_without_timestamping!(post.user_detail, moderation_state: moderation_state)
|
20
20
|
end
|
21
21
|
if post.postable.first_post == post
|
22
|
-
post.postable
|
22
|
+
update_without_timestamping!(post.postable, moderation_state: moderation_state)
|
23
23
|
if moderation_state == :blocked
|
24
24
|
# When blocking the first post of a topic, also block all the other posts in the topic by this user.
|
25
25
|
post.postable.posts.where(user_id: post.user.id).where.not(id: post.id).each do |a_post|
|
26
|
-
|
26
|
+
update_without_timestamping!(a_post, moderation_state: moderation_state)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
30
|
+
update_without_timestamping!(post, moderation_state: moderation_state)
|
31
31
|
post_moderation_record
|
32
32
|
end
|
33
33
|
end
|
34
|
+
|
35
|
+
# @param record [ActiveRecord]
|
36
|
+
# @api private
|
37
|
+
def update_without_timestamping!(record, *attr)
|
38
|
+
record_timestamps_was = record.record_timestamps
|
39
|
+
begin
|
40
|
+
record.record_timestamps = false
|
41
|
+
record.update!(*attr)
|
42
|
+
ensure
|
43
|
+
record.record_timestamps = record_timestamps_was
|
44
|
+
end
|
45
|
+
end
|
34
46
|
end
|
35
47
|
end
|
@@ -10,18 +10,12 @@ module Thredded
|
|
10
10
|
included do
|
11
11
|
before_validation :set_default_moderation_state, on: :create
|
12
12
|
|
13
|
+
scope :moderation_state_visible_to_all, -> { where(visible_to_all_arel_node) }
|
14
|
+
|
13
15
|
scope :moderation_state_visible_to_user, (lambda do |user|
|
16
|
+
visible = visible_to_all_arel_node
|
14
17
|
# @type [Arel::Table]
|
15
18
|
table = arel_table
|
16
|
-
# @type [Arel::Nodes::Node]
|
17
|
-
visible =
|
18
|
-
if Thredded.content_visible_while_pending_moderation
|
19
|
-
# All non-blocked content
|
20
|
-
table[:moderation_state].not_eq(moderation_states[:blocked])
|
21
|
-
else
|
22
|
-
# Only approved content
|
23
|
-
table[:moderation_state].eq(moderation_states[:approved])
|
24
|
-
end
|
25
19
|
if user && !user.thredded_anonymous?
|
26
20
|
# Own content
|
27
21
|
visible = visible.or(table[:user_id].eq(user.id))
|
@@ -33,6 +27,18 @@ module Thredded
|
|
33
27
|
end
|
34
28
|
where(visible)
|
35
29
|
end)
|
30
|
+
|
31
|
+
# @return [Arel::Nodes::Node]
|
32
|
+
# @api private
|
33
|
+
def self.visible_to_all_arel_node
|
34
|
+
if Thredded.content_visible_while_pending_moderation
|
35
|
+
# All non-blocked content
|
36
|
+
arel_table[:moderation_state].not_eq(moderation_states[:blocked])
|
37
|
+
else
|
38
|
+
# Only approved content
|
39
|
+
arel_table[:moderation_state].eq(moderation_states[:approved])
|
40
|
+
end
|
41
|
+
end
|
36
42
|
end
|
37
43
|
|
38
44
|
# Whether this is visible to anyone based on the moderation state.
|
@@ -15,8 +15,6 @@ module Thredded
|
|
15
15
|
|
16
16
|
scope :order_oldest_first, -> { order(id: :asc) }
|
17
17
|
scope :order_newest_first, -> { order(id: :desc) }
|
18
|
-
|
19
|
-
after_commit :update_parent_last_user_and_timestamp, on: [:create, :destroy]
|
20
18
|
end
|
21
19
|
|
22
20
|
def avatar_url
|
@@ -28,17 +26,5 @@ module Thredded
|
|
28
26
|
def filtered_content(view_context, users_provider: -> (names) { readers_from_user_names(names) })
|
29
27
|
Thredded::ContentFormatter.new(view_context, users_provider: users_provider).format_content(content)
|
30
28
|
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def update_parent_last_user_and_timestamp
|
35
|
-
return if postable.destroyed?
|
36
|
-
last_post = if destroyed?
|
37
|
-
postable.posts.order_oldest_first.select(:user_id, :created_at).last
|
38
|
-
else
|
39
|
-
self
|
40
|
-
end
|
41
|
-
postable.update!(last_user_id: last_post.user_id, updated_at: last_post.created_at)
|
42
|
-
end
|
43
29
|
end
|
44
30
|
end
|
data/app/models/thredded/post.rb
CHANGED
@@ -26,6 +26,7 @@ module Thredded
|
|
26
26
|
|
27
27
|
validates :messageboard_id, presence: true
|
28
28
|
|
29
|
+
after_commit :update_parent_last_user_and_timestamp, on: [:create, :destroy]
|
29
30
|
after_commit :auto_follow_and_notify, on: [:create, :update]
|
30
31
|
|
31
32
|
# @param [Integer] per_page
|
@@ -50,6 +51,8 @@ module Thredded
|
|
50
51
|
.in(user_names)
|
51
52
|
end
|
52
53
|
|
54
|
+
private
|
55
|
+
|
53
56
|
def auto_follow_and_notify
|
54
57
|
return unless user
|
55
58
|
# need to do this in-process so that it appears to them immediately
|
@@ -57,5 +60,19 @@ module Thredded
|
|
57
60
|
# everything else can happen later
|
58
61
|
AutoFollowAndNotifyJob.perform_later(id)
|
59
62
|
end
|
63
|
+
|
64
|
+
def update_parent_last_user_and_timestamp
|
65
|
+
return if postable.destroyed?
|
66
|
+
last_post = if destroyed? || !moderation_state_visible_to_all?
|
67
|
+
postable.posts.order_oldest_first.moderation_state_visible_to_all.select(:user_id, :updated_at).last
|
68
|
+
else
|
69
|
+
self
|
70
|
+
end
|
71
|
+
if last_post
|
72
|
+
postable.update_columns(last_user_id: last_post.user_id, updated_at: last_post.updated_at)
|
73
|
+
else
|
74
|
+
postable.update_columns(last_user_id: nil, updated_at: postable.created_at)
|
75
|
+
end
|
76
|
+
end
|
60
77
|
end
|
61
78
|
end
|
@@ -15,6 +15,7 @@ module Thredded
|
|
15
15
|
primary_key: :user_id,
|
16
16
|
foreign_key: :user_id
|
17
17
|
|
18
|
+
after_commit :update_parent_last_user_and_timestamp, on: [:create, :destroy]
|
18
19
|
after_commit :notify_users, on: [:create]
|
19
20
|
|
20
21
|
# @param [Integer] per_page
|
@@ -37,8 +38,20 @@ module Thredded
|
|
37
38
|
.in(user_names)
|
38
39
|
end
|
39
40
|
|
41
|
+
private
|
42
|
+
|
40
43
|
def notify_users
|
41
44
|
Thredded::NotifyPrivateTopicUsersJob.perform_later(id)
|
42
45
|
end
|
46
|
+
|
47
|
+
def update_parent_last_user_and_timestamp
|
48
|
+
return if postable.destroyed?
|
49
|
+
last_post = if destroyed?
|
50
|
+
postable.posts.order_oldest_first.select(:user_id, :updated_at).last
|
51
|
+
else
|
52
|
+
self
|
53
|
+
end
|
54
|
+
postable.update_columns(last_user_id: last_post.user_id, updated_at: last_post.updated_at)
|
55
|
+
end
|
43
56
|
end
|
44
57
|
end
|
@@ -125,12 +125,12 @@ module Thredded
|
|
125
125
|
|
126
126
|
def update_messageboard_last_topic
|
127
127
|
return if messageboard.destroyed?
|
128
|
-
last_topic = if destroyed?
|
129
|
-
messageboard.topics.order_recently_updated_first.select(:id).first
|
128
|
+
last_topic = if destroyed? || !moderation_state_visible_to_all?
|
129
|
+
messageboard.topics.order_recently_updated_first.moderation_state_visible_to_all.select(:id).first
|
130
130
|
else
|
131
131
|
self
|
132
132
|
end
|
133
|
-
messageboard.
|
133
|
+
messageboard.update_columns(last_topic_id: last_topic.try(:id))
|
134
134
|
end
|
135
135
|
end
|
136
136
|
end
|
data/db/seeds.rb
CHANGED
@@ -49,7 +49,10 @@ module Thredded
|
|
49
49
|
|
50
50
|
def create_users(count:)
|
51
51
|
log "Creating #{count} users..."
|
52
|
-
|
52
|
+
approved_users_count = (count * 0.97).round
|
53
|
+
@users = [user] +
|
54
|
+
FactoryGirl.create_list(:user, approved_users_count, :approved) +
|
55
|
+
FactoryGirl.create_list(:user, count - approved_users_count)
|
53
56
|
end
|
54
57
|
|
55
58
|
def create_messageboard
|
data/heroku.gemfile
CHANGED
@@ -5,15 +5,17 @@ ruby '2.3.1'
|
|
5
5
|
gem 'thredded', path: File.dirname(__FILE__)
|
6
6
|
|
7
7
|
# Rails 5
|
8
|
-
gem 'rails', '~> 5.0.0.
|
9
|
-
gem 'active_record_union',
|
8
|
+
gem 'rails', '~> 5.0.0.rc2'
|
9
|
+
gem 'active_record_union', '>= 1.2.0'
|
10
10
|
|
11
11
|
# Make these gems available in production
|
12
12
|
gem 'puma'
|
13
13
|
gem 'pg'
|
14
14
|
gem 'rails_email_preview', '>= 1.0.3'
|
15
15
|
gem 'jquery-turbolinks'
|
16
|
-
|
16
|
+
# TODO: upgrade once Turbolinks 5 is supported by jquery-turbolinks:
|
17
|
+
# https://github.com/kossnocorp/jquery.turbolinks/pull/58
|
18
|
+
gem 'turbolinks', '~> 2.5'
|
17
19
|
gem 'rails-i18n'
|
18
20
|
gem 'http_accept_language'
|
19
21
|
gem 'factory_girl_rails'
|
data/heroku.gemfile.lock
CHANGED
@@ -1,16 +1,8 @@
|
|
1
|
-
GIT
|
2
|
-
remote: https://github.com/glebm/active_record_union
|
3
|
-
revision: fde21fb8fe7d5d3cc24f1dc5d6627d92c30f10e5
|
4
|
-
branch: rails-5-test-harness
|
5
|
-
specs:
|
6
|
-
active_record_union (1.1.1)
|
7
|
-
activerecord (>= 4.0)
|
8
|
-
|
9
1
|
PATH
|
10
2
|
remote: .
|
11
3
|
specs:
|
12
|
-
thredded (0.6.
|
13
|
-
active_record_union (>= 1.
|
4
|
+
thredded (0.6.2)
|
5
|
+
active_record_union (>= 1.2.0)
|
14
6
|
autoprefixer-rails
|
15
7
|
autosize-rails
|
16
8
|
bbcoder (~> 1.0)
|
@@ -38,39 +30,41 @@ PATH
|
|
38
30
|
GEM
|
39
31
|
remote: https://rubygems.org/
|
40
32
|
specs:
|
41
|
-
actioncable (5.0.0.
|
42
|
-
actionpack (= 5.0.0.
|
33
|
+
actioncable (5.0.0.rc2)
|
34
|
+
actionpack (= 5.0.0.rc2)
|
43
35
|
nio4r (~> 1.2)
|
44
36
|
websocket-driver (~> 0.6.1)
|
45
|
-
actionmailer (5.0.0.
|
46
|
-
actionpack (= 5.0.0.
|
47
|
-
actionview (= 5.0.0.
|
48
|
-
activejob (= 5.0.0.
|
37
|
+
actionmailer (5.0.0.rc2)
|
38
|
+
actionpack (= 5.0.0.rc2)
|
39
|
+
actionview (= 5.0.0.rc2)
|
40
|
+
activejob (= 5.0.0.rc2)
|
49
41
|
mail (~> 2.5, >= 2.5.4)
|
50
42
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
51
|
-
actionpack (5.0.0.
|
52
|
-
actionview (= 5.0.0.
|
53
|
-
activesupport (= 5.0.0.
|
43
|
+
actionpack (5.0.0.rc2)
|
44
|
+
actionview (= 5.0.0.rc2)
|
45
|
+
activesupport (= 5.0.0.rc2)
|
54
46
|
rack (~> 2.x)
|
55
47
|
rack-test (~> 0.6.3)
|
56
48
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
57
49
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
58
|
-
actionview (5.0.0.
|
59
|
-
activesupport (= 5.0.0.
|
50
|
+
actionview (5.0.0.rc2)
|
51
|
+
activesupport (= 5.0.0.rc2)
|
60
52
|
builder (~> 3.1)
|
61
53
|
erubis (~> 2.7.0)
|
62
54
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
63
55
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
64
|
-
|
65
|
-
|
56
|
+
active_record_union (1.2.0)
|
57
|
+
activerecord (>= 4.0)
|
58
|
+
activejob (5.0.0.rc2)
|
59
|
+
activesupport (= 5.0.0.rc2)
|
66
60
|
globalid (>= 0.3.6)
|
67
|
-
activemodel (5.0.0.
|
68
|
-
activesupport (= 5.0.0.
|
69
|
-
activerecord (5.0.0.
|
70
|
-
activemodel (= 5.0.0.
|
71
|
-
activesupport (= 5.0.0.
|
61
|
+
activemodel (5.0.0.rc2)
|
62
|
+
activesupport (= 5.0.0.rc2)
|
63
|
+
activerecord (5.0.0.rc2)
|
64
|
+
activemodel (= 5.0.0.rc2)
|
65
|
+
activesupport (= 5.0.0.rc2)
|
72
66
|
arel (~> 7.0)
|
73
|
-
activesupport (5.0.0.
|
67
|
+
activesupport (5.0.0.rc2)
|
74
68
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
75
69
|
i18n (~> 0.7)
|
76
70
|
minitest (~> 5.1)
|
@@ -87,9 +81,9 @@ GEM
|
|
87
81
|
execjs (~> 2.0)
|
88
82
|
bbcoder (1.1.1)
|
89
83
|
builder (3.2.2)
|
90
|
-
coffee-rails (4.
|
84
|
+
coffee-rails (4.2.1)
|
91
85
|
coffee-script (>= 2.2.0)
|
92
|
-
railties (>= 4.0.0, < 5.
|
86
|
+
railties (>= 4.0.0, < 5.2.x)
|
93
87
|
coffee-script (2.4.1)
|
94
88
|
coffee-script-source
|
95
89
|
execjs
|
@@ -124,7 +118,7 @@ GEM
|
|
124
118
|
htmlentities (4.3.4)
|
125
119
|
http_accept_language (2.0.5)
|
126
120
|
i18n (0.7.0)
|
127
|
-
inline_svg (0.
|
121
|
+
inline_svg (0.9.0)
|
128
122
|
activesupport (>= 4.0.4)
|
129
123
|
loofah (>= 2.0)
|
130
124
|
nokogiri (~> 1.6)
|
@@ -135,7 +129,6 @@ GEM
|
|
135
129
|
jquery-turbolinks (2.1.0)
|
136
130
|
railties (>= 3.1.0)
|
137
131
|
turbolinks
|
138
|
-
json (1.8.3)
|
139
132
|
kaminari (0.17.0)
|
140
133
|
actionpack (>= 3.0.0)
|
141
134
|
activesupport (>= 3.0.0)
|
@@ -151,7 +144,7 @@ GEM
|
|
151
144
|
mini_portile2 (2.1.0)
|
152
145
|
minitest (5.9.0)
|
153
146
|
multi_json (1.12.1)
|
154
|
-
newrelic_rpm (3.
|
147
|
+
newrelic_rpm (3.16.0.318)
|
155
148
|
nio4r (1.2.1)
|
156
149
|
nokogiri (1.6.8)
|
157
150
|
mini_portile2 (~> 2.1.0)
|
@@ -163,24 +156,23 @@ GEM
|
|
163
156
|
puma (3.4.0)
|
164
157
|
pundit (1.1.0)
|
165
158
|
activesupport (>= 3.0.0)
|
166
|
-
rack (2.0.
|
167
|
-
json
|
159
|
+
rack (2.0.1)
|
168
160
|
rack-canonical-host (0.2.2)
|
169
161
|
addressable (> 0, < 3)
|
170
162
|
rack (>= 1.0.0, < 3)
|
171
163
|
rack-test (0.6.3)
|
172
164
|
rack (>= 1.0)
|
173
|
-
rails (5.0.0.
|
174
|
-
actioncable (= 5.0.0.
|
175
|
-
actionmailer (= 5.0.0.
|
176
|
-
actionpack (= 5.0.0.
|
177
|
-
actionview (= 5.0.0.
|
178
|
-
activejob (= 5.0.0.
|
179
|
-
activemodel (= 5.0.0.
|
180
|
-
activerecord (= 5.0.0.
|
181
|
-
activesupport (= 5.0.0.
|
165
|
+
rails (5.0.0.rc2)
|
166
|
+
actioncable (= 5.0.0.rc2)
|
167
|
+
actionmailer (= 5.0.0.rc2)
|
168
|
+
actionpack (= 5.0.0.rc2)
|
169
|
+
actionview (= 5.0.0.rc2)
|
170
|
+
activejob (= 5.0.0.rc2)
|
171
|
+
activemodel (= 5.0.0.rc2)
|
172
|
+
activerecord (= 5.0.0.rc2)
|
173
|
+
activesupport (= 5.0.0.rc2)
|
182
174
|
bundler (>= 1.3.0, < 2.0)
|
183
|
-
railties (= 5.0.0.
|
175
|
+
railties (= 5.0.0.rc2)
|
184
176
|
sprockets-rails (>= 2.0.0)
|
185
177
|
rails-deprecated_sanitizer (1.0.3)
|
186
178
|
activesupport (>= 4.2.0.alpha)
|
@@ -193,7 +185,7 @@ GEM
|
|
193
185
|
rails-i18n (4.0.2)
|
194
186
|
i18n (~> 0.6)
|
195
187
|
rails (>= 4.0)
|
196
|
-
rails-timeago (2.
|
188
|
+
rails-timeago (2.14.0)
|
197
189
|
actionpack (>= 3.1)
|
198
190
|
activesupport (>= 3.1)
|
199
191
|
rails_email_preview (2.0.1)
|
@@ -201,9 +193,9 @@ GEM
|
|
201
193
|
request_store
|
202
194
|
sass-rails
|
203
195
|
turbolinks
|
204
|
-
railties (5.0.0.
|
205
|
-
actionpack (= 5.0.0.
|
206
|
-
activesupport (= 5.0.0.
|
196
|
+
railties (5.0.0.rc2)
|
197
|
+
actionpack (= 5.0.0.rc2)
|
198
|
+
activesupport (= 5.0.0.rc2)
|
207
199
|
method_source
|
208
200
|
rake (>= 0.8.7)
|
209
201
|
thor (>= 0.18.1, < 2.0)
|
@@ -211,7 +203,7 @@ GEM
|
|
211
203
|
rb-gravatar (1.0.5)
|
212
204
|
ref (2.0.0)
|
213
205
|
request_store (1.3.1)
|
214
|
-
rollbar (2.
|
206
|
+
rollbar (2.12.0)
|
215
207
|
multi_json
|
216
208
|
sanitize (4.0.1)
|
217
209
|
crass (~> 1.0.2)
|
@@ -226,14 +218,14 @@ GEM
|
|
226
218
|
tilt (>= 1.1, < 3)
|
227
219
|
select2-rails (3.5.10)
|
228
220
|
thor (~> 0.14)
|
229
|
-
sprockets (3.6.
|
221
|
+
sprockets (3.6.2)
|
230
222
|
concurrent-ruby (~> 1.0)
|
231
223
|
rack (> 1, < 3)
|
232
224
|
sprockets-es6 (0.9.0)
|
233
225
|
babel-source (>= 5.8.11)
|
234
226
|
babel-transpiler
|
235
227
|
sprockets (>= 3.0.0)
|
236
|
-
sprockets-rails (3.
|
228
|
+
sprockets-rails (3.1.1)
|
237
229
|
actionpack (>= 4.0)
|
238
230
|
activesupport (>= 4.0)
|
239
231
|
sprockets (>= 3.0.0)
|
@@ -255,7 +247,7 @@ PLATFORMS
|
|
255
247
|
ruby
|
256
248
|
|
257
249
|
DEPENDENCIES
|
258
|
-
active_record_union
|
250
|
+
active_record_union (>= 1.2.0)
|
259
251
|
dalli
|
260
252
|
factory_girl_rails
|
261
253
|
faker (>= 1.6.2)
|
@@ -265,16 +257,16 @@ DEPENDENCIES
|
|
265
257
|
pg
|
266
258
|
puma
|
267
259
|
rack-canonical-host
|
268
|
-
rails (~> 5.0.0.
|
260
|
+
rails (~> 5.0.0.rc2)
|
269
261
|
rails-i18n
|
270
262
|
rails_email_preview (>= 1.0.3)
|
271
263
|
rollbar
|
272
264
|
therubyracer
|
273
265
|
thredded!
|
274
|
-
turbolinks
|
266
|
+
turbolinks (~> 2.5)
|
275
267
|
|
276
268
|
RUBY VERSION
|
277
269
|
ruby 2.3.1p112
|
278
270
|
|
279
271
|
BUNDLED WITH
|
280
|
-
1.12.
|
272
|
+
1.12.5
|
@@ -64,7 +64,9 @@ module Thredded
|
|
64
64
|
def format_content(content)
|
65
65
|
pipeline = HTML::Pipeline.new(content_pipeline_filters, content_pipeline_options.merge(@pipeline_options))
|
66
66
|
result = pipeline.call(content, view_context: @view_context)
|
67
|
+
# rubocop:disable Rails/OutputSafety
|
67
68
|
result[:output].to_s.html_safe
|
69
|
+
# rubocop:enable Rails/OutputSafety
|
68
70
|
end
|
69
71
|
|
70
72
|
protected
|
data/lib/thredded/version.rb
CHANGED
data/thredded.gemspec
CHANGED
@@ -10,17 +10,20 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.authors = ['Joel Oliveira', 'Gleb Mazovetskiy']
|
11
11
|
s.email = ['joel@thredded.com', 'glex.spb@gmail.com']
|
12
12
|
s.homepage = 'https://www.thredded.com'
|
13
|
-
s.summary = '
|
13
|
+
s.summary = 'The best Rails forums engine ever.'
|
14
14
|
s.license = 'MIT'
|
15
|
-
s.description = '
|
15
|
+
s.description = 'The best Rails 4.2+ forums engine ever. Its goal is to be as simple and feature rich as possible.
|
16
|
+
Thredded works with SQLite, MySQL (v5.6.4+), and PostgreSQL. See the demo at https://thredded.org/.'
|
16
17
|
|
17
18
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|script)/|^\.}) } -
|
18
19
|
%w(Dockerfile docker-compose.yml Rakefile Gemfile shared.gemfile)
|
19
20
|
|
21
|
+
s.required_ruby_version = '~> 2.1'
|
22
|
+
|
20
23
|
# backend
|
21
24
|
s.add_dependency 'bbcoder', '~> 1.0'
|
22
25
|
s.add_dependency 'pundit', '>= 1.1.0'
|
23
|
-
s.add_dependency 'active_record_union', '>= 1.
|
26
|
+
s.add_dependency 'active_record_union', '>= 1.2.0'
|
24
27
|
s.add_dependency 'db_text_search', '~> 0.2.0'
|
25
28
|
s.add_dependency 'friendly_id'
|
26
29
|
s.add_dependency 'html-pipeline'
|
@@ -69,5 +72,7 @@ Gem::Specification.new do |s|
|
|
69
72
|
|
70
73
|
# dummy app frontend
|
71
74
|
s.add_development_dependency 'jquery-turbolinks'
|
72
|
-
|
75
|
+
# TODO: upgrade once Turbolinks 5 is supported by jquery-turbolinks:
|
76
|
+
# https://github.com/kossnocorp/jquery.turbolinks/pull/58
|
77
|
+
s.add_development_dependency 'turbolinks', '~> 2.5'
|
73
78
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thredded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Oliveira
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bbcoder
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 1.
|
48
|
+
version: 1.2.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
55
|
+
version: 1.2.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: db_text_search
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -589,17 +589,19 @@ dependencies:
|
|
589
589
|
name: turbolinks
|
590
590
|
requirement: !ruby/object:Gem::Requirement
|
591
591
|
requirements:
|
592
|
-
- - "
|
592
|
+
- - "~>"
|
593
593
|
- !ruby/object:Gem::Version
|
594
|
-
version: '
|
594
|
+
version: '2.5'
|
595
595
|
type: :development
|
596
596
|
prerelease: false
|
597
597
|
version_requirements: !ruby/object:Gem::Requirement
|
598
598
|
requirements:
|
599
|
-
- - "
|
599
|
+
- - "~>"
|
600
600
|
- !ruby/object:Gem::Version
|
601
|
-
version: '
|
602
|
-
description:
|
601
|
+
version: '2.5'
|
602
|
+
description: |-
|
603
|
+
The best Rails 4.2+ forums engine ever. Its goal is to be as simple and feature rich as possible.
|
604
|
+
Thredded works with SQLite, MySQL (v5.6.4+), and PostgreSQL. See the demo at https://thredded.org/.
|
603
605
|
email:
|
604
606
|
- joel@thredded.com
|
605
607
|
- glex.spb@gmail.com
|
@@ -607,10 +609,10 @@ executables: []
|
|
607
609
|
extensions: []
|
608
610
|
extra_rdoc_files: []
|
609
611
|
files:
|
610
|
-
- CHANGELOG.
|
612
|
+
- CHANGELOG.md
|
611
613
|
- MIT-LICENSE
|
612
614
|
- Procfile
|
613
|
-
- README.
|
615
|
+
- README.md
|
614
616
|
- app/assets/images/thredded/breadcrumb-chevron.svg
|
615
617
|
- app/assets/images/thredded/moderation.svg
|
616
618
|
- app/assets/images/thredded/private-messages.svg
|
@@ -876,9 +878,9 @@ require_paths:
|
|
876
878
|
- lib
|
877
879
|
required_ruby_version: !ruby/object:Gem::Requirement
|
878
880
|
requirements:
|
879
|
-
- - "
|
881
|
+
- - "~>"
|
880
882
|
- !ruby/object:Gem::Version
|
881
|
-
version: '
|
883
|
+
version: '2.1'
|
882
884
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
883
885
|
requirements:
|
884
886
|
- - ">="
|
@@ -889,5 +891,5 @@ rubyforge_project:
|
|
889
891
|
rubygems_version: 2.5.1
|
890
892
|
signing_key:
|
891
893
|
specification_version: 4
|
892
|
-
summary:
|
894
|
+
summary: The best Rails forums engine ever.
|
893
895
|
test_files: []
|