class Yade::Common::Config::ComposerConfig
Attributes
composer_home[RW]
config_path[RW]
yade_home[RW]
Public Class Methods
[](key)
click to toggle source
Calls superclass method
# File lib/yade/common/config/composer_config.rb, line 47 def self.[](key) return @@yade_home if key == :yade_home return @@config_path if key == :config_path return @@composer_home if key == :composer_home super end
load!()
click to toggle source
Calls superclass method
# File lib/yade/common/config/composer_config.rb, line 20 def self.load! if no_config_file? $stderr.puts <<-HELP ******** You haven't set up your Yade Composer settings file. ********** Please do the following: 1. Create the yade base directory and download the yade-composer-config.yml example: mkdir -p ~/.yade cd ~/.yade curl --header 'PRIVATE-TOKEN: <your token>' \ 'http://gitlab.dzbw.de/client/v4/projects/366/repository/files/yade-composer-config%2Eyml%2Eexample/raw?ref=master' \ -o yade-composer-config.yml 2. Have a look at the settings in that file and change it according to your needs. HELP Process.exit(1) end super end
no_config_file?()
click to toggle source
no config
# File lib/yade/common/config/composer_config.rb, line 41 def self.no_config_file? !File.exists?(@source) end
write!()
click to toggle source
# File lib/yade/common/config/composer_config.rb, line 55 def self.write! d = YAML.load_file(@@config_path) d['git_api_url'] = self.git_api_url d['git_username'] = self.git_username d['git_password'] = self.git_password d['git_token'] = self.git_token d['docker_registry_url'] = self.docker_registry_url d['docker_registry_username'] = self.docker_registry_username d['docker_registry_password'] = self.docker_registry_password File.open(@@config_path, 'w') { |f| f.write d.to_yaml } end