thredded 0.12.1 → 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/commands/thredded/at_notification_extractor.rb +1 -0
  4. data/app/commands/thredded/autofollow_users.rb +1 -0
  5. data/app/commands/thredded/create_messageboard.rb +1 -0
  6. data/app/commands/thredded/mark_all_read.rb +1 -0
  7. data/app/commands/thredded/moderate_post.rb +1 -0
  8. data/app/commands/thredded/notify_following_users.rb +1 -0
  9. data/app/commands/thredded/notify_private_topic_users.rb +1 -0
  10. data/app/controllers/concerns/thredded/new_post_params.rb +1 -0
  11. data/app/controllers/concerns/thredded/new_private_post_params.rb +1 -0
  12. data/app/controllers/concerns/thredded/new_private_topic_params.rb +1 -0
  13. data/app/controllers/concerns/thredded/new_topic_params.rb +1 -0
  14. data/app/controllers/concerns/thredded/render_preview.rb +1 -0
  15. data/app/controllers/thredded/application_controller.rb +1 -0
  16. data/app/controllers/thredded/autocomplete_users_controller.rb +1 -0
  17. data/app/controllers/thredded/messageboards_controller.rb +4 -3
  18. data/app/controllers/thredded/moderation_controller.rb +1 -0
  19. data/app/controllers/thredded/post_permalinks_controller.rb +1 -0
  20. data/app/controllers/thredded/post_previews_controller.rb +1 -0
  21. data/app/controllers/thredded/posts_controller.rb +1 -0
  22. data/app/controllers/thredded/preferences_controller.rb +4 -3
  23. data/app/controllers/thredded/private_post_permalinks_controller.rb +1 -0
  24. data/app/controllers/thredded/private_post_previews_controller.rb +1 -0
  25. data/app/controllers/thredded/private_posts_controller.rb +1 -0
  26. data/app/controllers/thredded/private_topic_previews_controller.rb +1 -0
  27. data/app/controllers/thredded/private_topics_controller.rb +1 -0
  28. data/app/controllers/thredded/read_states_controller.rb +1 -0
  29. data/app/controllers/thredded/theme_previews_controller.rb +1 -0
  30. data/app/controllers/thredded/topic_previews_controller.rb +1 -0
  31. data/app/controllers/thredded/topics_controller.rb +5 -4
  32. data/app/forms/thredded/edit_topic_form.rb +1 -0
  33. data/app/forms/thredded/post_form.rb +2 -0
  34. data/app/forms/thredded/private_post_form.rb +2 -0
  35. data/app/forms/thredded/private_topic_form.rb +1 -0
  36. data/app/forms/thredded/topic_form.rb +1 -0
  37. data/app/forms/thredded/user_preferences_form.rb +1 -0
  38. data/app/helpers/thredded/application_helper.rb +1 -0
  39. data/app/helpers/thredded/nav_helper.rb +7 -6
  40. data/app/helpers/thredded/render_helper.rb +1 -0
  41. data/app/helpers/thredded/urls_helper.rb +1 -0
  42. data/app/jobs/thredded/activity_updater_job.rb +1 -0
  43. data/app/jobs/thredded/auto_follow_and_notify_job.rb +1 -0
  44. data/app/jobs/thredded/notify_private_topic_users_job.rb +1 -0
  45. data/app/mailer_previews/thredded/base_mailer_preview.rb +2 -1
  46. data/app/mailer_previews/thredded/post_mailer_preview.rb +3 -2
  47. data/app/mailer_previews/thredded/private_topic_mailer_preview.rb +2 -1
  48. data/app/mailers/thredded/base_mailer.rb +1 -0
  49. data/app/mailers/thredded/post_mailer.rb +1 -0
  50. data/app/mailers/thredded/private_topic_mailer.rb +1 -0
  51. data/app/models/concerns/thredded/content_moderation_state.rb +1 -0
  52. data/app/models/concerns/thredded/friendly_id_reserved_words_and_pagination.rb +1 -0
  53. data/app/models/concerns/thredded/moderation_state.rb +2 -1
  54. data/app/models/concerns/thredded/notifier_preference.rb +1 -0
  55. data/app/models/concerns/thredded/post_common.rb +1 -0
  56. data/app/models/concerns/thredded/search_parser.rb +3 -2
  57. data/app/models/concerns/thredded/topic_common.rb +2 -1
  58. data/app/models/concerns/thredded/topics_search.rb +1 -0
  59. data/app/models/concerns/thredded/user_topic_read_state_common.rb +1 -0
  60. data/app/models/thredded/category.rb +2 -1
  61. data/app/models/thredded/messageboard.rb +5 -4
  62. data/app/models/thredded/messageboard_group.rb +1 -0
  63. data/app/models/thredded/messageboard_notifications_for_followed_topics.rb +2 -1
  64. data/app/models/thredded/messageboard_user.rb +1 -0
  65. data/app/models/thredded/notifications_for_followed_topics.rb +2 -1
  66. data/app/models/thredded/notifications_for_private_topics.rb +2 -1
  67. data/app/models/thredded/null_user.rb +1 -0
  68. data/app/models/thredded/null_user_topic_read_state.rb +1 -0
  69. data/app/models/thredded/post.rb +4 -3
  70. data/app/models/thredded/post_moderation_record.rb +3 -2
  71. data/app/models/thredded/private_post.rb +3 -2
  72. data/app/models/thredded/private_topic.rb +4 -3
  73. data/app/models/thredded/private_user.rb +2 -1
  74. data/app/models/thredded/stats.rb +1 -0
  75. data/app/models/thredded/topic.rb +6 -5
  76. data/app/models/thredded/topic_category.rb +1 -0
  77. data/app/models/thredded/user_detail.rb +2 -1
  78. data/app/models/thredded/user_extender.rb +2 -1
  79. data/app/models/thredded/user_messageboard_preference.rb +2 -1
  80. data/app/models/thredded/user_permissions/admin/if_admin_column_true.rb +1 -0
  81. data/app/models/thredded/user_permissions/admin/none.rb +1 -0
  82. data/app/models/thredded/user_permissions/message/readers_of_writeable_boards.rb +1 -0
  83. data/app/models/thredded/user_permissions/moderate/if_moderator_column_true.rb +1 -0
  84. data/app/models/thredded/user_permissions/moderate/none.rb +1 -0
  85. data/app/models/thredded/user_permissions/read/all.rb +1 -0
  86. data/app/models/thredded/user_permissions/write/all.rb +1 -0
  87. data/app/models/thredded/user_permissions/write/none.rb +1 -0
  88. data/app/models/thredded/user_post_notification.rb +2 -1
  89. data/app/models/thredded/user_preference.rb +2 -1
  90. data/app/models/thredded/user_private_topic_read_state.rb +2 -1
  91. data/app/models/thredded/user_topic_follow.rb +3 -2
  92. data/app/models/thredded/user_topic_read_state.rb +2 -1
  93. data/app/notifiers/thredded/base_notifier.rb +1 -1
  94. data/app/notifiers/thredded/email_notifier.rb +1 -0
  95. data/app/policies/thredded/messageboard_group_policy.rb +1 -0
  96. data/app/policies/thredded/messageboard_policy.rb +1 -0
  97. data/app/policies/thredded/post_policy.rb +1 -0
  98. data/app/policies/thredded/private_post_policy.rb +1 -0
  99. data/app/policies/thredded/private_topic_policy.rb +1 -0
  100. data/app/policies/thredded/topic_policy.rb +1 -0
  101. data/app/view_hooks/thredded/all_view_hooks.rb +1 -0
  102. data/app/view_models/thredded/base_topic_view.rb +1 -0
  103. data/app/view_models/thredded/messageboard_group_view.rb +1 -0
  104. data/app/view_models/thredded/post_view.rb +1 -0
  105. data/app/view_models/thredded/posts_page_view.rb +1 -0
  106. data/app/view_models/thredded/private_topic_view.rb +1 -0
  107. data/app/view_models/thredded/private_topics_page_view.rb +1 -0
  108. data/app/view_models/thredded/topic_email_view.rb +1 -0
  109. data/app/view_models/thredded/topic_posts_page_view.rb +1 -0
  110. data/app/view_models/thredded/topic_view.rb +1 -0
  111. data/app/view_models/thredded/topics_page_view.rb +1 -0
  112. data/app/views/thredded/messageboards/index.html.erb +2 -2
  113. data/app/views/thredded/posts_common/actions/_edit.html.erb +2 -1
  114. data/app/views/thredded/private_topics/_header.html.erb +2 -1
  115. data/app/views/thredded/topics/_header.html.erb +2 -1
  116. data/app/views/thredded/topics/index.html.erb +1 -1
  117. data/bin/rails +1 -0
  118. data/bin/rubocop +1 -0
  119. data/config/routes.rb +13 -12
  120. data/db/migrate/20160329231848_create_thredded.rb +75 -66
  121. data/db/upgrade_migrations/20160611094616_upgrade_v0_5_to_v0_6.rb +6 -3
  122. data/db/upgrade_migrations/20160723012349_upgrade_v0_6_to_v0_7.rb +4 -1
  123. data/db/upgrade_migrations/20161019150201_upgrade_v0_7_to_v0_8.rb +4 -1
  124. data/db/upgrade_migrations/20161113161801_upgrade_v0_8_to_v0_9.rb +11 -8
  125. data/db/upgrade_migrations/20170125033319_upgrade_v0_9_to_v0_10.rb +12 -6
  126. data/db/upgrade_migrations/20170312131417_upgrade_thredded_v0_10_to_v0_11.rb +6 -3
  127. data/db/upgrade_migrations/20170420163138_upgrade_thredded_v0_11_to_v0_12.rb +4 -1
  128. data/lib/generators/thredded/install/install_generator.rb +1 -0
  129. data/lib/generators/thredded/install/templates/initializer.rb +1 -0
  130. data/lib/tasks/thredded_tasks.rake +1 -0
  131. data/lib/thredded.rb +7 -0
  132. data/lib/thredded/base_migration.rb +14 -0
  133. data/lib/thredded/collection_to_strings_with_cache_renderer.rb +1 -0
  134. data/lib/thredded/content_formatter.rb +7 -6
  135. data/lib/thredded/database_seeder.rb +1 -0
  136. data/lib/thredded/db_tools.rb +9 -8
  137. data/lib/thredded/email_transformer.rb +1 -0
  138. data/lib/thredded/email_transformer/onebox.rb +1 -0
  139. data/lib/thredded/engine.rb +3 -2
  140. data/lib/thredded/errors.rb +1 -0
  141. data/lib/thredded/formatting_demo_content.rb +1 -0
  142. data/lib/thredded/html_pipeline/at_mention_filter.rb +3 -2
  143. data/lib/thredded/html_pipeline/autolink_filter.rb +1 -0
  144. data/lib/thredded/html_pipeline/kramdown_filter.rb +2 -1
  145. data/lib/thredded/html_pipeline/onebox_filter.rb +2 -1
  146. data/lib/thredded/html_pipeline/wrap_iframes_filter.rb +1 -0
  147. data/lib/thredded/version.rb +2 -1
  148. data/lib/thredded/view_hooks/config.rb +1 -0
  149. data/lib/thredded/view_hooks/renderer.rb +1 -0
  150. metadata +5 -7
  151. data/db/upgrade_migrations/20160410111522_upgrade_v0_2_to_v0_3.rb +0 -63
  152. data/db/upgrade_migrations/20160429222452_upgrade_v0_3_to_v0_4.rb +0 -13
  153. data/db/upgrade_migrations/20160501151908_upgrade_v0_4_to_v0_5.rb +0 -56
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72449d853f031c774bc914127754b165c39212e9
4
- data.tar.gz: 16594c731eba3115e424cf58d3fe687945b0750e
3
+ metadata.gz: dbd4a76e413440eb1929c482f59356da08d89280
4
+ data.tar.gz: 6ace994d8e7fef840df035c2e51d3b4e76231bbf
5
5
  SHA512:
