Class: Capricorn::CLI
- Inherits:
-
Thor
show all
- Defined in:
- lib/capricorn-client.rb
Defined Under Namespace
Classes: Applications, ApplicationsDomains, ApplicationsGems, Gems, Machines
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/capricorn-client.rb', line 31
def method_missing(meth, *args)
meth = meth.to_s
klass, task = Thor::Util.find_class_and_task_by_namespace(meth)
args.unshift(task) if task
klass.start(args, :shell => self.shell)
end
|
Class Method Details
.banner(task) ⇒ Object
18
19
20
|
# File 'lib/capricorn-client.rb', line 18
def self.banner(task)
"#{banner_base} #{task.formatted_usage(self, true)}"
end
|
Instance Method Details
44
45
46
47
48
49
50
51
52
53
|
# File 'lib/capricorn-client.rb', line 44
def deploy
last = Dir.glob("pkg/*.gem").sort do |a, b|
File.stat(a).mtime <=> File.stat(b).mtime
end.last
$capr_gems_weak_push = true
invoke "gems:push", [last]
invoke "apps:fupdate"
end
|
#help(meth = nil) ⇒ Object
22
23
24
25
26
27
28
29
|
# File 'lib/capricorn-client.rb', line 22
def help(meth=nil)
if meth && !self.respond_to?(meth)
klass, task = Thor::Util.find_class_and_task_by_namespace(meth)
klass.start(["-h", task].compact, :shell => self.shell)
else
super
end
end
|