lib/kpm/installer.rb in kpm-0.5.3 vs lib/kpm/installer.rb in kpm-0.6.0

- old
+ new

@@ -14,10 +14,17 @@ end Installer.new(config, logger) end def self.build_default_config(all_kb_versions=nil) + latest_stable_version = get_kb_latest_stable_version(all_kb_versions) + + # Note: we assume no unstable version of Kaui is published today + {'killbill' => {'version' => latest_stable_version.to_s, 'plugins' => {'ruby' => [{'name' => 'kpm'}]}}, 'kaui' => {'version' => 'LATEST'}} + end + + def self.get_kb_latest_stable_version(all_kb_versions=nil) all_kb_versions ||= KillbillServerArtifact.versions(KillbillServerArtifact::KILLBILL_ARTIFACT_ID, KillbillServerArtifact::KILLBILL_PACKAGING, KillbillServerArtifact::KILLBILL_CLASSIFIER, nil, true).to_a @@ -30,12 +37,11 @@ next if !pre.nil? || minor.nil? || minor.to_i.odd? latest_stable_version = version if version > latest_stable_version end - # Note: we assume no unstable version of Kaui is published today - {'killbill' => {'version' => latest_stable_version.to_s, 'plugins' => {'ruby' => [{'name' => 'kpm'}]}}, 'kaui' => {'version' => 'LATEST'}} + latest_stable_version end def initialize(raw_config, logger=nil) @config = raw_config['killbill'] @kaui_config = raw_config['kaui'] @@ -73,10 +79,11 @@ end install_kaui(@kaui_config['group_id'], @kaui_config['artifact_id'], @kaui_config['packaging'], @kaui_config['classifier'], @kaui_config['version'], @kaui_config['webapp_path'], bundles_dir, force_download, verify_sha1) end - help + @trace_logger.add('help',help) + @trace_logger.to_json end private def install_tomcat(dir=Dir.pwd)