Class: Rake::Pipeline::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rake-pipeline/cli.rb

Instance Method Summary collapse

Instance Method Details

#buildObject


12
13
14
15
16
17
18
19
20
21
# File 'lib/rake-pipeline/cli.rb', line 12

def build
  if options[:pretend]
    project.output_files.each do |file|
      say_status :create, relative_path(file)
    end
  else
    options[:clean] ? project.clean : project.cleanup_tmpdir
    project.invoke
  end
end

#cleanObject


25
26
27
28
29
30
31
32
33
# File 'lib/rake-pipeline/cli.rb', line 25

def clean
  if options[:pretend]
    project.files_to_clean.each do |file|
      say_status :remove, relative_path(file)
    end
  else
    project.clean
  end
end

#serverObject


36
37
38
39
# File 'lib/rake-pipeline/cli.rb', line 36

def server
  require "rake-pipeline/server"
  Rake::Pipeline::Server.new.start
end