Class: CubaGenie::MyCLI

Inherits:
Thor
  • Object
show all
Includes:
Content
Defined in:
lib/cuba_genie.rb

Constant Summary

Constants included from Content

Content::ACCEPTANCE_TEST_FILE_CONTENT, Content::APP_FILE_CONTENT, Content::BOOTSTRAP_CSS, Content::BOOTSTRAP_JS, Content::FUNCTIONAL_TEST_FILE_CONTENT, Content::GEM_FILE_CAPYBARA_CONTENT, Content::GEM_FILE_CONTENT, Content::HOME_VIEW_CONTENT, Content::LAYOUT_VIEW_CONTENT, Content::MINITEST_REPORTERS, Content::RACK_FILE_CONTENT, Content::RAKE_FILE_CONTENT, Content::TEST_HELPER_CONTENT_CAPYBARA, Content::TEST_HELPER_CONTENT_CORE

Instance Method Summary collapse

Instance Method Details

#new(project_name) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cuba_genie.rb', line 21

def new(project_name)
  @cmds = CommandList.new
  puts "your project name is '#{project_name}'"
  minitest = want_minitest?
  reporter = (minitest ? choose_reporter : 'n')
  capybara = (minitest ? want_capybara? : false)
  @cmds.add_command CubaSetup.new(project_name: project_name, minitest: minitest, capybara: capybara)
  @cmds.add_command ViewsSetup.new(project_name: project_name, bootstrap_version: choose_bootstrap_version)
  @cmds.add_command MinitestSetup.new(project_name: project_name, reporter: reporter, capybara_setup: capybara) if minitest
  
  # allow users to add their own commands
  run_extensions

  puts closing_message(project_name) if @cmds.execute
end