Class: Spline::SetupCommand
- Inherits:
-
Command
- Object
- Thor::Group
- Command
- Spline::SetupCommand
show all
- Defined in:
- lib/spline/commands/concrete_commands/setup_command.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
alias, command_name, source_root, usage
Class Method Details
.description ⇒ Object
21
22
23
|
# File 'lib/spline/commands/concrete_commands/setup_command.rb', line 21
def self.description
"generates necessary folders and a couple of sample files"
end
|
Instance Method Details
#setup ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/spline/commands/concrete_commands/setup_command.rb', line 7
def setup
processes_dir_exists = File.directory?("#{Dir.pwd}/process_definition/processes")
steps_dir_exists = File.directory?("#{Dir.pwd}/process_definition/steps")
if processes_dir_exists && steps_dir_exists
say("spline is already setup")
return
end
template('templates/samples/my_first_step.tt', "process_definition/steps/example/my_first_step.rb")
template('templates/samples/my_second_step.tt', "process_definition/steps/example/my_second_step.rb")
template('templates/samples/my_process.tt', "process_definition/processes/my_process.rb")
end
|