lib/kpm/base_installer.rb in kpm-0.2.1 vs lib/kpm/base_installer.rb in kpm-0.2.2

- old
+ new

@@ -12,49 +12,54 @@ @logger = logger @nexus_config = nexus_config @nexus_ssl_verify = nexus_ssl_verify end - def install_killbill_server(specified_group_id=nil, specified_artifact_id=nil, specified_packaging=nil, specified_classifier=nil, specified_version=nil, specified_webapp_path=nil, force_download=false, verify_sha1=true) + def install_killbill_server(specified_group_id=nil, specified_artifact_id=nil, specified_packaging=nil, specified_classifier=nil, specified_version=nil, specified_webapp_path=nil, bundles_dir=nil, force_download=false, verify_sha1=true) group_id = specified_group_id || KPM::BaseArtifact::KILLBILL_GROUP_ID artifact_id = specified_artifact_id || KPM::BaseArtifact::KILLBILL_ARTIFACT_ID packaging = specified_packaging || KPM::BaseArtifact::KILLBILL_PACKAGING classifier = specified_classifier || KPM::BaseArtifact::KILLBILL_CLASSIFIER version = specified_version || LATEST_VERSION webapp_path = specified_webapp_path || KPM::root + bundles_dir = Pathname.new(bundles_dir || DEFAULT_BUNDLES_DIR).expand_path + sha1_file = "#{bundles_dir}/#{SHA1_FILENAME}" + @logger.debug("Installing Kill Bill server: group_id=#{group_id} artifact_id=#{artifact_id} packaging=#{packaging} classifier=#{classifier} version=#{version} webapp_path=#{webapp_path}") KPM::KillbillServerArtifact.pull(@logger, group_id, artifact_id, packaging, classifier, version, webapp_path, - nil, + sha1_file, force_download, verify_sha1, @nexus_config, @nexus_ssl_verify) end - def install_kaui(specified_group_id=nil, specified_artifact_id=nil, specified_packaging=nil, specified_classifier=nil, specified_version=nil, specified_webapp_path=nil, force_download=false, verify_sha1=true) + def install_kaui(specified_group_id=nil, specified_artifact_id=nil, specified_packaging=nil, specified_classifier=nil, specified_version=nil, specified_webapp_path=nil, bundles_dir=nil, force_download=false, verify_sha1=true) group_id = specified_group_id || KPM::BaseArtifact::KAUI_GROUP_ID artifact_id = specified_artifact_id || KPM::BaseArtifact::KAUI_ARTIFACT_ID packaging = specified_packaging || KPM::BaseArtifact::KAUI_PACKAGING classifier = specified_classifier || KPM::BaseArtifact::KAUI_CLASSIFIER version = specified_version || LATEST_VERSION webapp_path = specified_webapp_path || KPM::root + bundles_dir = Pathname.new(bundles_dir || DEFAULT_BUNDLES_DIR).expand_path + sha1_file = "#{bundles_dir}/#{SHA1_FILENAME}" @logger.debug("Installing Kaui: group_id=#{group_id} artifact_id=#{artifact_id} packaging=#{packaging} classifier=#{classifier} version=#{version} webapp_path=#{webapp_path}") KPM::KauiArtifact.pull(@logger, group_id, artifact_id, packaging, classifier, version, webapp_path, - nil, + sha1_file, force_download, verify_sha1, @nexus_config, @nexus_ssl_verify) end @@ -151,10 +156,11 @@ def install_plugin_from_fs(plugin_key, file_path, name, version, bundles_dir=nil, type='java') bundles_dir = Pathname.new(bundles_dir || DEFAULT_BUNDLES_DIR).expand_path plugins_dir = bundles_dir.join('plugins') if type.to_s == 'java' - destination = plugins_dir.join('java').join(name).join(version) + plugin_name = name.nil? ? Pathname.new(file_path).basename.to_s.split('-')[0] : name + destination = plugins_dir.join('java').join(plugin_name).join(version) else destination = plugins_dir.join('ruby') end artifact_info = KPM::KillbillPluginArtifact.pull_from_fs(@logger, file_path, destination)