Module: XPlanner
- Defined in:
- lib/xplanner.rb,
lib/models/task.rb,
lib/models/story.rb,
lib/models/person.rb,
lib/config/version.rb,
lib/models/project.rb,
lib/models/iteration.rb,
lib/config/default_config.rb,
lib/helpers/xplanner_soap_client.rb,
lib/helpers/xplanner_model_helper.rb
Defined Under Namespace
Classes: Iteration, ModelHelper, Person, Project, SoapClient, Story, Task
Constant Summary
collapse
- VERSION =
'0.1.4'
- @@default_config =
{
:xplanner_url => "http://127.0.0.1:8080/xplanner-plus/",
:username => 'sysadmin',
:password => 'admin'
}
Class Method Summary
collapse
Class Method Details
.connection? ⇒ Boolean
31
32
33
|
# File 'lib/xplanner.rb', line 31
def self.connection?
@@connection_successful
end
|
.setup(config = {}) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/xplanner.rb', line 11
def self.setup( config = {} )
url = config[:url] ||= @@default_config[:xplanner_url]
user = config[:user] ||= @@default_config[:username]
pass = config[:pass] ||= @@default_config[:password]
wsdl = URI::join(url, 'soap/XPlanner?wsdl').to_s
client_config = {
:wsdl => wsdl,
:username => user,
:password => pass
}
soap_client = SoapClient.new( client_config )
ModelHelper.soap_client= soap_client
@@connection_successful = soap_client.confirm_connection
ModelHelper.base_url= url
end
|