A platform for community discussion. Free, open, simple.
fix the build
Régis Hanol9ff2d540baf6
diff --git a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6index c29e12d9e4a..9168834b920 100644--- a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6+++ b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6@@ -197,6 +197,7 @@ const rule = {state.push('poll_close', 'div', -1);state.push('poll_close', 'div', -1);+ state.push('poll_close', 'div', -1);}};diff --git a/plugins/poll/lib/polls_validator.rb b/plugins/poll/lib/polls_validator.rbindex 2321f7f0af4..26c8a9c5b01 100644--- a/plugins/poll/lib/polls_validator.rb+++ b/plugins/poll/lib/polls_validator.rb@@ -7,9 +7,7 @@ module DiscoursePolldef validate_pollspolls = {}- extracted_polls = DiscoursePoll::Poll::extract(@post.raw, @post.topic_id, @post.user_id)-- extracted_polls.each do |poll|+ DiscoursePoll::Poll::extract(@post.raw, @post.topic_id, @post.user_id).each do |poll|# polls should have a unique namereturn false unless unique_poll_name?(polls, poll)diff --git a/plugins/poll/lib/votes_updater.rb b/plugins/poll/lib/votes_updater.rbindex f8a9beac197..ae705d51135 100644--- a/plugins/poll/lib/votes_updater.rb+++ b/plugins/poll/lib/votes_updater.rb@@ -6,7 +6,7 @@ module DiscoursePoll.pluck(:post_id)post_ids.each do |post_id|- DistributedMutex.synchronize("#{DiscoursePoll::MUTEX_PREFIX}-#{post_id}") do+ DistributedMutex.synchronize("discourse_poll-#{post_id}") dopost = Post.find_by(id: post_id)update_votes(post, source_user, target_user) if postenddiff --git a/plugins/poll/plugin.rb b/plugins/poll/plugin.rbindex f440e33dbce..82efa7fd439 100644--- a/plugins/poll/plugin.rb+++ b/plugins/poll/plugin.rb@@ -171,7 +171,7 @@ after_initialize docooked = PrettyText.cook(raw, topic_id: topic_id, user_id: user_id)Nokogiri::HTML(cooked).css("div.poll").map do |p|- poll = { "options" => [], "voters" => 0 }+ poll = { "options" => [], "voters" => 0, "name" => DiscoursePoll::DEFAULT_POLL_NAME }# attributesp.attributes.values.each do |attribute|diff --git a/plugins/poll/spec/lib/pretty_text_spec.rb b/plugins/poll/spec/lib/pretty_text_spec.rbindex fedc70eb986..e01a32d5654 100644--- a/plugins/poll/spec/lib/pretty_text_spec.rb+++ b/plugins/poll/spec/lib/pretty_text_spec.rb@@ -106,13 +106,10 @@ describe PrettyText do<div class="poll-info"><p><span class="info-number">0</span>- <span class="info-text">voters</span>+ <span class="info-label">voters</span></p></div></div>- <div class="poll-buttons">- <a title="Display the poll results">Show results</a>- </div></div>MD