xplanner 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module XPlanner
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -7,8 +7,13 @@ module XPlanner
7
7
  end
8
8
  end
9
9
 
10
- def get_services
11
- @client.wsdl.type_definitions
10
+ def confirm_connection
11
+ actions = @client.wsdl.soap_actions
12
+ if( actions.instance_of?( Array ) && actions.include?( :get_user_story ) )
13
+ return true
14
+ else
15
+ return false
16
+ end
12
17
  end
13
18
 
14
19
  def call( rpc, payload=nil)
@@ -21,7 +21,13 @@ module XPlanner
21
21
  :password => pass
22
22
  }
23
23
 
24
- ModelHelper.soap_client= SoapClient.new( client_config )
24
+ soap_client = SoapClient.new( client_config )
25
+ ModelHelper.soap_client= soap_client
26
+ @@connection_successful = soap_client.confirm_connection
25
27
  ModelHelper.base_url= url
26
28
  end
29
+
30
+ def self.connection?
31
+ @@connection_successful
32
+ end
27
33
  end
@@ -2,6 +2,12 @@ require File.expand_path('../test_helper', __FILE__)
2
2
  XPlanner::setup
3
3
 
4
4
  describe 'XPlanner+ SOAP interface' do
5
+ describe 'Soap Client' do
6
+ it 'Can connect to WSDL' do
7
+ XPlanner.connection?.should be_true
8
+ end
9
+ end
10
+
5
11
  describe 'Model: Project' do
6
12
  before(:all) do
7
13
  @myProject = XPlanner::Project.create( 'delete me', 'delete me: test project' )
@@ -27,7 +33,7 @@ describe 'XPlanner+ SOAP interface' do
27
33
  this_project.description.should eq ' O_o '
28
34
  end
29
35
 
30
- it 'creates link tot he project on XPlanner' do
36
+ it 'Link to the project on XPlanner' do
31
37
  (@myProject.link =~ URI::regexp).should_not be_nil
32
38
  end
33
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xplanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon
17
- requirement: &2181044700 !ruby/object:Gem::Requirement
17
+ requirement: &2164268280 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2181044700
25
+ version_requirements: *2164268280
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: nokogiri
28
- requirement: &2181044200 !ruby/object:Gem::Requirement
28
+ requirement: &2164267780 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.5.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2181044200
36
+ version_requirements: *2164267780
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activesupport
39
- requirement: &2181043740 !ruby/object:Gem::Requirement
39
+ requirement: &2164267320 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.2.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2181043740
47
+ version_requirements: *2164267320
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2181043360 !ruby/object:Gem::Requirement
50
+ requirement: &2164266940 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2181043360
58
+ version_requirements: *2164266940
59
59
  description: Ruby wrapper for XPlanner+ SOAP interface
60
60
  email:
61
61
  - whoojemaflip@gmail.com