Module: JekyllImport::Importers::DrupalCommon

Included in:
Drupal6, Drupal7
Defined in:
lib/jekyll-import/importers/drupal_common.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#aliases_query(_prefix) ⇒ Object



133
134
135
136
137
138
139
# File 'lib/jekyll-import/importers/drupal_common.rb', line 133

def aliases_query(_prefix)
  # Make sure you implement the query returning "alias" as the column name
  # for the URL aliases. See the Drupal 6 importer for an example. The
  # alias field is called 'dst' but we alias it to 'alias', to follow
  # Drupal 7's column names.
  raise "The importer you are trying to use does not implement the get_aliases_query() method."
end

#build_query(_prefix, _types) ⇒ Object



129
130
131
# File 'lib/jekyll-import/importers/drupal_common.rb', line 129

def build_query(_prefix, _types)
  raise "The importer you are trying to use does not implement the get_query() method."
end

#post_data(_sql_post_data) ⇒ Object



141
142
143
# File 'lib/jekyll-import/importers/drupal_common.rb', line 141

def post_data(_sql_post_data)
  raise "The importer you are trying to use does not implement the get_query() method."
end

#validate(options) ⇒ Object



145
146
147
148
149
150
151
# File 'lib/jekyll-import/importers/drupal_common.rb', line 145

def validate(options)
  %w(dbname user).each do |option|
    if options[option].nil?
      abort "Missing mandatory option --#{option}."
    end
  end
end