lib/power_stencil/plugins/base.rb in power_stencil-0.6.0 vs lib/power_stencil/plugins/base.rb in power_stencil-0.6.1
- old
+ new
@@ -42,13 +42,15 @@
when :gem
logger.debug "Plugin '#{name}' is provided as a Gem."
@gem_spec = PowerStencil::Plugins::Base.find_locally_installed_gem_spec name, gem_req
raise PowerStencil::Error, "Cannot find plugin '#{name}'. Try 'power_stencil plugin --install'" if gem_spec.nil?
raise PowerStencil::Error, "Invalid plugin '#{name}' ! Missing metadata 'plugin_name' in spec !" if gem_spec.metadata['plugin_name'].nil?
+ logger.debug "Plugin '#{name}' real name is '#{gem_spec.metadata['plugin_name']}'."
@name = gem_spec.metadata['plugin_name']
- logger.debug "Plugin real name is '#{name}'."
when :local
logger.debug "Plugin '#{name}' is provided locally by the project."
+ else
+ raise PowerStencil::Error, "Unsupported plugin type (#{type}) for plugin '#{name}' !"
end
logger.debug "Loading plugin '#{name}'..."
setup_plugin
logger.info "Plugin '#{name}' successfully available"
\ No newline at end of file