FIX: Ning json files sometimes have an extra ] at the end

This commit is contained in:
Neil Lalonde 2015-03-23 13:52:53 -04:00
parent 8513045381
commit 0124187e3a

View file

@ -55,6 +55,8 @@ class ImportScripts::Ning < ImportScripts::Base
arg.gsub!(/^\(/, "") # content of file is surround by ( ) arg.gsub!(/^\(/, "") # content of file is surround by ( )
arg.gsub!(/\)$/, "") arg.gsub!(/\)$/, "")
arg.gsub!(/\]\]$/, "]") # there can be an extra ] at the end
arg.gsub!(/\}\{/, "},{") # missing commas sometimes! arg.gsub!(/\}\{/, "},{") # missing commas sometimes!
arg.gsub!("}]{", "},{") # surprise square brackets arg.gsub!("}]{", "},{") # surprise square brackets