Class: Gantree::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gantree/cli.rb,
lib/gantree/cli/help.rb

Defined Under Namespace

Classes: Help

Instance Method Summary collapse

Instance Method Details

#buildObject



75
76
77
78
# File 'lib/gantree/cli.rb', line 75

def build
  docker = Gantree::Docker.new(Gantree::Config.merge_defaults(options))
  docker.build
end

#create(app) ⇒ Object



47
48
49
# File 'lib/gantree/cli.rb', line 47

def create app
  Gantree::Create.new(app, Gantree::Config.merge_defaults(options)).run
end

#delete(app) ⇒ Object



62
63
64
# File 'lib/gantree/cli.rb', line 62

def delete app
  Gantree::Delete.new(app, Gantree::Config.merge_defaults(options)).run
end

#deploy(name) ⇒ Object



22
23
24
25
26
# File 'lib/gantree/cli.rb', line 22

def deploy name
  opts = Gantree::Config.merge_defaults(options)
  opts = Gantree::Base.check_for_updates(opts)
  Gantree::Deploy.new(name,opts).run 
end

#init(image) ⇒ Object



33
34
35
# File 'lib/gantree/cli.rb', line 33

def init image
  Gantree::Init.new(image, options).run
end

#pushObject



85
86
87
# File 'lib/gantree/cli.rb', line 85

def push
  Gantree::Docker.new(Gantree::Config.merge_defaults(options)).push
end

#restart(app) ⇒ Object



67
68
69
# File 'lib/gantree/cli.rb', line 67

def restart app
  Gantree::App.new(app, Gantree::Config.merge_defaults(options)).restart
end

#ship(server) ⇒ Object



105
106
107
108
109
110
111
112
113
# File 'lib/gantree/cli.rb', line 105

def ship server
  opts = Gantree::Config.merge_defaults(options)
  opts = Gantree::Base.check_for_updates(opts)
  docker = Gantree::Docker.new(opts)
  docker.pull
  docker.build
  docker.push
  Gantree::Deploy.new(server,opts).run
end

#tagObject



90
91
92
# File 'lib/gantree/cli.rb', line 90

def tag
  puts Gantree::Base::new.tag
end

#update(app) ⇒ Object



56
57
58
# File 'lib/gantree/cli.rb', line 56

def update app
  Gantree::Update.new(app, Gantree::Config.merge_defaults(options)).run
end

#versionObject



117
118
119
# File 'lib/gantree/cli.rb', line 117

def version
  puts VERSION
end