6
- metadata.gz: 32b007d694cc9c51a8262afdf59a92e5d2369ba6e4632e113eba8190cca34e286aa400a667e99b62534625b7e0e6cf51d5ea23afb54d628a7b1218f6e6e6e390
7
- data.tar.gz: fdb3249473023e280f11fd05e00dcc9f21f6b39029bb296377d7da580df00fe8e91a288e94e27ed2cee1663967a589a1fb43f786baa0282684e06eaf709019a2
6
+ metadata.gz: 28b4cd12daa8d8883b3dfb03eabfb7d6f9905610df218fa475e4472244ad829c59fcb539f4a8ea438ec88d0fda0235d81faf97dec4fe36f210056ce0eff8038c
7
+ data.tar.gz: fca695541cfc0437c02cb17bedc40e6058d3b35d1ab48c1cf68554da6c5572a3d17721e4eed0174cd3fc351e514ae3fef55526c970d4f881800f65705511f88b
data/README.md CHANGED
@@ -99,7 +99,7 @@ Then, see the rest of this Readme for more information about using and customizi
99
99
  Add the gem to your Gemfile:
100
100
 
101
101
  ```ruby
102
- gem 'thredded', '~> 0.12.1'
102
+ gem 'thredded', '~> 0.12.2'
103
103
  ```
