Sha256: 9feb17e58b0e7daed415a7702a9c6377f07e29f6f0da8c9adece3a60ab0da019

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

module Specimen
  module Generator
    class ProjectRootGenerator < ProjectGeneratorBase
      DEFAULT_DIRECTORIES = %w[config lib tmp].freeze
      TEMPLATES_DIR = 'project/templates/root'
      TEMPLATES = %w[
        .gemrc
        .gitignore
        .rubocop.yml
        Gemfile
        README.md
        config/specimen.yml
      ].freeze

      def execute!
        perform
      end

      no_commands do
        def perform
          create_directories(DEFAULT_DIRECTORIES)
          create_files_by_templates(TEMPLATES_DIR, TEMPLATES)

          true
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
specimen-0.0.3.alpha lib/specimen/generator/project/project_root_generator.rb