Sha256: c1a530a4a598600a78701cac5993ab3e61b2698de508469b2c2b9beb8ea0f53a
Contents?: true
Size: 854 Bytes
Versions: 33
Compression:
Stored size: 854 Bytes
Contents
module PowerStencil module Plugins module Dependencies def has_dependencies? not declared_dependencies.empty? end def declared_dependencies if plugin_module.constants.include? :REQUIRED_PLUGINS plugin_module::REQUIRED_PLUGINS else [] end end def check_plugin_dependencies logger.info "Checking plugin '#{name}' dependencies !" declared_dependencies.each do |dependency| logger.debug "Checking dependency of plugin '#{name}' to plugin '#{dependency}'" unless project.plugins.keys.include? dependency.to_s raise PowerStencil::Error, "Unmatched dependency '#{dependency}' for plugin '#{name}' !" end end logger.debug "Dependencies for plugin '#{name}' are Ok." end end end end
Version data entries
33 entries across 33 versions & 1 rubygems