104
104
 
105
105
  Add the Thredded [initializer] to your parent app by running the install generator.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class AtNotificationExtractor
4
5
  def initialize(post)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class AutofollowUsers
4
5
  def initialize(post)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # Creates a new messageboard and seeds it with a topic.
4
5
  class CreateMessageboard
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class MarkAllRead
4
5
  def self.run(user)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module ModeratePost
4
5
  module_function
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'set'
3
4
 
4
5
  module Thredded
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class NotifyPrivateTopicUsers
4
5
  def initialize(private_post)
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # @api private
4
5
  module NewPostParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # @api private
4
5
  module NewPrivatePostParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # @api private
4
5
  module NewPrivateTopicParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # @api private
4
5
  module NewTopicParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module RenderPreview
4
5
  protected
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class ApplicationController < ::ApplicationController
4
5
  layout :thredded_layout
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class AutocompleteUsersController < Thredded::ApplicationController
4
5
  MAX_RESULTS = 20
@@ -1,10 +1,11 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class MessageboardsController < Thredded::ApplicationController
4
- before_action :thredded_require_login!, only: [:new, :create, :edit, :update]
5
+ before_action :thredded_require_login!, only: %i[new create edit update]
5
6
 
6
- after_action :verify_authorized, except: %i(index)
7
- after_action :verify_policy_scoped, except: %i(new create edit update)
7
+ after_action :verify_authorized, except: %i[index]
8
+ after_action :verify_policy_scoped, except: %i[new create edit update]
8
9
 
