Class: ThemeJuice::Commands::Init

Inherits:
ThemeJuice::Command show all
Defined in:
lib/theme-juice/commands/init.rb

Instance Attribute Summary

Attributes inherited from Task

#tasks

Instance Method Summary collapse

Methods inherited from ThemeJuice::Command

#execute, #unexecute

Methods inherited from Task

#execute, #runner, #unexecute

Constructor Details

#initialize(opts = {}) ⇒ Init

Returns a new instance of Init.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/theme-juice/commands/init.rb', line 7

def initialize(opts = {})
  super

  init_project

  runner do |tasks|
    tasks << Tasks::InitConfirm.new
    tasks << Tasks::VMBox.new
    tasks << Tasks::VMPlugins.new
    tasks << Tasks::VMCustomfile.new
    tasks << Tasks::Landrush.new
    tasks << Tasks::ForwardPorts.new
    tasks << Tasks::VMProvision.new if @project.vm_provision
    tasks << Tasks::InitSuccess.new
  end
end

Instance Method Details

#init_projectObject



24
25
26
27
28
29
# File 'lib/theme-juice/commands/init.rb', line 24

def init_project
  @project.vm_provision = @opts.fetch("vm_provision") { false }
  @project.vm_root
  @project.vm_location
  @project.vm_srv
end