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



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

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

#create(app) ⇒ Object



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

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

#delete(app) ⇒ Object



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

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

#deploy(name) ⇒ Object



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

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

#init(image) ⇒ Object



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

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

#pushObject



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

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

#restart(app) ⇒ Object



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

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

#ship(server) ⇒ Object



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

def ship server
  opts = merge_defaults(options)
  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



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

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

#update(app) ⇒ Object



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

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

#versionObject



115
116
117
# File 'lib/gantree/cli.rb', line 115

def version
  puts VERSION
end