9
10
  def index
10
11
  @groups = MessageboardGroupView.grouped(policy_scope(Messageboard.all))
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class ModerationController < Thredded::ApplicationController
4
5
  before_action :thredded_require_login!
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PostPermalinksController < Thredded::ApplicationController
4
5
  def show
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PostPreviewsController < Thredded::ApplicationController
4
5
  include Thredded::RenderPreview
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # A controller for managing {Post}s.
4
5
  class PostsController < Thredded::ApplicationController
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PreferencesController < Thredded::ApplicationController
4
5
  before_action :thredded_require_login!,
@@ -32,9 +33,9 @@ module Thredded
32
33
  :messageboard_auto_follow_topics,
33
34
  :follow_topics_on_mention,
34
35
  :messageboard_follow_topics_on_mention,
35
- messageboard_notifications_for_followed_topics_attributes: %i(notifier_key id messageboard_id enabled),
36
- notifications_for_followed_topics_attributes: %i(notifier_key id enabled),
37
- notifications_for_private_topics_attributes: %i(notifier_key id enabled)
36
+ messageboard_notifications_for_followed_topics_attributes: %i[notifier_key id messageboard_id enabled],
37
+ notifications_for_followed_topics_attributes: %i[notifier_key id enabled],
38
+ notifications_for_private_topics_attributes: %i[notifier_key id enabled]
38
39
  )
39
40
  end
40
41
  end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivatePostPermalinksController < Thredded::ApplicationController
4
5
  before_action :thredded_require_login!
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivatePostPreviewsController < Thredded::ApplicationController
4
5
  include Thredded::RenderPreview
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # A controller for managing {PrivatePost}s.
4
5
  class PrivatePostsController < Thredded::ApplicationController
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivateTopicPreviewsController < Thredded::ApplicationController
4
5
  include Thredded::NewPrivateTopicParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivateTopicsController < Thredded::ApplicationController
4
5
  include Thredded::NewPrivateTopicParams
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class ReadStatesController < Thredded::ApplicationController
4
5
  before_action :thredded_require_login!
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class ThemePreviewsController < Thredded::ApplicationController
4
5
  def show # rubocop:disable Metrics/MethodLength
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class TopicPreviewsController < Thredded::ApplicationController
4
5
  include Thredded::NewTopicParams
@@ -1,19 +1,20 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class TopicsController < Thredded::ApplicationController # rubocop:disable Metrics/ClassLength
4
5
  include Thredded::NewTopicParams
5
6
  include Thredded::NewPostParams
6
7
 
