Class: Capricorn::Apps::Engines

Inherits:
Thor
  • Object
show all
Defined in:
lib/capricorn/apps/engines.rb

Instance Method Summary collapse

Methods inherited from Thor

namespace, namespace=

Instance Method Details

#install(domain, name) ⇒ Object



9
10
11
12
13
14
# File 'lib/capricorn/apps/engines.rb', line 9

def install(domain, name)
  desc = { :version => options[:version] }
  desc[:lib]    = options[:lib]    if options[:lib]
  desc[:source] = options[:source] if options[:source]
  Capricorn.client(options[:token]).install_engine(domain, name, desc)
end

#uninstall(domain, name) ⇒ Object



27
28
29
# File 'lib/capricorn/apps/engines.rb', line 27

def uninstall(domain, name)
  Capricorn.client(options[:token]).uninstall_engine(domain, name)
end

#update(domain, name) ⇒ Object



18
19
20
21
22
23
# File 'lib/capricorn/apps/engines.rb', line 18

def update(domain, name)
  desc = { :version => options[:version] }
  desc[:lib]    = options[:lib]    if options[:lib]
  desc[:source] = options[:source] if options[:source]
  Capricorn.client(options[:token]).update_engine(domain, name, desc)
end