From e88c66c92c50e85961108c6b19e3ec844e1bb0a7 Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 26 Apr 2019 18:37:58 +0200 Subject: [PATCH] Dont use faker gem on simulate successful proposal rake --- lib/tasks/proposal_actions.rake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/tasks/proposal_actions.rake b/lib/tasks/proposal_actions.rake index f246cd73a..fc914a8b5 100644 --- a/lib/tasks/proposal_actions.rake +++ b/lib/tasks/proposal_actions.rake @@ -411,9 +411,8 @@ namespace :proposal_actions do goal_votes = Setting["votes_for_proposal_success"].to_f cached_votes_up = 0 - tags = Faker::Lorem.words(25) author = User.all.sample - description = "

#{Faker::Lorem.paragraphs.join('

')}

" + description = "

This is an example of a successful proposal with an ideal progress.

" proposal = Proposal.create!(author: author, title: Faker::Lorem.sentence(3).truncate(60), question: Faker::Lorem.sentence(3) + "?", @@ -422,13 +421,12 @@ namespace :proposal_actions do external_url: Faker::Internet.url, description: description, created_at: Time.now - expected_supports.length.days, - tag_list: tags.sample(3).join(","), + tag_list: "Example", geozone: Geozone.all.sample, skip_map: "1", terms_of_service: "1", published_at: Time.now - expected_supports.length.days) - expected_supports.each_with_index do |supports, day_offset| supports = (supports * goal_votes / votes_count).ceil cached_votes_up += supports