Module: GemSuit::CLI::Config::InstanceMethods

Defined in:
lib/gem_suit/cli/config.rb

Instance Method Summary collapse

Instance Method Details

#configure_suitObject



15
16
17
18
19
# File 'lib/gem_suit/cli/config.rb', line 15

def configure_suit
  suit_config[:mysql]    = options.key?("mysql")    ? options.mysql    : agree?("Do you want to use a MySQL test database?", :no)
  suit_config[:capybara] = options.key?("capybara") ? options.capybara : agree?("Do you want to use Capybara for testing?" , :yes)
  suit_config[:version]  = GemSuit::VERSION::STRING
end

#suit_configObject



25
26
27
# File 'lib/gem_suit/cli/config.rb', line 25

def suit_config
  @suit_config ||= Config::Hash.new FILENAME, suit_config_global
end

#suit_config?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/gem_suit/cli/config.rb', line 29

def suit_config?
  File.exists? FILENAME
end

#suit_config_globalObject



21
22
23
# File 'lib/gem_suit/cli/config.rb', line 21

def suit_config_global
  @suit_config_global ||= Config::Hash.new File.expand_path(FILENAME, suit_gem_path)
end