xplanner 0.0.7 → 0.0.8

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.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -25,7 +25,7 @@ module XPlanner
25
25
  def self.all
26
26
  rpc = :get_people
27
27
  path = [:get_people_response, :get_people_return, :get_people_return]
28
- fetch_from_remote( rpc, payload, path, Person )
28
+ fetch_from_remote( rpc, {}, path, Person )
29
29
  end
30
30
 
31
31
  def self.retrieve( id )
@@ -63,5 +63,10 @@ module XPlanner
63
63
  payload = { :personData => create_payload }
64
64
  remote_update( rpc, payload )
65
65
  end
66
+
67
+ def self.get_userid_from_username( username )
68
+ Person.all.each { |u| return Integer(u.id) if u.name == username }
69
+ return nil
70
+ end
66
71
  end
67
72
  end
@@ -19,7 +19,7 @@ module XPlanner
19
19
  def self.all
20
20
  rpc = :get_projects
21
21
  path = [:get_projects_response, :get_projects_return, :get_projects_return]
22
- fetch_from_remote( rpc, payload, path, Project )
22
+ fetch_from_remote( rpc, {}, path, Project )
23
23
  end
24
24
 
25
25
  def self.retrieve( id )
@@ -54,7 +54,7 @@ module XPlanner
54
54
  fetch_from_remote( rpc, payload, path, Task )
55
55
  end
56
56
 
57
- def self.create( story_id, name, description, disposition = 'planned', completed = 'false', type = 'Feature' )
57
+ def self.create( story_id, name, description, type = 'Task', disposition = 'planned', completed = 'false' )
58
58
  rpc = :add_task
59
59
  payload = { :taskData => {
60
60
  :story_id => story_id,
@@ -199,6 +199,12 @@ describe 'XPlanner+ SOAP interface' do
199
199
  result = @myPerson.delete
200
200
  result.should equal true
201
201
  end
202
+
203
+ it 'Turn username into UserId' do
204
+ uid = XPlanner::Person.get_userid_from_username( 'sysadmin' )
205
+ uid.should eq 1
206
+ uid.should_not be nil
207
+ end
202
208
  end
203
209
 
204
210
  end
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.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-22 00:00:00.000000000 +00:00
12
+ date: 2012-11-23 00:00:00.000000000 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon
17
- requirement: &2157635000 !ruby/object:Gem::Requirement
17
+ requirement: &2165091400 !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: *2157635000
25
+ version_requirements: *2165091400
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: nokogiri
28
- requirement: &2157634500 !ruby/object:Gem::Requirement
28
+ requirement: &2165090900 !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: *2157634500
36
+ version_requirements: *2165090900
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activesupport
39
- requirement: &2157634040 !ruby/object:Gem::Requirement
39
+ requirement: &2165090440 !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: *2157634040
47
+ version_requirements: *2165090440
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2157633660 !ruby/object:Gem::Requirement
50
+ requirement: &2165090060 !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: *2157633660
58
+ version_requirements: *2165090060
59
59
  description: Ruby wrapper for XPlanner+ SOAP interface
60
60
  email:
61
61
  - whoojemaflip@gmail.com