From a412e9bede825c074997499550f100b0c92528a5 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Wed, 18 Mar 2015 20:30:42 +0100 Subject: [PATCH] Fix gem load order for all importers https://meta.discourse.org/t/migrating-from-mybb/25563/8 --- script/import_scripts/discuz_x.rb | 3 +-- script/import_scripts/drupal.rb | 3 +-- script/import_scripts/drupal_qa.rb | 3 +-- script/import_scripts/kunena.rb | 3 +-- script/import_scripts/phpbb3.rb | 3 +-- script/import_scripts/vanilla.rb | 2 +- script/import_scripts/vbulletin.rb | 2 +- script/import_scripts/vbulletin_old.rb | 2 +- 8 files changed, 8 insertions(+), 13 deletions(-) diff --git a/script/import_scripts/discuz_x.rb b/script/import_scripts/discuz_x.rb index 6aef9b15e3c..f1232a39ec6 100644 --- a/script/import_scripts/discuz_x.rb +++ b/script/import_scripts/discuz_x.rb @@ -7,9 +7,8 @@ # This script is tested only on Simplified Chinese Discuz! X instances # If you want to import data other than Simplified Chinese, email me. -require File.expand_path(File.dirname(__FILE__) + "/base.rb") - require 'mysql2' +require File.expand_path(File.dirname(__FILE__) + "/base.rb") class ImportScripts::DiscuzX < ImportScripts::Base diff --git a/script/import_scripts/drupal.rb b/script/import_scripts/drupal.rb index 4a455c2042c..36607613505 100644 --- a/script/import_scripts/drupal.rb +++ b/script/import_scripts/drupal.rb @@ -1,6 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + "/base.rb") - require "mysql2" +require File.expand_path(File.dirname(__FILE__) + "/base.rb") class ImportScripts::Drupal < ImportScripts::Base diff --git a/script/import_scripts/drupal_qa.rb b/script/import_scripts/drupal_qa.rb index 6b87f365284..9ce0b556e81 100644 --- a/script/import_scripts/drupal_qa.rb +++ b/script/import_scripts/drupal_qa.rb @@ -1,8 +1,7 @@ +require "mysql2" require File.expand_path(File.dirname(__FILE__) + "/base.rb") require File.expand_path(File.dirname(__FILE__) + "/drupal.rb") -require "mysql2" - class ImportScripts::DrupalQA < ImportScripts::Drupal def categories_query diff --git a/script/import_scripts/kunena.rb b/script/import_scripts/kunena.rb index f5b5e3a4414..8e1f6275b38 100644 --- a/script/import_scripts/kunena.rb +++ b/script/import_scripts/kunena.rb @@ -1,6 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + "/base.rb") - require "mysql2" +require File.expand_path(File.dirname(__FILE__) + "/base.rb") class ImportScripts::Kunena < ImportScripts::Base diff --git a/script/import_scripts/phpbb3.rb b/script/import_scripts/phpbb3.rb index bc0259c7db7..10a0f3c401d 100644 --- a/script/import_scripts/phpbb3.rb +++ b/script/import_scripts/phpbb3.rb @@ -1,6 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + "/base.rb") require "mysql2" - +require File.expand_path(File.dirname(__FILE__) + "/base.rb") class ImportScripts::PhpBB3 < ImportScripts::Base diff --git a/script/import_scripts/vanilla.rb b/script/import_scripts/vanilla.rb index 264cb80eea7..e60fcebca87 100644 --- a/script/import_scripts/vanilla.rb +++ b/script/import_scripts/vanilla.rb @@ -1,5 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + "/base.rb") require "csv" +require File.expand_path(File.dirname(__FILE__) + "/base.rb") class ImportScripts::Vanilla < ImportScripts::Base diff --git a/script/import_scripts/vbulletin.rb b/script/import_scripts/vbulletin.rb index 77fc6119de1..84001c16bd5 100644 --- a/script/import_scripts/vbulletin.rb +++ b/script/import_scripts/vbulletin.rb @@ -1,5 +1,5 @@ -require File.expand_path(File.dirname(__FILE__) + "/base.rb") require 'mysql2' +require File.expand_path(File.dirname(__FILE__) + "/base.rb") require 'htmlentities' class ImportScripts::VBulletin < ImportScripts::Base diff --git a/script/import_scripts/vbulletin_old.rb b/script/import_scripts/vbulletin_old.rb index b2989199d76..94013fb7850 100644 --- a/script/import_scripts/vbulletin_old.rb +++ b/script/import_scripts/vbulletin_old.rb @@ -1,6 +1,6 @@ +require "csv" require File.expand_path(File.dirname(__FILE__) + "/base.rb") require "optparse" -require "csv" class ImportScripts::VBulletinOld < ImportScripts::Base