Class: Propel::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/propel/configuration.rb

Constant Summary collapse

DEFAULTS =
{
    :color   => false,
    :fix_ci  => false,
    :rebase  => true,
    :verbose => false,
    :wait    => false
}

Instance Method Summary collapse

Constructor Details

#initialize(command_line_arguments, repository) ⇒ Configuration

Returns a new instance of Configuration.



4
5
6
7
# File 'lib/propel/configuration.rb', line 4

def initialize(command_line_arguments, repository)
  @command_line_options = command_line_arguments
  @repository           = repository
end

Instance Method Details

#config_fileObject



22
23
24
# File 'lib/propel/configuration.rb', line 22

def config_file
  File.join(@repository.project_root, ".propel")
end

#optionsObject



17
18
19
20
# File 'lib/propel/configuration.rb', line 17

def options
  opts = DEFAULTS.merge(parse(options_from_config_file).merge(parse @command_line_options))
  correct_color_setting!(opts)
end