Class: ThemeJuice::Commands::Create

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

Constant Summary collapse

TEMPLATES =
{
  "themejuice/sprout"   => "[email protected]:ezekg/theme-juice-starter.git",
  "wordpress/wordpress" => "[email protected]:WordPress/WordPress.git",
  "other (specify)"     => nil,
  "none"                => false
}

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 = {}) ⇒ Create

Returns a new instance of Create.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/theme-juice/commands/create.rb', line 14

def initialize(opts = {})
  super

  init_project

  runner do |tasks|
    tasks << Tasks::CreateConfirm.new
    tasks << Tasks::Location.new
    tasks << Tasks::Template.new
    tasks << Tasks::VMBox.new
    tasks << Tasks::VMPlugins.new
    tasks << Tasks::VMLocation.new
    tasks << Tasks::VMCustomfile.new
    tasks << Tasks::Database.new
    if @env.nginx
      tasks << Tasks::Nginx.new
    else
      tasks << Tasks::Apache.new
    end
    if @project.no_env
      tasks << Tasks::WPConfig.new
    else
      tasks << Tasks::DotEnv.new
    end
    tasks << Tasks::Landrush.new
    tasks << Tasks::ForwardPorts.new
    tasks << Tasks::SyncedFolder.new
    tasks << Tasks::DNS.new
    tasks << Tasks::WPCLI.new
    tasks << Tasks::Repo.new
    tasks << Tasks::VMProvision.new
    tasks << Tasks::ImportDatabase.new
    tasks << Tasks::CreateSuccess.new
  end
end