Class: Spline::NewCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/spline/commands/concrete_commands/new_command.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

alias, command_name, source_root

Class Method Details

.descriptionObject



20
21
22
# File 'lib/spline/commands/concrete_commands/new_command.rb', line 20

def self.description
  "generates a project skeleton"
end

.usageObject



24
25
26
# File 'lib/spline/commands/concrete_commands/new_command.rb', line 24

def self.usage
  "new NAME"
end

Instance Method Details

#generate_gemfileObject



9
10
11
# File 'lib/spline/commands/concrete_commands/new_command.rb', line 9

def generate_gemfile
  template('templates/configs/gemfile.tt', "#{name}/Gemfile")
end

#setup_projectObject



13
14
15
16
17
18
# File 'lib/spline/commands/concrete_commands/new_command.rb', line 13

def setup_project
  template('templates/samples/my_first_step.tt', "#{name}/process_definition/steps/example/my_first_step.rb")
  template('templates/samples/my_second_step.tt', "#{name}/process_definition/steps/example/my_second_step.rb")
  template('templates/samples/my_process.tt', "#{name}/process_definition/processes/my_process.rb")
  say("spline is setup, don't forget to cd into #{name}")
end