class KPM::PluginsDirectory
def self.lookup(plugin_name, latest=false)
def self.lookup(plugin_name, latest=false) plugin = all(latest)[plugin_name.to_s.downcase.to_sym] return nil if plugin.nil? type = plugin[:type] is_ruby = type == :ruby group_id = plugin[:group_id] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_GROUP_ID : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_GROUP_ID) artifact_id = plugin[:artifact_id] || "#{plugin.to_s}-plugin" packaging = plugin[:packaging] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_PACKAGING : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_PACKAGING) classifier = plugin[:classifier] || (is_ruby ? KPM::BaseArtifact::KILLBILL_RUBY_PLUGIN_CLASSIFIER : KPM::BaseArtifact::KILLBILL_JAVA_PLUGIN_CLASSIFIER) version = plugin[:stable_version] || 'LATEST' [group_id, artifact_id, packaging, classifier, version, type] end