Class: Rubysmith::CLI::Commands::Build

Inherits:
Sod::Command
  • Object
show all
Defined in:
lib/rubysmith/cli/commands/build.rb

Overview

Stores table of contents root path.

Constant Summary collapse

BUILDERS =

Order is important.

[
  Builders::Init,
  Builders::Core,
  Builders::Version,
  Builders::Documentation::Readme,
  Builders::Documentation::Citation,
  Builders::Documentation::License,
  Builders::Documentation::Version,
  Builders::Git::Setup,
  Builders::Git::Ignore,
  Builders::Git::Safe,
  Builders::Bundler,
  Builders::Rake::Binstub,
  Builders::Rake::Configuration,
  Builders::Console,
  Builders::CircleCI,
  Builders::Setup,
  Builders::GitHub::Template,
  Builders::GitHub::Funding,
  Builders::GitHub::CI,
  Builders::Guard,
  Builders::Reek,
  Builders::RSpec::Binstub,
  Builders::RSpec::Context,
  Builders::RSpec::Helper,
  Builders::Caliber,
  Builders::DevContainer::Dockerfile,
  Builders::DevContainer::Compose,
  Builders::DevContainer::Configuration,
  Builders::Docker::Build,
  Builders::Docker::Console,
  Builders::Docker::Entrypoint,
  Builders::Docker::File,
  Builders::Docker::Ignore,
  Extensions::Bundler,
  Extensions::Pragmater,
  Extensions::Tocer,
  Extensions::Rubocop,
  Builders::Git::Commit
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(builders: BUILDERS) ⇒ Build

Returns a new instance of Build.



95
96
97
98
# File 'lib/rubysmith/cli/commands/build.rb', line 95

def initialize(builders: BUILDERS, **)
  super(**)
  @builders = builders
end

Instance Method Details

#callObject



100
101
102
103
104
# File 'lib/rubysmith/cli/commands/build.rb', line 100

def call
  log_info "Building project skeleton: #{settings.project_name}..."
  builders.each { |builder| builder.new(settings:, logger:).call }
  log_info "Project skeleton complete!"
end