mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-22 05:52:11 +08:00
This is similar to converters: We allow directories to structure files within the importer directory, but try to keep the namespace the same. Currently the restructured namespaces look like this: * `Migrations::Converters::Discourse` * migrations/lib/converters/discourse/steps * migrations/lib/converters/discourse/utilities * `Migrations::Importer` * migrations/lib/importer/name_finder * `Migrations::Importer::Steps` * migrations/lib/importer/steps/badges * migrations/lib/importer/steps/categories * migrations/lib/importer/steps/groups * migrations/lib/importer/steps/settings * migrations/lib/importer/steps/tags * migrations/lib/importer/steps/topics * migrations/lib/importer/steps/users
16 lines
356 B
Ruby
Vendored
16 lines
356 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module Migrations
|
|
module Importer
|
|
module Steps
|
|
end
|
|
|
|
def self.execute(options)
|
|
config_path = File.join(::Migrations.root_path, "config", "importer.yml")
|
|
config = YAML.load_file(config_path, symbolize_names: true)
|
|
|
|
executor = Executor.new(config, options)
|
|
executor.start
|
|
end
|
|
end
|
|
end
|