scrumninja 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile.lock +3 -1
- data/README.rdoc +25 -1
- data/lib/scrumninja/client.rb +25 -0
- data/lib/scrumninja/version.rb +1 -1
- data/lib/scrumninja.rb +21 -1
- data/spec/fixtures/project.xml +40 -0
- data/spec/fixtures/roles.xml +24 -0
- data/spec/fixtures/sprint.xml +75 -0
- data/spec/fixtures/sprints.xml +15 -0
- data/spec/fixtures/story.xml +21 -0
- data/spec/scrumninja_spec.rb +123 -5
- metadata +26 -16
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -4,13 +4,37 @@
|
|
4
4
|
|
5
5
|
ScrumNinja is a scrum management tool that allows you to easily manage plan sprints, manage your backlog, and create tasks and card walls. The ScrumNinja gem allows you to easily get data out of ScrumNinja and use it in your Ruby applications.
|
6
6
|
|
7
|
+
== Usage
|
8
|
+
|
9
|
+
First:
|
10
|
+
|
11
|
+
<tt>gem install scrumninja</tt>
|
12
|
+
|
13
|
+
Then:
|
14
|
+
|
15
|
+
<tt>my_projects = ScrumNinja.projects(my_api_key)</tt>
|
16
|
+
|
17
|
+
You can generate your API key at scrumninja.com under your account settings. Return values are Hashies, and properties within the standard API XML can be accessed as follows:
|
18
|
+
|
19
|
+
<tt>my_projects[0].name</tt>
|
20
|
+
|
21
|
+
Other methods supported are:
|
22
|
+
|
23
|
+
<tt>my_stories = ScrumNinja.project_stories(my_api_key,project_id) # returns stories in the given project's current sprint.</tt>
|
24
|
+
|
25
|
+
<tt>sprints = ScrumNinja.project_backlog(my_api_key,project_id) # returns sprints (and related stories) in the given project's backlog.</tt>
|
26
|
+
|
27
|
+
<tt>tasks = ScrumNinja.project_card_wall(my_api_key,project_id) # returns the card wall for the current sprint, represented as tasks.</tt>
|
28
|
+
|
29
|
+
<tt>tasks = ScrumNinja.story_tasks(my_api_key,story_id) # returns the tasks for the specified story.</tt>
|
30
|
+
|
7
31
|
== Compatibility
|
8
32
|
|
9
33
|
ScrumNinja is developed against 1.9.2.
|
10
34
|
|
11
35
|
= License
|
12
36
|
|
13
|
-
Copyright (c)
|
37
|
+
Copyright (c) 2011 Javier Muniz
|
14
38
|
|
15
39
|
Permission is hereby granted, free of charge, to any person obtaining
|
16
40
|
a copy of this software and associated documentation files (the
|
data/lib/scrumninja/client.rb
CHANGED
@@ -11,6 +11,11 @@ module ScrumNinja
|
|
11
11
|
response.projects
|
12
12
|
end
|
13
13
|
|
14
|
+
def project(project_id,options={})
|
15
|
+
response = get "http://scrumninja.com/projects/#{project_id}.xml", options
|
16
|
+
response.project
|
17
|
+
end
|
18
|
+
|
14
19
|
def project_stories(project_id,options={})
|
15
20
|
response = get "http://scrumninja.com/projects/#{project_id}/stories.xml", options
|
16
21
|
response.stories
|
@@ -21,11 +26,31 @@ module ScrumNinja
|
|
21
26
|
response.sprints
|
22
27
|
end
|
23
28
|
|
29
|
+
def project_sprints(project_id,options={})
|
30
|
+
response = get "http://scrumninja.com/projects/#{project_id}/sprints.xml", options
|
31
|
+
response.sprints
|
32
|
+
end
|
33
|
+
|
24
34
|
def project_card_wall(project_id,options={})
|
25
35
|
response = get "http://scrumninja.com/projects/#{project_id}/card_wall.xml", options
|
26
36
|
response.tasks
|
27
37
|
end
|
28
38
|
|
39
|
+
def project_roles(project_id,options={})
|
40
|
+
response = get "http://scrumninja.com/projects/#{project_id}/project_roles.xml", options
|
41
|
+
response.project_roles
|
42
|
+
end
|
43
|
+
|
44
|
+
def project_sprint(project_id,sprint_id,options={})
|
45
|
+
response = get "http://scrumninja.com/projects/#{project_id}/sprints/#{sprint_id}.xml", options
|
46
|
+
response.sprint
|
47
|
+
end
|
48
|
+
|
49
|
+
def project_story(project_id,story_id,options={})
|
50
|
+
response = get "http://scrumninja.com/projects/#{project_id}/stories/#{story_id}.xml", options
|
51
|
+
response.story
|
52
|
+
end
|
53
|
+
|
29
54
|
def story_tasks(story_id,options={})
|
30
55
|
response = get "http://scrumninja.com/stories/#{story_id}/tasks.xml", options
|
31
56
|
response.tasks
|
data/lib/scrumninja/version.rb
CHANGED
data/lib/scrumninja.rb
CHANGED
@@ -13,6 +13,10 @@ module ScrumNinja
|
|
13
13
|
client(api_key).projects
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.project(api_key,project_id)
|
17
|
+
client(api_key).project project_id
|
18
|
+
end
|
19
|
+
|
16
20
|
def self.project_stories(api_key,project_id)
|
17
21
|
client(api_key).project_stories project_id
|
18
22
|
end
|
@@ -21,11 +25,27 @@ module ScrumNinja
|
|
21
25
|
client(api_key).project_backlog project_id
|
22
26
|
end
|
23
27
|
|
28
|
+
def self.project_sprints(api_key,project_id)
|
29
|
+
client(api_key).project_sprints project_id
|
30
|
+
end
|
31
|
+
|
24
32
|
def self.project_card_wall(api_key,project_id)
|
25
33
|
client(api_key).project_card_wall project_id
|
26
34
|
end
|
27
35
|
|
36
|
+
def self.project_roles(api_key,project_id)
|
37
|
+
client(api_key).project_roles project_id
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.project_sprint(api_key,project_id,sprint_id)
|
41
|
+
client(api_key).project_sprint project_id, sprint_id
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.project_story(api_key,project_id,story_id)
|
45
|
+
client(api_key).project_story project_id, story_id
|
46
|
+
end
|
47
|
+
|
28
48
|
def self.story_tasks(api_key,story_id)
|
29
49
|
client(api_key).story_tasks story_id
|
30
|
-
|
50
|
+
end
|
31
51
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project>
|
3
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
4
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
5
|
+
<future-by-average type="boolean">true</future-by-average>
|
6
|
+
<id type="integer">8991</id>
|
7
|
+
<name>Tutorial Project</name>
|
8
|
+
<numeric-complexities type="yaml">---
|
9
|
+
- "1"
|
10
|
+
- "2"
|
11
|
+
- "3"
|
12
|
+
- "5"
|
13
|
+
- "8"
|
14
|
+
- "13"
|
15
|
+
- "20"
|
16
|
+
- "40"
|
17
|
+
- "100"
|
18
|
+
</numeric-complexities>
|
19
|
+
<open-source-url></open-source-url>
|
20
|
+
<page-views type="integer">0</page-views>
|
21
|
+
<ssl type="boolean" nil="true"></ssl>
|
22
|
+
<time-zone nil="true"></time-zone>
|
23
|
+
<total-page-views type="integer">8</total-page-views>
|
24
|
+
<track-only-story-points type="boolean">false</track-only-story-points>
|
25
|
+
<updated-at type="datetime">2011-06-10T01:03:23-07:00</updated-at>
|
26
|
+
<updated-by-user-id type="integer" nil="true"></updated-by-user-id>
|
27
|
+
<work-days type="yaml">---
|
28
|
+
- 1
|
29
|
+
- 2
|
30
|
+
- 3
|
31
|
+
- 4
|
32
|
+
- 5
|
33
|
+
</work-days>
|
34
|
+
<link href="http://scrumninja.com/projects/8991.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show" rel="self"/>
|
35
|
+
<link href="http://scrumninja.com/projects/8991/project_roles.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="project roles" rel="users"/>
|
36
|
+
<link href="http://scrumninja.com/projects/8991/stories.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="stories in current sprint" rel="stories"/>
|
37
|
+
<link type="text/plain" href="http://scrumninja.com/projects/8991/export?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="export" rel="self"/>
|
38
|
+
<link href="http://scrumninja.com/projects/8991/backlog/index.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="future stories" rel="stories"/>
|
39
|
+
<link href="http://scrumninja.com/projects/8991/sprints.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="sprint history" rel="sprints"/>
|
40
|
+
</project>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project-roles type="array">
|
3
|
+
<project-role>
|
4
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
5
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
6
|
+
<id type="integer">13622</id>
|
7
|
+
<project-id type="integer">8991</project-id>
|
8
|
+
<receive-notification-email type="boolean">true</receive-notification-email>
|
9
|
+
<role>admin</role>
|
10
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
11
|
+
<updated-by-user-id type="integer">8218</updated-by-user-id>
|
12
|
+
<user-id type="integer">8218</user-id>
|
13
|
+
<user>
|
14
|
+
<email>jmvoodoo@gmail.com</email>
|
15
|
+
<first-name>Javier</first-name>
|
16
|
+
<id type="integer">8218</id>
|
17
|
+
<im nil="true"></im>
|
18
|
+
<initials>JM</initials>
|
19
|
+
<last-name>Muniz</last-name>
|
20
|
+
<location nil="true"></location>
|
21
|
+
<phone-number nil="true"></phone-number>
|
22
|
+
</user>
|
23
|
+
</project-role>
|
24
|
+
</project-roles>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<sprint>
|
3
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
4
|
+
<ends-on type="date">2011-06-22</ends-on>
|
5
|
+
<goal>Learn how to use the system</goal>
|
6
|
+
<id type="integer">26248</id>
|
7
|
+
<number type="integer">0</number>
|
8
|
+
<project-id type="integer">8991</project-id>
|
9
|
+
<starts-on type="date">2011-06-09</starts-on>
|
10
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
11
|
+
<velocity type="integer">8</velocity>
|
12
|
+
<stories type="array">
|
13
|
+
<story>
|
14
|
+
<accepted-on type="date" nil="true"></accepted-on>
|
15
|
+
<complexity>CHORE</complexity>
|
16
|
+
<content nil="true"></content>
|
17
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
18
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
19
|
+
<delivered-on type="date" nil="true"></delivered-on>
|
20
|
+
<id type="integer">139444</id>
|
21
|
+
<name>Infrastructure for project</name>
|
22
|
+
<owner-user-id type="integer" nil="true"></owner-user-id>
|
23
|
+
<position type="float">1.0</position>
|
24
|
+
<rejection-reason nil="true"></rejection-reason>
|
25
|
+
<status>pending</status>
|
26
|
+
<story-collection-id type="integer">26248</story-collection-id>
|
27
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
28
|
+
<updated-by-user-id type="integer">8218</updated-by-user-id>
|
29
|
+
<hours_remaining>2.5</hours_remaining>
|
30
|
+
<link href="http://scrumninja.com/projects/8991/stories/139444.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show" rel="self"/>
|
31
|
+
<link href="http://scrumninja.com/stories/139444/tasks.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" rel="tasks"/>
|
32
|
+
</story>
|
33
|
+
<story>
|
34
|
+
<accepted-on type="date" nil="true"></accepted-on>
|
35
|
+
<complexity>3</complexity>
|
36
|
+
<content>As a user, I want to register so that I can gain access to the system</content>
|
37
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
38
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
39
|
+
<delivered-on type="date" nil="true"></delivered-on>
|
40
|
+
<id type="integer">139445</id>
|
41
|
+
<name>Signup</name>
|
42
|
+
<owner-user-id type="integer" nil="true"></owner-user-id>
|
43
|
+
<position type="float">3.0</position>
|
44
|
+
<rejection-reason nil="true"></rejection-reason>
|
45
|
+
<status>pending</status>
|
46
|
+
<story-collection-id type="integer">26248</story-collection-id>
|
47
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
48
|
+
<updated-by-user-id type="integer">8218</updated-by-user-id>
|
49
|
+
<hours_remaining>12.0</hours_remaining>
|
50
|
+
<link href="http://scrumninja.com/projects/8991/stories/139445.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show" rel="self"/>
|
51
|
+
<link href="http://scrumninja.com/stories/139445/tasks.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" rel="tasks"/>
|
52
|
+
</story>
|
53
|
+
<story>
|
54
|
+
<accepted-on type="date" nil="true"></accepted-on>
|
55
|
+
<complexity>3</complexity>
|
56
|
+
<content>As a user, I want to login so I can protect my info from the public eye </content>
|
57
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
58
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
59
|
+
<delivered-on type="date" nil="true"></delivered-on>
|
60
|
+
<id type="integer">139446</id>
|
61
|
+
<name>Login Form</name>
|
62
|
+
<owner-user-id type="integer" nil="true"></owner-user-id>
|
63
|
+
<position type="float">4.0</position>
|
64
|
+
<rejection-reason nil="true"></rejection-reason>
|
65
|
+
<status>pending</status>
|
66
|
+
<story-collection-id type="integer">26248</story-collection-id>
|
67
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
68
|
+
<updated-by-user-id type="integer">8218</updated-by-user-id>
|
69
|
+
<hours_remaining>5.0</hours_remaining>
|
70
|
+
<link href="http://scrumninja.com/projects/8991/stories/139446.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show" rel="self"/>
|
71
|
+
<link href="http://scrumninja.com/stories/139446/tasks.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" rel="tasks"/>
|
72
|
+
</story>
|
73
|
+
</stories>
|
74
|
+
<link href="http://scrumninja.com/projects/8991/sprints/26248.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show (with stories)" rel="self"/>
|
75
|
+
</sprint>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<sprints type="array">
|
3
|
+
<sprint>
|
4
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
5
|
+
<ends-on type="date">2011-06-22</ends-on>
|
6
|
+
<goal>Learn how to use the system</goal>
|
7
|
+
<id type="integer">26248</id>
|
8
|
+
<number type="integer">0</number>
|
9
|
+
<project-id type="integer">8991</project-id>
|
10
|
+
<starts-on type="date">2011-06-09</starts-on>
|
11
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
12
|
+
<velocity type="integer">8</velocity>
|
13
|
+
<link href="http://scrumninja.com/projects/8991/sprints/26248.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show (with stories)" rel="self"/>
|
14
|
+
</sprint>
|
15
|
+
</sprints>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<story>
|
3
|
+
<accepted-on type="date" nil="true"></accepted-on>
|
4
|
+
<complexity>CHORE</complexity>
|
5
|
+
<content nil="true"></content>
|
6
|
+
<created-at type="datetime">2011-06-09T12:02:25-07:00</created-at>
|
7
|
+
<created-by-user-id type="integer">8218</created-by-user-id>
|
8
|
+
<delivered-on type="date" nil="true"></delivered-on>
|
9
|
+
<id type="integer">139444</id>
|
10
|
+
<name>Infrastructure for project</name>
|
11
|
+
<owner-user-id type="integer" nil="true"></owner-user-id>
|
12
|
+
<position type="float">1.0</position>
|
13
|
+
<rejection-reason nil="true"></rejection-reason>
|
14
|
+
<status>pending</status>
|
15
|
+
<story-collection-id type="integer">26248</story-collection-id>
|
16
|
+
<updated-at type="datetime">2011-06-09T12:02:25-07:00</updated-at>
|
17
|
+
<updated-by-user-id type="integer">8218</updated-by-user-id>
|
18
|
+
<hours_remaining>2.5</hours_remaining>
|
19
|
+
<link href="http://scrumninja.com/projects/8991/stories/139444.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" title="show" rel="self"/>
|
20
|
+
<link href="http://scrumninja.com/stories/139444/tasks.xml?api_key=a0d550405d37584fff59dd9e86cbe0cd88188e35" rel="tasks"/>
|
21
|
+
</story>
|
data/spec/scrumninja_spec.rb
CHANGED
@@ -4,6 +4,7 @@ require 'helper'
|
|
4
4
|
API_KEY = "a0d550405d37584fff59dd9e86cbe0cd88188e35"
|
5
5
|
PROJECT_ID = 8991
|
6
6
|
STORY_ID = 139444
|
7
|
+
SPRINT_ID = 26248
|
7
8
|
|
8
9
|
# The projects method
|
9
10
|
describe ScrumNinja, ".projects" do
|
@@ -24,7 +25,30 @@ describe ScrumNinja, ".projects" do
|
|
24
25
|
projects = ScrumNinja.projects(API_KEY)
|
25
26
|
projects.should be_an Array
|
26
27
|
projects[0].name.should == "Tutorial Project"
|
27
|
-
puts projects
|
28
|
+
puts projects
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
# The project method
|
33
|
+
describe ScrumNinja, ".project" do
|
34
|
+
before do
|
35
|
+
stub_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}.xml").
|
36
|
+
with(:query => {:api_key => API_KEY}).
|
37
|
+
to_return(:body => fixture('project.xml'), :headers => {'Content-Type' => 'application/xml; charset=utf-8'})
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should request the correct resource" do
|
41
|
+
ScrumNinja.project(API_KEY,PROJECT_ID)
|
42
|
+
a_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}.xml").
|
43
|
+
with(:query => {:api_key => API_KEY}).
|
44
|
+
should have_been_made
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should return the correct results" do
|
48
|
+
project = ScrumNinja.project(API_KEY,PROJECT_ID)
|
49
|
+
project.should be_an Hash
|
50
|
+
project.name.should == "Tutorial Project"
|
51
|
+
puts project
|
28
52
|
end
|
29
53
|
end
|
30
54
|
|
@@ -47,7 +71,7 @@ describe ScrumNinja, ".project_stories" do
|
|
47
71
|
stories = ScrumNinja.project_stories(API_KEY,PROJECT_ID)
|
48
72
|
stories.should be_an Array
|
49
73
|
stories[0].name.should == "Infrastructure for project"
|
50
|
-
puts stories[0]
|
74
|
+
puts stories[0]
|
51
75
|
end
|
52
76
|
end
|
53
77
|
|
@@ -70,7 +94,30 @@ describe ScrumNinja, ".project_backlog" do
|
|
70
94
|
sprints = ScrumNinja.project_backlog(API_KEY,PROJECT_ID)
|
71
95
|
sprints.should be_an Array
|
72
96
|
sprints[0].stories[0].name.should == "Reset Password"
|
73
|
-
puts sprints[0].stories[0]
|
97
|
+
puts sprints[0].stories[0]
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# The project_sprints method
|
102
|
+
describe ScrumNinja, ".project_sprints" do
|
103
|
+
before do
|
104
|
+
stub_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/sprints.xml").
|
105
|
+
with(:query => {:api_key => API_KEY}).
|
106
|
+
to_return(:body => fixture('sprints.xml'), :headers => {'Content-Type' => 'application/xml; charset=utf-8'})
|
107
|
+
end
|
108
|
+
|
109
|
+
it "should request the correct resource" do
|
110
|
+
ScrumNinja.project_sprints(API_KEY,PROJECT_ID)
|
111
|
+
a_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/sprints.xml").
|
112
|
+
with(:query => {:api_key => API_KEY}).
|
113
|
+
should have_been_made
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should return the correct results" do
|
117
|
+
sprints = ScrumNinja.project_sprints(API_KEY,PROJECT_ID)
|
118
|
+
sprints.should be_an Array
|
119
|
+
sprints[0].goal.should == "Learn how to use the system"
|
120
|
+
puts sprints[0]
|
74
121
|
end
|
75
122
|
end
|
76
123
|
|
@@ -93,7 +140,76 @@ describe ScrumNinja, ".project_card_wall" do
|
|
93
140
|
tasks = ScrumNinja.project_card_wall(API_KEY,PROJECT_ID)
|
94
141
|
tasks.should be_an Array
|
95
142
|
tasks[0].name.should == "configure database.yml"
|
96
|
-
puts tasks[0]
|
143
|
+
puts tasks[0]
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# The project_roles method
|
148
|
+
describe ScrumNinja, ".project_roles" do
|
149
|
+
before do
|
150
|
+
stub_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/project_roles.xml").
|
151
|
+
with(:query => {:api_key => API_KEY}).
|
152
|
+
to_return(:body => fixture('roles.xml'), :headers => {'Content-Type' => 'application/xml; charset=utf-8'})
|
153
|
+
end
|
154
|
+
|
155
|
+
it "should request the correct resource" do
|
156
|
+
ScrumNinja.project_roles(API_KEY,PROJECT_ID)
|
157
|
+
a_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/project_roles.xml").
|
158
|
+
with(:query => {:api_key => API_KEY}).
|
159
|
+
should have_been_made
|
160
|
+
end
|
161
|
+
|
162
|
+
it "should return the correct results" do
|
163
|
+
roles = ScrumNinja.project_roles(API_KEY,PROJECT_ID)
|
164
|
+
roles.should be_an Array
|
165
|
+
puts roles[0]
|
166
|
+
roles[0].user.first_name.should == "Javier"
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# The project_sprint method
|
171
|
+
describe ScrumNinja, ".project_sprint" do
|
172
|
+
before do
|
173
|
+
stub_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/sprints/#{SPRINT_ID}.xml").
|
174
|
+
with(:query => {:api_key => API_KEY}).
|
175
|
+
to_return(:body => fixture('sprint.xml'), :headers => {'Content-Type' => 'application/xml; charset=utf-8'})
|
176
|
+
end
|
177
|
+
|
178
|
+
it "should request the correct resource" do
|
179
|
+
ScrumNinja.project_sprint(API_KEY,PROJECT_ID,SPRINT_ID)
|
180
|
+
a_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/sprints/#{SPRINT_ID}.xml").
|
181
|
+
with(:query => {:api_key => API_KEY}).
|
182
|
+
should have_been_made
|
183
|
+
end
|
184
|
+
|
185
|
+
it "should return the correct results" do
|
186
|
+
sprint = ScrumNinja.project_sprint(API_KEY,PROJECT_ID,SPRINT_ID)
|
187
|
+
sprint.should be_an Hash
|
188
|
+
puts sprint[0]
|
189
|
+
sprint.goal.should == "Learn how to use the system"
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
# The project_story method
|
194
|
+
describe ScrumNinja, ".project_story" do
|
195
|
+
before do
|
196
|
+
stub_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/stories/#{STORY_ID}.xml").
|
197
|
+
with(:query => {:api_key => API_KEY}).
|
198
|
+
to_return(:body => fixture('story.xml'), :headers => {'Content-Type' => 'application/xml; charset=utf-8'})
|
199
|
+
end
|
200
|
+
|
201
|
+
it "should request the correct resource" do
|
202
|
+
ScrumNinja.project_story(API_KEY,PROJECT_ID,STORY_ID)
|
203
|
+
a_request(:get, "http://scrumninja.com/projects/#{PROJECT_ID}/stories/#{STORY_ID}.xml").
|
204
|
+
with(:query => {:api_key => API_KEY}).
|
205
|
+
should have_been_made
|
206
|
+
end
|
207
|
+
|
208
|
+
it "should return the correct results" do
|
209
|
+
story = ScrumNinja.project_story(API_KEY,PROJECT_ID,STORY_ID)
|
210
|
+
story.should be_an Hash
|
211
|
+
puts story[0]
|
212
|
+
story.name.should == "Infrastructure for project"
|
97
213
|
end
|
98
214
|
end
|
99
215
|
|
@@ -116,6 +232,8 @@ describe ScrumNinja, ".story_tasks" do
|
|
116
232
|
tasks = ScrumNinja.story_tasks(API_KEY,STORY_ID)
|
117
233
|
tasks.should be_an Array
|
118
234
|
tasks[0].name.should == "configure database.yml"
|
119
|
-
puts tasks[0]
|
235
|
+
puts tasks[0]
|
120
236
|
end
|
121
237
|
end
|
238
|
+
|
239
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrumninja
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-06-
|
12
|
+
date: 2011-06-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152497940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.6'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152497940
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: webmock
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152497440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.5'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152497440
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: hashie
|
38
|
-
requirement: &
|
38
|
+
requirement: &2152496980 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2152496980
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: multi_xml
|
49
|
-
requirement: &
|
49
|
+
requirement: &2152496520 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.2.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2152496520
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: faraday_middleware
|
60
|
-
requirement: &
|
60
|
+
requirement: &2152496060 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.6.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2152496060
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: hashie
|
71
|
-
requirement: &
|
71
|
+
requirement: &2152495600 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.0.0
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2152495600
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: multi_xml
|
82
|
-
requirement: &
|
82
|
+
requirement: &2152495140 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
version: 0.2.0
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2152495140
|
91
91
|
description: Wrapper for the Scrumninja backlog/sprint management tool.
|
92
92
|
email: javier@granicus.com
|
93
93
|
executables: []
|
@@ -107,8 +107,13 @@ files:
|
|
107
107
|
- scrumninja.gemspec
|
108
108
|
- spec/fixtures/backlog.xml
|
109
109
|
- spec/fixtures/card_wall.xml
|
110
|
+
- spec/fixtures/project.xml
|
110
111
|
- spec/fixtures/projects.xml
|
112
|
+
- spec/fixtures/roles.xml
|
113
|
+
- spec/fixtures/sprint.xml
|
114
|
+
- spec/fixtures/sprints.xml
|
111
115
|
- spec/fixtures/stories.xml
|
116
|
+
- spec/fixtures/story.xml
|
112
117
|
- spec/fixtures/tasks.xml
|
113
118
|
- spec/helper.rb
|
114
119
|
- spec/scrumninja_spec.rb
|
@@ -139,8 +144,13 @@ summary: Scrumninja API Wrapper
|
|
139
144
|
test_files:
|
140
145
|
- spec/fixtures/backlog.xml
|
141
146
|
- spec/fixtures/card_wall.xml
|
147
|
+
- spec/fixtures/project.xml
|
142
148
|
- spec/fixtures/projects.xml
|
149
|
+
- spec/fixtures/roles.xml
|
150
|
+
- spec/fixtures/sprint.xml
|
151
|
+
- spec/fixtures/sprints.xml
|
143
152
|
- spec/fixtures/stories.xml
|
153
|
+
- spec/fixtures/story.xml
|
144
154
|
- spec/fixtures/tasks.xml
|
145
155
|
- spec/helper.rb
|
146
156
|
- spec/scrumninja_spec.rb
|