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

@ -164,7 +164,6 @@ class ImportScripts::Ning < ImportScripts::Base
puts "", "Marked #{suspended} users as suspended."
end
def import_categories
puts "", "Importing categories"
create_categories((["Blog", "Pages", "Photos"] + @discussions_json.map { |d| d["category"] }).uniq.compact) do |name|
@ -179,7 +178,6 @@ class ImportScripts::Ning < ImportScripts::Base
end
end
def import_discussions
puts "", "Importing discussions"
import_topics(@discussions_json)
@ -200,7 +198,7 @@ class ImportScripts::Ning < ImportScripts::Base
import_topics(@pages_json, "Pages")
end
def import_topics(topics_json, default_category=nil)
def import_topics(topics_json, default_category = nil)
topics = 0
posts = 0
total = topics_json.size # number of topics. posts are embedded in the topic json, so we can't get total post count quickly.
@ -398,6 +396,6 @@ class ImportScripts::Ning < ImportScripts::Base
end
end
if __FILE__==$0
if __FILE__ == $0
ImportScripts::Ning.new.perform
end