7
8
  before_action :thredded_require_login!,
8
- only: %i(edit new update create destroy follow unfollow)
9
+ only: %i[edit new update create destroy follow unfollow]
9
10
 
10
11
  before_action :use_topic_messageboard,
11
- only: %i(show edit update destroy follow unfollow)
12
+ only: %i[show edit update destroy follow unfollow]
12
13
 
13
14
  after_action :update_user_activity
14
15
 
15
- after_action :verify_authorized, except: %i(search)
16
- after_action :verify_policy_scoped, except: %i(show new create edit update destroy follow unfollow)
16
+ after_action :verify_authorized, except: %i[search]
17
+ after_action :verify_policy_scoped, except: %i[show new create edit update destroy follow unfollow]
17
18
 
18
19
  def index
19
20
  authorize_reading messageboard
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class EditTopicForm
4
5
  include ActiveModel::Model
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PostForm
4
5
  attr_reader :post, :topic
@@ -16,6 +17,7 @@ module Thredded
16
17
  @messageboard = topic.messageboard
17
18
  @topic = topic
18
19
  @post = post ? post : topic.posts.build
20
+ user ||= Thredded::NullUser.new
19
21
 
20
22
  if post_params.include?(:quote_post)
21
23
  post_params[:content] =
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivatePostForm
4
5
  attr_reader :post, :topic
@@ -15,6 +16,7 @@ module Thredded
15
16
  def initialize(user:, topic:, post: nil, post_params: {})
16
17
  @topic = topic
17
18
  @post = post ? post : topic.posts.build
19
+ user ||= Thredded::NullUser.new
18
20
 
19
21
  if post_params.include?(:quote_post)
20
22
  post_params[:content] =
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class PrivateTopicForm
4
5
  include ActiveModel::Model
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class TopicForm
4
5
  include ActiveModel::Model
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class UserPreferencesForm
4
5
  include ActiveModel::Model
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module ApplicationHelper
4
5
  include ::Thredded::UrlsHelper
@@ -1,29 +1,30 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'set'
3
4
  module Thredded
4
5
  module NavHelper
5
6
  USER_NAV_MODERATION_PAGES = Set.new(
6
- %w(
7
+ %w[
7
8
  thredded--pending-moderation
8
9
  thredded--moderation-activity
9
10
  thredded--moderation-history
10
11
  thredded--moderation-users
11
12
  thredded--moderation-user
12
- )
13
+ ]
13
14
  )
14
15
 
15
16
  USER_NAV_PREFERENCES_PAGES = Set.new(
16
- %w(
17
+ %w[
17
18
  thredded--preferences
18
- )
19
+ ]
19
20
  )
20
21
 
21
22
  USER_NAV_PRIVATE_TOPICS_PAGES = Set.new(
22
- %w(
23
+ %w[
23
24
  thredded--new-private-topic
24
25
  thredded--private-topics-index
25
26
  thredded--private-topic-show
26
- )
27
+ ]
27
28
  )
28
29
 
29
30
  def current_page_preferences?
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module RenderHelper
4
5
  # @param collection [Array<T>]
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  module UrlsHelper
4
5
  class << self
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class ActivityUpdaterJob < ::ActiveJob::Base
4
5
  queue_as :default
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class AutoFollowAndNotifyJob < ::ActiveJob::Base
4
5
  queue_as :default
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  class NotifyPrivateTopicUsersJob < ::ActiveJob::Base
4
5
  queue_as :default
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # A base class for Thredded mailer previews.
4
5
  # @abstract
@@ -98,7 +99,7 @@ Additionally, Markdown is extended to support the following:
98
99
  end
99
100
 
100
101
  def mock_user(attr = {})
101
- name = %w(Alice Bob).sample
102
+ name = %w[Alice Bob].sample
102
103
  Thredded.user_class.new(
103
104
  attr.reverse_merge(
104
105
  Thredded.user_name_column => name,
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Thredded
3
4
  # Previews for the PostMailer
4
5
  class PostMailerPreview < BaseMailerPreview
5
6
  def post_notification
6
7
  PostMailer.post_notification(
7
- mock_post(content: mock_content(mention_users: %w(glebm joel))),
8
- %w(glebm@test.com joel@test.com)
8
+ mock_post(content: mock_content(mention_users: %w[glebm joel])),
9
+ %w[glebm@test.com joel@test.com]
9
10
  )
10
11
  end
11
12
  end