lib/gooddata/commands/process.rb in gooddata-0.6.0.pre2 vs lib/gooddata/commands/process.rb in gooddata-0.6.0.pre3
- old
+ new
@@ -32,11 +32,11 @@
fail "\"#{dir}\" is not a directory" unless dir.directory?
project_id = options[:project_id] || fail("Project Id has to be specified")
type = options[:type] || fail("Type of deployment is not specified")
- deploy_name = "AAAAA"
+ deploy_name = options[:name]
verbose = options[:verbose] || false
project_pid = options[:project_pid]
puts HighLine::color("Deploying #{dir}", HighLine::BOLD) if verbose
res = nil
@@ -76,12 +76,12 @@
dir = Pathname(dir)
type = :ruby
if type == :ruby
result = GoodData.post(link, {
:execution => {
- :graph => dir + "main.rb",
- :params => {}
+ :graph => (dir + "main.rb").to_s,
+ :params => options[:params]
}
})
begin
GoodData.poll(result, "executionTask")
rescue RestClient::RequestFailed => e
@@ -115,20 +115,20 @@
end
def self.run(dir, options={})
email = options[:email]
verbose = options[:v]
-
dir = Pathname(dir)
+ name = options[:name] || "Temporary deploy[#{dir}][#{options[:project_name]}]"
- with_deploy(dir, options.merge(:name => "Temporary deploy[#{dir}][#{options[:project_name]}]")) do |deploy_response|
+ with_deploy(dir, options.merge(:name => name)) do |deploy_response|
puts HighLine::color("Executing", HighLine::BOLD) if verbose
# if email.nil?
# result = execute_process(deploy_response["process"]["links"]["executions"], dir, options)
# else
# create_email_channel(options) do |channel_response|
# subscribe_on_finish(:success, channel_response, deploy_response, options)
- result = execute_process(deploy_response["process"]["links"]["executions"], dir)
+ result = execute_process(deploy_response["process"]["links"]["executions"], dir, options)
# end
# end
end
end