Sha256: 291e3885e7b6cde3756fdf2255b73849b64587a1d6bc3a7173f6e608dbbadd49
Contents?: true
Size: 1.2 KB
Versions: 23
Compression:
Stored size: 1.2 KB
Contents
require 'fwtoolkit/configfile' require 'fileutils' module FWToolkit module Config include FWToolkit::ConfigFile def self.config_file File.join(ENV['HOME'], '.fwtoolkit', 'config') end def load! unless File.exists? config_file FileUtils.copy_file File.join(File.dirname(__FILE__), 'config', 'config.sample'), config_file raise "Please configure fwtoolkit by editing the file at path: #{config_file}" end default_config = { :organization_name => 'Future Workshops', :ruby_version => '1.9.3', :target_platform => '6.0', :ci_server_url => 'http://ci.office.futureworkshops.com', :artifacts_tmp_dir => '/tmp/fwtoolkit/artifacts' } load_config! config_file end def validate_config unless @config.has_key?(:developer_name) raise NameError, "Please configure fwtoolkit by editing the file at path: #{config_file}" end end def conf_item_missing(name) raise NoMethodError, "Please provide a valid '#{name}' by editing the conf file at path: #{config_file}" end extend self end end FWToolkit::Config.load!
Version data entries
23 entries across 23 versions & 1 rubygems