Alright! I’ve gotten this working by using the following:
@parser.posts.each do |id, p|
p[:author_username] = "#{p[:author_name]}" unless p[:author_username]
p[:author_email] = "#{p[:author_username]}@disqus.sucks" unless p[:author_email]
next if p[:is_spam] == 'true' || p[:is_deleted] == 'true'
puts "name: #{p[:author_name]}, username: #{p[:author_username]}, email: #{p[:author_email]}"
by_email[p[:author_email]] = { name: p[:author_name], username: p[:author_username] }
end
@parser.threads.each do |id, t|
t[:author_username] = "#{t[:author_name]}" unless t[:author_username]
t[:author_email] = "#{t[:author_username]}@disqus.sucks" unless t[:author_email]
by_email[t[:author_email]] = { name: t[:author_name], username: t[:author_username] }
end
I also have frozen_string_literal: false set.