Sha256: 7229a5d351e7bc09f12ab9f53ed34ce83884d5fd3472269d81340c23a9bcc643

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 KB

Contents

module Foobara
  module Generators
    module EmptyRubyProjectGenerator
      module Generators
        class ProjectGenerator < Foobara::FilesGenerator
          class << self
            def manifest_to_generator_classes(manifest)
              case manifest
              when ProjectConfig
                [
                  Generators::BinConsoleGenerator,
                  Generators::BootFinishGenerator,
                  Generators::ChangelogGenerator,
                  Generators::CiYamlGenerator,
                  Generators::GemspecGenerator,
                  Generators::GitignoreGenerator,
                  Generators::InitialModuleGenerator,
                  Generators::InitialSpecGenerator,
                  Generators::LibGenerator,
                  Generators::LicenseGenerator,
                  Generators::VersionGenerator
                ]
              else
                # :nocov:
                raise "Not sure how build a generator for a #{manifest}"
                # :nocov:
              end
            end
          end

          alias project_config relevant_manifest

          def templates_dir
            "#{__dir__}/../../templates"
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foobara-empty-ruby-project-generator-0.0.11 src/generators/project_generator.rb
foobara-empty-ruby-project-generator-0.0.10 src/generators/project_generator.rb