mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
Add rubocop to our build. (#5004)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user