diff --git a/plugins/spaminator/Gemfile b/plugins/spaminator/Gemfile index 169b87f..2f71694 100644 --- a/plugins/spaminator/Gemfile +++ b/plugins/spaminator/Gemfile @@ -1 +1 @@ -gem "progressbar" +gem "ruby-progressbar" diff --git a/plugins/spaminator/lib/spaminator_plugin/spaminator.rb b/plugins/spaminator/lib/spaminator_plugin/spaminator.rb index d3f3d4f..e5aba0d 100644 --- a/plugins/spaminator/lib/spaminator_plugin/spaminator.rb +++ b/plugins/spaminator/lib/spaminator_plugin/spaminator.rb @@ -72,14 +72,14 @@ class SpaminatorPlugin::Spaminator self.class.log("Starting to process all comments") comments = comments_to_process total = comments.count - pbar = ProgressBar.new("☢ Comments", total) if Rails.env.development? + pbar = ProgressBar.create(title: "☢ Comments", total: total, format: '%t: |%B| %E') if Rails.env.development? comments.each do |comment| begin process_comment(comment) rescue register_fail(:comments, comment) end - pbar.inc if Rails.env.development? + pbar.increment if Rails.env.development? end @report.processed_comments = total pbar.finish if Rails.env.development? @@ -90,11 +90,11 @@ class SpaminatorPlugin::Spaminator self.class.log("Starting to process all people") people = people_to_process total = people.count - pbar = ProgressBar.new("☢ People", total) if Rails.env.development? + pbar = ProgressBar.create(title: "☢ People", total: total, format: '%t: |%B| %E') if Rails.env.development? people.find_each do |person| process_person_by_comments(person) process_person_by_no_network(person) - pbar.inc if Rails.env.development? + pbar.increment if Rails.env.development? end @report.processed_people = total pbar.finish if Rails.env.development? -- libgit2 0.21.2