Sha256: 1d726d351d61ca6b97784bbbbdac4067856a0366dc44f45ed51a26ee12232933

Contents?: true

Size: 712 Bytes

Versions: 19

Compression:

Stored size: 712 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

      after_bundle do
        git :init
        git add: "."
        git commit: %{ -m 'Initial commit' -q }
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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