Class: Aerial::Installer

Inherits:
Thor
  • Object
show all
Includes:
FileUtils
Defined in:
lib/aerial/installer.rb

Instance Method Summary collapse

Instance Method Details

#install(path) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/aerial/installer.rb', line 13

def install(path)
  @root = Pathname(path).expand_path
  create_dir_structure
  copy_config_files
  edit_config_files
  bootstrap
  puts post_install_message
end

#launchObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/aerial/installer.rb', line 24

def launch
  @root = Pathname(".").expand_path
  require "thin"
  Aerial.new(@root, "/config/config.yml")
  Aerial::App.set :root, @root
  Thin::Server.start("0.0.0.0", options[:port], Aerial::App)
rescue LoadError => boom
  missing_dependency = boom.message.split("--").last.lstrip
  puts "Please install #{missing_dependency} to launch Aerial"
end