Module: Isomorfeus::Installer::OptionsMangler

Defined in:
lib/isomorfeus/installer/options_mangler.rb

Class Method Summary collapse

Class Method Details

.mangle_options(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/isomorfeus/installer/options_mangler.rb', line 4

def self.mangle_options(options)
  if options.key?(:rack_server) && Isomorfeus::Installer.sorted_rack_servers.include?(options[:rack_server])
    Isomorfeus::Installer.rack_server = Isomorfeus::Installer.rack_servers[options[:rack_server]]
    Isomorfeus::Installer.rack_server_name = options[:rack_server]
  else
    Isomorfeus::Installer.rack_server = Isomorfeus::Installer.rack_servers['isomorfeus-iodine']
  end
  Isomorfeus::Installer.source_dir = File.expand_path(options[:source_dir]) if options.key?(:source_dir)
  Isomorfeus::Installer.isomorfeus_module = "isomorfeus-#{options[:module]}".to_sym if options.key?(:module)
end