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. rubocop:todo Metrics/CollectionLiteralLength

[
  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,
  Builders::Console,
  Builders::CircleCI,
  Builders::Setup,
  Builders::GitHub,
  Builders::GitHubCI,
  Builders::Guard,
  Builders::Reek,
  Builders::RSpec::Binstub,
  Builders::RSpec::Context,
  Builders::RSpec::Helper,
  Builders::Caliber,
  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.



81
82
83
84
# File 'lib/rubysmith/cli/commands/build.rb', line 81

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

Instance Method Details

#callObject



86
87
88
89
90
# File 'lib/rubysmith/cli/commands/build.rb', line 86

def call
  log_info "Building project skeleton: #{input.project_name}..."
  builders.each { |builder| builder.call input }
  log_info "Project skeleton complete!"
end