lib/gooddata/models/process.rb in gooddata-0.6.11 vs lib/gooddata/models/process.rb in gooddata-0.6.12
- old
+ new
@@ -49,11 +49,10 @@
def all
Process[:all]
end
- # TODO: Check the params.
def with_deploy(dir, options = {}, &block)
client = options[:client]
fail ArgumentError, 'No :client specified' if client.nil?
p = options[:project]
@@ -85,11 +84,11 @@
fail ArgumentError, 'No :project specified' if p.nil?
project = GoodData::Project[p, opts]
fail ArgumentError, 'Wrong :project specified' if project.nil?
- zip_and_upload path, files_to_exclude, opts
+ zip_and_upload(path, files_to_exclude, opts)
end
# Deploy a new process or redeploy existing one.
#
# @param path [String] Path to ZIP archive or to a directory containing files that should be ZIPed
@@ -117,11 +116,11 @@
fail ArgumentError, 'options[:name] can not be nil or empty!' if deploy_name.nil? || deploy_name.empty?
verbose = options[:verbose] || false
puts HighLine.color("Deploying #{path}", HighLine::BOLD) if verbose
- deployed_path = Process.upload_package(path, files_to_exclude, :client => client, :project => project)
+ deployed_path = Process.upload_package(path, files_to_exclude, client: client, project: project)
data = {
:process => {
:name => deploy_name,
:path => "/uploads/#{File.basename(deployed_path)}",
:type => type
@@ -195,10 +194,10 @@
# @option options [String] :process_id ('nobody') From address
# @option options [String] :type ('GRAPH') Type of process - GRAPH or RUBY
# @option options [String] :name Readable name of the process
# @option options [Boolean] :verbose (false) Switch on verbose mode for detailed logging
def deploy(path, options = {})
- Process.deploy(path, options.merge(:process_id => process_id, :client => client, :project => project))
+ Process.deploy(path, client: client, process_id: process_id, :project => project).merge(options)
end
# Downloads the process from S3 in a zipped form.
#
# @return [IO] The stream of data that represents a zipped deployed process.