Module: Buildless

Defined in:
lib/buildless-app.rb,
lib/buildless/version.rb,
lib/buildless/rails_app.rb,
lib/buildless/gem_version.rb,
lib/buildless/cli/processor.rb,
lib/buildless/cli/fetch_template.rb

Defined Under Namespace

Modules: Cli Classes: GemVersion, RailsApp

Constant Summary collapse

RailsNotInstalled =
Class.new(StandardError)
VERSION =
'0.0.7'
RAILS_VERSION =
'7.1.3.2'

Class Method Summary collapse

Class Method Details

.apply(template) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/buildless-app.rb', line 18

def apply(template)
  ::Buildless::GemVersion.validate!

  verify_rails_installation
  generate_project(template)
  generate_files(template['files'])
  run_commands(template['commands'])
  clone_files(template['clones'])
  inject_code(template['inject_code'])
  append_code(template['append_code'])
  update_files(template['gsub'])

  puts 'Time for coding! 🚀'
end