Fix XML RPC. Refs #2136

This commit is contained in:
Pavel Chipiga 2011-10-28 03:04:10 +03:00
parent e3a65246cf
commit 98241b20e6
1 changed files with 12 additions and 3 deletions

View File

@ -132,12 +132,21 @@ class Project < ActiveRecord::Base
end
end
def xml_rpc_destroy
result = BuildServer.delete_project unixname, repository.platform.unixname
def xml_rpc_create
result = BuildServer.create_project unixname, "#{owner.uname}_personal", 'main'
if result == BuildServer::SUCCESS
return true
else
raise "Failed to delete repository #{name} (repo #{repository.name}) inside platform #{repository.platform.name}."
raise "Failed to create project #{name} (repo main) inside platform #{owner.uname}_personal."
end
end
def xml_rpc_destroy
result = BuildServer.delete_project unixname, "#{owner.uname}_personal"
if result == BuildServer::SUCCESS
return true
else
raise "Failed to delete repository #{name} (repo main) inside platform #{owner.uname}_personal."
end
end
end