2017-08-14 13:08:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-21 09:08:33 -04:00
|
|
|
require "rails/generators"
|
|
|
|
require "rails/generators/rails/plugin/plugin_generator"
|
2017-01-16 08:27:51 -05:00
|
|
|
|
|
|
|
module Rails
|
|
|
|
class Engine
|
|
|
|
class Updater
|
|
|
|
class << self
|
|
|
|
def generator
|
|
|
|
@generator ||= Rails::Generators::PluginGenerator.new ["plugin"],
|
2017-08-12 07:31:46 -04:00
|
|
|
{ engine: true }, { destination_root: ENGINE_ROOT }
|
2017-01-16 08:27:51 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def run(action)
|
2020-10-06 17:00:44 -04:00
|
|
|
generator.public_send(action)
|
2017-01-16 08:27:51 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|