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



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

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

#create(app) ⇒ Object



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

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

#delete(app) ⇒ Object



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

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

#deploy(name) ⇒ Object



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

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

#init(image) ⇒ Object



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

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

#pushObject



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

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

#restart(app) ⇒ Object



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

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

#ship(server) ⇒ Object



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

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



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

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

#update(app) ⇒ Object



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

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

#versionObject



113
114
115
# File 'lib/gantree/cli.rb', line 113

def version
  puts VERSION
end