class Tumugi::Command::New::ProjectGenerator

Public Instance Methods

context() click to toggle source
# File lib/tumugi/command/new/project_generator.rb, line 23
def context
  {
    name: name,
    tumugi_version: Tumugi::VERSION,
  }
end
data_dir() click to toggle source
# File lib/tumugi/command/new/project_generator.rb, line 7
def data_dir
  "#{File.expand_path(File.dirname(__FILE__))}/../../data/new/project"
end
dest_dir() click to toggle source
# File lib/tumugi/command/new/project_generator.rb, line 11
def dest_dir
  File.join(options[:path] || '.', name)
end
post_messages() click to toggle source
# File lib/tumugi/command/new/project_generator.rb, line 30
def post_messages
  [
    "",
    "Project template is successfully generated.",
    "Next steps:",
    "",
    name.empty? ? "" : "  $ cd #{name}",
    "  $ bundle install",
    "  $ bundle exec tumugi -f workflow.rb main",
    "",
  ]
end
templates() click to toggle source
# File lib/tumugi/command/new/project_generator.rb, line 15
def templates
  [
    [ "Gemfile.erb", "Gemfile" ],
    [ "workflow.rb.erb", "workflow.rb" ],
    [ "tumugi_config.rb.erb", "tumugi_config.rb" ],
  ]
end