Class: DEIS::Deis

Inherits:
Thor
  • Object
show all
Includes:
Thor::Shell
Defined in:
lib/rdeis/deis.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap(action = "all") ⇒ Object



156
157
158
159
160
161
162
163
164
# File 'lib/rdeis/deis.rb', line 156

def bootstrap(action="all")
  self.updgrade
  if DEIS::Bootstrap.method_defined? action
    bootstrap = DEIS::Bootstrap.new(options)
    bootstrap.send(action)
  else
    say "invalid option", :red
  end
end

#config(action = "list", *vars) ⇒ Object



41
42
43
44
45
46
47
48
49
# File 'lib/rdeis/deis.rb', line 41

def config(action="list", *vars)
  self.bootstrap
  if DEIS::Config.method_defined? action
    config = DEIS::Config.new(options)
    config.send(action, vars)
  else
    say "invalid option", :red
  end
end

#deploy(action = "all") ⇒ Object



125
126
127
128
129
130
131
132
133
# File 'lib/rdeis/deis.rb', line 125

def deploy(action="all")
  self.bootstrap
  if DEIS::Deploy.method_defined? action
    deploy = DEIS::Deploy.new(options)
    deploy.send(action)
  else
    say "invalid option", :red
  end
end

#destroyObject



178
179
180
181
# File 'lib/rdeis/deis.rb', line 178

def destroy
  run = DEIS::Destroy.new(options)
  run.all
end

#domains(action = "list", *domains) ⇒ Object



76
77
78
79
80
81
82
83
84
# File 'lib/rdeis/deis.rb', line 76

def domains(action="list", *domains)
  self.bootstrap
  if DEIS::Domains.method_defined? action
    domain = DEIS::Domains.new(options)
    domain.send(action, domains)
  else
    say "invalid option", :red
  end
end

#scale(*vars) ⇒ Object



145
146
147
148
149
150
151
152
153
# File 'lib/rdeis/deis.rb', line 145

def scale(*vars)
  self.bootstrap
  if DEIS::Deploy.method_defined? "scale"
    deploy = DEIS::Deploy.new(options)
    deploy.send("scale", vars)
  else
    say "invalid option", :red
  end
end

#upgrade(from = nil) ⇒ Object



167
168
169
170
# File 'lib/rdeis/deis.rb', line 167

def upgrade(from=nil)
  run = DEIS::Upgrade.new(options, from)
  run.all
end

#versionObject



173
174
175
# File 'lib/rdeis/deis.rb', line 173

def version
  say "rdeis #{DEIS::VERSION}"
end