Add rubocop to our build. (#5004)

This commit is contained in:
Guo Xiang Tan
2017-07-28 10:20:09 +09:00
committed by GitHub
parent ff4e295c4f
commit 5012d46cbd
871 changed files with 5480 additions and 6056 deletions

View File

@ -59,7 +59,6 @@ class ImportScripts::Muut < ImportScripts::Base
end
end
def import_categories
puts "", "Importing categories"
@ -72,7 +71,6 @@ class ImportScripts::Muut < ImportScripts::Base
end
end
def import_discussions
puts "", "Importing discussions"
@ -81,7 +79,6 @@ class ImportScripts::Muut < ImportScripts::Base
@imported_json['categories'].each do |category|
@imported_json['threads'][category['path']].each do |thread|
next if thread["seed"]["key"] == "skip-this-topic"
@ -96,7 +93,7 @@ class ImportScripts::Muut < ImportScripts::Base
end
# update user display name
if thread["seed"]["author"] && thread["seed"]["author"]["displayname"] != "" && mapped[:user_id] != -1
if thread["seed"]["author"] && thread["seed"]["author"]["displayname"] != "" && mapped[:user_id] != -1
user = User.find_by(id: mapped[:user_id])
if user
user.name = thread["seed"]["author"]["displayname"]
@ -181,6 +178,6 @@ class ImportScripts::Muut < ImportScripts::Base
end
if __FILE__==$0
if __FILE__ == $0
ImportScripts::Muut.new.perform
end