Class: CLI

Inherits:
Thor show all
Includes:
Thor::Actions
Defined in:
lib/volt/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



42
43
44
# File 'lib/volt/cli.rb', line 42

def self.source_root
  File.expand_path(File.join(File.dirname(__FILE__), '../../templates'))
end

Instance Method Details

#component(name) ⇒ Object



36
37
38
39
40
# File 'lib/volt/cli.rb', line 36

def component(name)
  require 'volt/cli/new_gem'
  
  NewGem.new(self, name, options)
end

#consoleObject



16
17
18
19
# File 'lib/volt/cli.rb', line 16

def console
  require 'volt/console'
  Console.start
end

#new(name) ⇒ Object



8
9
10
11
12
13
# File 'lib/volt/cli.rb', line 8

def new(name)
  directory("project", name)
  
  say "Bundling Gems...."
  `cd #{name} ; bundle -j 4`
end

#serverObject



22
23
24
25
26
27
# File 'lib/volt/cli.rb', line 22

def server
  require 'thin'

  ENV['SERVER'] = 'true'
  Thin::Runner.new(['start']).run!
end