Sha256: 7063943a4f4d479d6095231187753e01047621407db6b65bb7ae678f3d888eed
Contents?: true
Size: 952 Bytes
Versions: 4
Compression:
Stored size: 952 Bytes
Contents
require "gem_suit/cli/config/hash" module GemSuit class CLI < Thor module Config FILENAME = ".suit" def self.included(base) base.send :include, InstanceMethods end module InstanceMethods 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 def suit_config_global @suit_config_global ||= Config::Hash.new File.expand_path(FILENAME, suit_gem_path) end def suit_config @suit_config ||= Config::Hash.new FILENAME, suit_config_global end def suit_config? File.exists? FILENAME end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gem_suit-0.1.3 | lib/gem_suit/cli/config.rb |
gem_suit-0.1.2 | lib/gem_suit/cli/config.rb |
gem_suit-0.1.1 | lib/gem_suit/cli/config.rb |
gem_suit-0.1.0 | lib/gem_suit/cli/config.rb |