mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Update Rubocop to 0.60
This commit is contained in:
parent
72bd388ff7
commit
3c9c95ac83
23 changed files with 141 additions and 126 deletions
|
@ -114,15 +114,15 @@ class ImportScripts::MyAskBot < ImportScripts::Base
|
|||
|
||||
create_users(users, total: total_count, offset: offset) do |user|
|
||||
{
|
||||
id: user["id"],
|
||||
username: user["username"],
|
||||
email: user["email"] || (SecureRandom.hex << "@domain.com"),
|
||||
admin: user["is_staff"],
|
||||
created_at: Time.zone.at(@td.decode(user["date_joined"])),
|
||||
id: user["id"],
|
||||
username: user["username"],
|
||||
email: user["email"] || (SecureRandom.hex << "@domain.com"),
|
||||
admin: user["is_staff"],
|
||||
created_at: Time.zone.at(@td.decode(user["date_joined"])),
|
||||
last_seen_at: Time.zone.at(@td.decode(user["last_seen"])),
|
||||
name: user["real_name"],
|
||||
website: user["website"],
|
||||
location: user["location"],
|
||||
name: user["real_name"],
|
||||
website: user["website"],
|
||||
location: user["location"],
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -322,7 +322,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
|||
create_categories(parent_categories) do |category|
|
||||
{
|
||||
id: category["node_id"],
|
||||
name: category["name"],
|
||||
name: category["name"],
|
||||
position: category["position"],
|
||||
post_create_action: lambda do |record|
|
||||
after_category_create(record, category)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue