Module: Diffend::Configs::Fetcher
- Defined in:
- lib/diffend/configs/fetcher.rb
Overview
Class responsible for fetching the config from .diffend.yml
Class Method Summary collapse
-
.call(plugin_path, build_path) ⇒ Hash
Details from configuration file.
Class Method Details
.call(plugin_path, build_path) ⇒ Hash
Returns details from configuration file.
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/diffend/configs/fetcher.rb', line 22 def call(plugin_path, build_path) default_config = File.join(plugin_path, 'config', 'diffend.yml') project_config = File.join(build_path, Diffend::Config::FILENAME) hash = read_file(default_config) if File.exist?(project_config) hash.merge!(read_file(project_config) || {}) end hash end |