Class: Gemsmith::CLI::Commands::Build

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

Overview

Handles the build action.

Constant Summary collapse

BUILDERS =

Order is important.

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

Instance Method Summary collapse

Constructor Details

#initialize(builders: BUILDERS) ⇒ Build

Returns a new instance of Build.



98
99
100
101
# File 'lib/gemsmith/cli/commands/build.rb', line 98

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

Instance Method Details

#callObject



103
104
105
106
107
# File 'lib/gemsmith/cli/commands/build.rb', line 103

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