# frozen_string_literal: true
require 'rails/generators/active_record'
class InstallGenerator < ActiveRecord::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def setup_initializer
    template 'mse_router_info.yml', 'config/mse_router_info.yml'
    copy_file 'microservices_engine.rb',
              'config/initializers/microservices_engine.rb'
    generate 'migration', 'CreateMicroservicesEngineConnection name:string object:string url:string'
  end
end

# frozen_string_literal: true
require 'rails/generators/active_record'
class InstallGenerator < ActiveRecord::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def setup_initializer
    template 'mse_router_info.yml', 'config/mse_router_info.yml'
    copy_file 'microservices_engine.rb',
              'config/initializers/microservices_engine.rb'
    generate 'migration', 'CreateMicroservicesEngineConnection name:string object:string url:string'
    open('.gitignore') do |ignore|
      ignore.puts('config')
    end
  end
end

Install generator adds config yml to project gitignore
Install generator adds config yml to project gitignore
