Sha256: b2e91e1816eee9104ceeff37ea685a58049057af850f29c7515d45345e982b86

Contents?: true

Size: 625 Bytes

Versions: 24

Compression:

Stored size: 625 Bytes

Contents

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

class Rails::AppBuilder
  include Rails::ActionMethods
end

module Potassium
  class RecipeGenerator < Rails::Generators::NamedBase
    class << self
      attr_accessor :cli_options
    end

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
potassium-7.2.0 lib/potassium/generators/recipe.rb
potassium-7.1.0 lib/potassium/generators/recipe.rb
potassium-7.0.0 lib/potassium/generators/recipe.rb
potassium-6.7.0 lib/potassium/generators/recipe.rb
potassium-6.6.0 lib/potassium/generators/recipe.rb
potassium-6.5.0 lib/potassium/generators/recipe.rb
potassium-6.4.0 lib/potassium/generators/recipe.rb
potassium-6.3.0 lib/potassium/generators/recipe.rb
potassium-6.2.0 lib/potassium/generators/recipe.rb
potassium-6.1.0 lib/potassium/generators/recipe.rb
potassium-6.0.0 lib/potassium/generators/recipe.rb
potassium-5.2.3 lib/potassium/generators/recipe.rb
potassium-5.2.2 lib/potassium/generators/recipe.rb
potassium-5.2.1 lib/potassium/generators/recipe.rb
potassium-5.2.0 lib/potassium/generators/recipe.rb
potassium-5.1.4 lib/potassium/generators/recipe.rb
potassium-5.1.3 lib/potassium/generators/recipe.rb
potassium-5.1.2 lib/potassium/generators/recipe.rb
potassium-5.1.1 lib/potassium/generators/recipe.rb
potassium-3.0.0 lib/potassium/generators/recipe.rb