Update Rubocop to 0.60

This commit is contained in:
Régis Hanol
2018-12-04 10:48:16 +01:00
parent 72bd388ff7
commit 3c9c95ac83
23 changed files with 141 additions and 126 deletions

View File

@@ -77,10 +77,10 @@ class ImportScripts::Nabble < ImportScripts::Base
create_users(users, total: total_count, offset: offset) do |row|
{
id: row["user_id"],
email: row["email"] || (SecureRandom.hex << "@domain.com"),
created_at: Time.zone.at(@td.decode(row["joined"])),
name: row["name"],
id: row["user_id"],
email: row["email"] || (SecureRandom.hex << "@domain.com"),
created_at: Time.zone.at(@td.decode(row["joined"])),
name: row["name"],
post_create_action: proc do |user|
import_avatar(user, row["user_id"])
end
@@ -151,13 +151,15 @@ class ImportScripts::Nabble < ImportScripts::Base
raw = process_content(raw)
raw = process_attachments(raw, t['node_id'])
{ id: t['node_id'],
{
id: t['node_id'],
title: t['subject'],
user_id: user_id_from_imported_user_id(t["owner_id"]) || Discourse::SYSTEM_USER_ID,
created_at: Time.zone.at(@td.decode(t["when_created"])),
category: CATEGORY_ID,
raw: raw,
cook_method: Post.cook_methods[:regular] }
cook_method: Post.cook_methods[:regular]
}
end
end
end