Sha256: ba27c3e8af5ae5e05819f47235c0f58c5a5639fc02bf42e504852bb501e20299

Contents?: true

Size: 592 Bytes

Versions: 5

Compression:

Stored size: 592 Bytes

Contents

require "rails/generators"
require "rails/generators/rails/app/app_generator"
require "inquirer"
require "potassium/recipe"

module Potassium
  class ApplicationGenerator < Rails::Generators::AppGenerator
    class << self
      attr_accessor :cli_options
    end

    def finish_template
      require_relative "../helpers/template-dsl"
      TemplateDSL.extend_dsl(self, source_path: __FILE__)
      template_location = File.expand_path('../templates/application.rb', File.dirname(__FILE__))
      instance_eval File.read(template_location), template_location
      super
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
potassium-3.0.0 lib/potassium/generators/application.rb
potassium-2.3.0 lib/potassium/generators/application.rb
potassium-2.2.0 lib/potassium/generators/application.rb
potassium-2.1.0 lib/potassium/generators/application.rb
potassium-2.0.0 lib/potassium/generators/application.rb