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(logger, build_path) ⇒ Hash
Details from configuration file.
Class Method Details
.call(logger, build_path) ⇒ Hash
Returns details from configuration file.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/diffend/configs/fetcher.rb', line 19 def call(logger, build_path) build(build_path) rescue Errors::MissingConfigurationFile (build_path) .tap(&logger.method(:fatal)) raise Diffend::Errors::HandledException rescue Errors::EmptyConfigurationFile (build_path) .tap(&logger.method(:fatal)) raise Diffend::Errors::HandledException rescue Errors::MalformedConfigurationFile (build_path) .tap(&logger.method(:fatal)) raise Diffend::Errors::HandledException end |