lib/kpm/tasks.rb in kpm-0.0.13 vs lib/kpm/tasks.rb in kpm-0.0.14
- old
+ new
@@ -22,22 +22,30 @@
desc 'install config_file', 'Install Kill Bill server and plugins according to the specified YAML configuration file.'
method_option :force_download,
:type => :boolean,
:default => false,
:desc => 'Force download of the artifact even if it exists'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
def install(config_file)
- Installer.from_file(config_file).install(options[:force_download])
+ Installer.from_file(config_file).install(options[:force_download], options[:verify_sha1])
end
method_option :destination,
:type => :string,
:default => nil,
:desc => 'A different folder other than the current working directory.'
method_option :force_download,
:type => :boolean,
:default => false,
:desc => 'Force download of the artifact even if it exists'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
desc 'pull_kb_server_war version', 'Pulls Kill Bill server war from Sonatype and places it on your machine.'
def pull_kb_server_war(version='LATEST')
response = KillbillServerArtifact.pull(logger,
KillbillServerArtifact::KILLBILL_GROUP_ID,
KillbillServerArtifact::KILLBILL_ARTIFACT_ID,
@@ -45,10 +53,11 @@
KillbillServerArtifact::KILLBILL_CLASSIFIER,
version,
options[:destination],
nil,
options[:force_download],
+ options[:verify_sha1],
options[:overrides],
options[:ssl_verify])
say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end
@@ -67,10 +76,14 @@
:desc => 'A different folder other than the current working directory.'
method_option :force_download,
:type => :boolean,
:default => false,
:desc => 'Force download of the artifact even if it exists'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
desc 'pull_kp_server_war version', 'Pulls Kill Pay server war from Sonatype and places it on your machine.'
def pull_kp_server_war(version='LATEST')
response = KillbillServerArtifact.pull(logger,
KillbillServerArtifact::KILLBILL_GROUP_ID,
KillbillServerArtifact::KILLPAY_ARTIFACT_ID,
@@ -78,10 +91,11 @@
KillbillServerArtifact::KILLPAY_CLASSIFIER,
version,
options[:destination],
nil,
options[:force_download],
+ options[:verify_sha1],
options[:overrides],
options[:ssl_verify])
say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end
@@ -104,10 +118,14 @@
:desc => 'Force download of the artifact even if it exists'
method_option :sha1_file,
:type => :string,
:default => nil,
:desc => 'Location of the sha1 file'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
desc 'pull_java_plugin artifact_id', 'Pulls a java plugin from Sonatype and places it on your machine.'
def pull_java_plugin(artifact_id, version='LATEST')
response = KillbillPluginArtifact.pull(logger,
KillbillPluginArtifact::KILLBILL_JAVA_PLUGIN_GROUP_ID,
artifact_id,
@@ -115,10 +133,11 @@
KillbillPluginArtifact::KILLBILL_JAVA_PLUGIN_CLASSIFIER,
version,
options[:destination],
options[:sha1_file],
options[:force_download],
+ options[:verify_sha1],
options[:overrides],
options[:ssl_verify])
say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end
@@ -132,10 +151,14 @@
:desc => 'Force download of the artifact even if it exists'
method_option :sha1_file,
:type => :string,
:default => nil,
:desc => 'Location of the sha1 file'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
desc 'pull_ruby_plugin artifact_id', 'Pulls a ruby plugin from Sonatype and places it on your machine.'
def pull_ruby_plugin(artifact_id, version='LATEST')
response = KillbillPluginArtifact.pull(logger,
KillbillPluginArtifact::KILLBILL_RUBY_PLUGIN_GROUP_ID,
artifact_id,
@@ -143,10 +166,11 @@
KillbillPluginArtifact::KILLBILL_RUBY_PLUGIN_CLASSIFIER,
version,
options[:destination],
options[:sha1_file],
options[:force_download],
+ options[:verify_sha1],
options[:overrides],
options[:ssl_verify])
say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end
@@ -175,10 +199,14 @@
:desc => 'Force download of the artifact even if it exists'
method_option :sha1_file,
:type => :string,
:default => nil,
:desc => 'Location of the sha1 file'
+ method_option :verify_sha1,
+ :type => :boolean,
+ :default => true,
+ :desc => 'Validates sha1 sum'
desc 'pull_kaui_war version', 'Pulls Kaui war from Sonatype and places it on your machine.'
def pull_kaui_war(version='LATEST')
response = KauiArtifact.pull(logger,
KauiArtifact::KAUI_GROUP_ID,
KauiArtifact::KAUI_ARTIFACT_ID,
@@ -186,9 +214,10 @@
KauiArtifact::KAUI_CLASSIFIER,
version,
options[:destination],
options[:sha1_file],
options[:force_download],
+ options[:verify_sha1],
options[:overrides],
options[:ssl_verify])
say "Artifact has been retrieved and can be found at path: #{response[:file_path]}", :green
end