lib/minke/generators/processor.rb in minke-1.9.0 vs lib/minke/generators/processor.rb in minke-1.9.1

- old
+ new

@@ -2,10 +2,19 @@ module Generators ## # Process handles the creation of new projects from a generator template. class Processor + def self.load_generators + puts '# Loading installed generators' + Gem::Specification.find_all.each do |spec| + if spec.metadata != nil && spec.metadata['entrypoint'] != nil + require spec.metadata['entrypoint'] + end + end + end + def initialize variables, docker_runner @variables = variables @docker_runner = docker_runner end @@ -101,18 +110,9 @@ ## # def local_gems Gem::Specification.sort_by{ |g| [g.name.downcase, g.version] }.group_by{ |g| g.name } - end - - def load_generators - puts '# Loading installed generators' - Gem::Specification.find_all.each do |spec| - if spec.metadata != nil && spec.metadata['entrypoint'] != nil - require spec.metadata['entrypoint'] - end - end end def get_generator generator config = Minke::Generators.get_registrations.select { |c| c.name == generator}.first if config == nil