Module: FalkorLib::Config
- Defined in:
- lib/falkorlib/config.rb,
lib/falkorlib/git/base.rb,
lib/falkorlib/git/flow.rb,
lib/falkorlib/versioning.rb,
lib/falkorlib/puppet/base.rb,
lib/falkorlib/puppet/modules.rb
Overview
:nodoc:
Defined Under Namespace
Modules: Git, GitFlow, Puppet, Versioning
Constant Summary collapse
- DEFAULTS =
Defaults global settings
{ :debug => false, :root => Dir.pwd, :custom_cfg => '.falkorlib.yaml', :rvm => { :rubies => [ '1.9.3', '2.0.0', '2.1.0'] }, :templates => { :puppet => {} }, :tokens => { :code_climate => '' } }
Class Method Summary collapse
-
.default ⇒ Object
Build the default configuration hash, to be used to initiate the default.
Class Method Details
.default ⇒ Object
Build the default configuration hash, to be used to initiate the default. The hash is built depending on the loaded files.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/falkorlib/config.rb', line 61 def default res = FalkorLib::Config::DEFAULTS $LOADED_FEATURES.each do |path| res[:git] = FalkorLib::Config::Git::DEFAULTS if path.include?('lib/falkorlib/git.rb') res[:gitflow] = FalkorLib::Config::GitFlow::DEFAULTS if path.include?('lib/falkorlib/git.rb') res[:versioning] = FalkorLib::Config::Versioning::DEFAULTS if path.include?('lib/falkorlib/versioning.rb') if path.include?('lib/falkorlib/puppet.rb') res[:puppet] = FalkorLib::Config::Puppet::DEFAULTS res[:templates][:puppet][:modules] = FalkorLib::Config::Puppet::Modules::DEFAULTS[:metadata] end end # Check the potential local customizations custom_cfg = File.join( res[:root], res[:custom_cfg]) if File.exists?( custom_cfg ) res.merge!( load_config( custom_cfg ) ) end res end |