From 1283a4b2c403bc58a2e8aece6f22b9a66933bae6 Mon Sep 17 00:00:00 2001 From: Ilya Krasilnikov Date: Tue, 25 Oct 2011 04:14:46 +0400 Subject: [PATCH] xml-prc demo script --- bin/xml-client-demo.rb | 37 +++++++++++++++++++++++++++++++++++++ config/deploy.rb | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 bin/xml-client-demo.rb diff --git a/bin/xml-client-demo.rb b/bin/xml-client-demo.rb new file mode 100644 index 000000000..f4f4ec056 --- /dev/null +++ b/bin/xml-client-demo.rb @@ -0,0 +1,37 @@ +#!/usr/bin/env ruby + +require 'rubygems' +require 'xmlrpc/client' +require 'ap' # awesome_print + +# Please correctly fill following vars +@host = 'localhost' +@port = 3000 +@user = 'user@email' +@password = '' + +puts 'PLATFORMS' +client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900) +ap client.call("platforms") + +puts 'USER PROJECTS' +client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900) +ap client.call("user_projects") + +puts 'PROJECT VERSIONS' +client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900) +project_id = 1 # FIXME! +ap client.call("project_versions", project_id) + +puts 'BUILD STATUS' +client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900) +build_list_id = 1 # FIXME +ap client.call("build_status", build_list_id) + +puts 'BUILD PACKET' +client = XMLRPC::Client.new(@host, '/api/xmlrpc', @port, nil, nil, @user, @password, false, 900) +project_id = 1 # FIXME +repo_id = 1 # FIXME +ap client.call("build_packet", project_id, repo_id) + +puts 'DONE' \ No newline at end of file diff --git a/config/deploy.rb b/config/deploy.rb index 16ddc9bd4..63a486bb2 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -84,5 +84,5 @@ namespace :deploy do end end -require './config/boot' +# require './config/boot' require 'airbrake/capistrano'