pivotal-tracker 0.0.9.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/pivotal-tracker/iteration.rb +5 -1
- data/lib/pivotal-tracker/project.rb +6 -1
- data/pivotal-tracker.gemspec +4 -2
- data/spec/fixtures/activity.xml +112 -100
- data/spec/fixtures/created_story.xml +4 -4
- data/spec/fixtures/iterations_all.xml +92 -0
- data/spec/fixtures/iterations_current.xml +92 -0
- data/spec/fixtures/memberships.xml +2 -2
- data/spec/fixtures/project.xml +2 -2
- data/spec/fixtures/project_activity.xml +86 -74
- data/spec/fixtures/projects.xml +136 -13
- data/spec/fixtures/stale_fish.yml +22 -8
- data/spec/fixtures/stories.xml +97 -1
- data/spec/spec_helper.rb +4 -3
- data/spec/support/stale_fish_fixtures.rb +8 -0
- data/spec/unit/pivotal-tracker/activity_spec.rb +1 -1
- data/spec/unit/pivotal-tracker/iteration_spec.rb +23 -1
- metadata +5 -4
@@ -6,53 +6,67 @@
|
|
6
6
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/memberships
|
7
7
|
request_type: GET
|
8
8
|
update_method: StaleFishFixtures.update_memberships_fixture
|
9
|
-
last_updated_at: 2010-
|
9
|
+
last_updated_at: 2010-04-01T10:05:49-07:00
|
10
10
|
- projects:
|
11
11
|
file: 'projects.xml'
|
12
12
|
update_interval: 2.weeks
|
13
13
|
check_against: http://www.pivotaltracker.com/services/v3/projects
|
14
14
|
request_type: GET
|
15
15
|
update_method: StaleFishFixtures.update_projects_fixture
|
16
|
-
last_updated_at: 2010-
|
16
|
+
last_updated_at: 2010-04-01T10:05:49-07:00
|
17
17
|
- tasks:
|
18
18
|
file: 'tasks.xml'
|
19
19
|
update_interval: 2.weeks
|
20
20
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/stories/2606200/tasks
|
21
21
|
request_type: GET
|
22
22
|
update_method: StaleFishFixtures.update_tasks_fixture
|
23
|
-
last_updated_at: 2010-
|
23
|
+
last_updated_at: 2010-04-01T10:05:49-07:00
|
24
24
|
- project:
|
25
25
|
file: 'project.xml'
|
26
26
|
update_interval: 2.weeks
|
27
27
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022
|
28
28
|
request_type: GET
|
29
29
|
update_method: StaleFishFixtures.update_project_fixture
|
30
|
-
last_updated_at: 2010-
|
30
|
+
last_updated_at: 2010-04-01T10:05:49-07:00
|
31
31
|
- activity:
|
32
32
|
file: 'activity.xml'
|
33
33
|
update_interval: 2.weeks
|
34
34
|
check_against: http://www.pivotaltracker.com/services/v3/activities
|
35
35
|
request_type: GET
|
36
36
|
update_method: StaleFishFixtures.update_activity_fixture
|
37
|
-
last_updated_at: 2010-
|
37
|
+
last_updated_at: 2010-04-01T10:06:16-07:00
|
38
38
|
- stories:
|
39
39
|
file: 'stories.xml'
|
40
40
|
update_interval: 2.weeks
|
41
41
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/stories
|
42
42
|
request_type: GET
|
43
43
|
update_method: StaleFishFixtures.update_stories_fixture
|
44
|
-
last_updated_at: 2010-
|
44
|
+
last_updated_at: 2010-04-01T10:06:17-07:00
|
45
45
|
- project_activity:
|
46
46
|
file: 'project_activity.xml'
|
47
47
|
update_interval: 2.weeks
|
48
48
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/activities
|
49
49
|
request_type: GET
|
50
50
|
update_method: StaleFishFixtures.update_project_activity_fixture
|
51
|
-
last_updated_at: 2010-
|
51
|
+
last_updated_at: 2010-04-01T10:06:17-07:00
|
52
52
|
- create_story:
|
53
53
|
file: 'created_story.xml'
|
54
54
|
update_interval: 2.weeks
|
55
55
|
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/stories
|
56
56
|
request_type: POST
|
57
57
|
update_method: StaleFishFixtures.create_new_story
|
58
|
-
last_updated_at: 2010-
|
58
|
+
last_updated_at: 2010-04-01T10:06:18-07:00
|
59
|
+
- iterations_current:
|
60
|
+
file: 'iterations_current.xml'
|
61
|
+
update_interval: 2.weeks
|
62
|
+
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/iterations/current
|
63
|
+
request_type: GET
|
64
|
+
update_method: StaleFishFixtures.update_iterations_current_fixture
|
65
|
+
last_updated_at: 2010-04-01T11:13:44-07:00
|
66
|
+
- iterations_all:
|
67
|
+
file: 'iterations_all.xml'
|
68
|
+
update_interval: 2.weeks
|
69
|
+
check_against: http://www.pivotaltracker.com/services/v3/projects/59022/iterations
|
70
|
+
request_type: GET
|
71
|
+
update_method: StaleFishFixtures.update_iterations_all_fixture
|
72
|
+
last_updated_at: 2010-04-01T11:18:46-07:00
|
data/spec/fixtures/stories.xml
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<stories type="array" count="
|
2
|
+
<stories type="array" count="10" limit="20" total="10">
|
3
3
|
<story>
|
4
4
|
<id type="integer">2606200</id>
|
5
|
+
<project_id type="integer">59022</project_id>
|
5
6
|
<story_type>feature</story_type>
|
6
7
|
<url>http://www.pivotaltracker.com/story/show/2606200</url>
|
7
8
|
<estimate type="integer">2</estimate>
|
@@ -39,6 +40,7 @@
|
|
39
40
|
</story>
|
40
41
|
<story>
|
41
42
|
<id type="integer">2524690</id>
|
43
|
+
<project_id type="integer">59022</project_id>
|
42
44
|
<story_type>feature</story_type>
|
43
45
|
<url>http://www.pivotaltracker.com/story/show/2524690</url>
|
44
46
|
<estimate type="integer">3</estimate>
|
@@ -52,6 +54,7 @@
|
|
52
54
|
</story>
|
53
55
|
<story>
|
54
56
|
<id type="integer">2524689</id>
|
57
|
+
<project_id type="integer">59022</project_id>
|
55
58
|
<story_type>feature</story_type>
|
56
59
|
<url>http://www.pivotaltracker.com/story/show/2524689</url>
|
57
60
|
<estimate type="integer">2</estimate>
|
@@ -63,4 +66,97 @@
|
|
63
66
|
<updated_at type="datetime">2010/02/17 15:43:06 MST</updated_at>
|
64
67
|
<labels>test_dependent</labels>
|
65
68
|
</story>
|
69
|
+
<story>
|
70
|
+
<id type="integer">2641089</id>
|
71
|
+
<project_id type="integer">59022</project_id>
|
72
|
+
<story_type>feature</story_type>
|
73
|
+
<url>http://www.pivotaltracker.com/story/show/2641089</url>
|
74
|
+
<estimate type="integer">2</estimate>
|
75
|
+
<current_state>unstarted</current_state>
|
76
|
+
<description>This is just some description.</description>
|
77
|
+
<name>Tasks Test</name>
|
78
|
+
<requested_by>Justin Smestad</requested_by>
|
79
|
+
<owned_by>Terence Lee</owned_by>
|
80
|
+
<created_at type="datetime">2010/03/01 15:51:05 MST</created_at>
|
81
|
+
<updated_at type="datetime">2010/03/01 15:51:05 MST</updated_at>
|
82
|
+
<labels>test_dependent</labels>
|
83
|
+
</story>
|
84
|
+
<story>
|
85
|
+
<id type="integer">3014429</id>
|
86
|
+
<project_id type="integer">59022</project_id>
|
87
|
+
<story_type>feature</story_type>
|
88
|
+
<url>http://www.pivotaltracker.com/story/show/3014429</url>
|
89
|
+
<estimate type="integer">-1</estimate>
|
90
|
+
<current_state>unscheduled</current_state>
|
91
|
+
<description></description>
|
92
|
+
<name>Create stuff</name>
|
93
|
+
<requested_by>Justin Smestad</requested_by>
|
94
|
+
<created_at type="datetime">2010/04/01 06:59:26 MDT</created_at>
|
95
|
+
<updated_at type="datetime">2010/04/01 06:59:26 MDT</updated_at>
|
96
|
+
</story>
|
97
|
+
<story>
|
98
|
+
<id type="integer">3014248</id>
|
99
|
+
<project_id type="integer">59022</project_id>
|
100
|
+
<story_type>feature</story_type>
|
101
|
+
<url>http://www.pivotaltracker.com/story/show/3014248</url>
|
102
|
+
<estimate type="integer">-1</estimate>
|
103
|
+
<current_state>unscheduled</current_state>
|
104
|
+
<description></description>
|
105
|
+
<name>Create stuff</name>
|
106
|
+
<requested_by>Justin Smestad</requested_by>
|
107
|
+
<created_at type="datetime">2010/04/01 06:36:05 MDT</created_at>
|
108
|
+
<updated_at type="datetime">2010/04/01 06:36:05 MDT</updated_at>
|
109
|
+
</story>
|
110
|
+
<story>
|
111
|
+
<id type="integer">3014199</id>
|
112
|
+
<project_id type="integer">59022</project_id>
|
113
|
+
<story_type>feature</story_type>
|
114
|
+
<url>http://www.pivotaltracker.com/story/show/3014199</url>
|
115
|
+
<estimate type="integer">-1</estimate>
|
116
|
+
<current_state>unscheduled</current_state>
|
117
|
+
<description></description>
|
118
|
+
<name>Create stuff</name>
|
119
|
+
<requested_by>Justin Smestad</requested_by>
|
120
|
+
<created_at type="datetime">2010/04/01 06:30:29 MDT</created_at>
|
121
|
+
<updated_at type="datetime">2010/04/01 06:30:29 MDT</updated_at>
|
122
|
+
</story>
|
123
|
+
<story>
|
124
|
+
<id type="integer">2746766</id>
|
125
|
+
<project_id type="integer">59022</project_id>
|
126
|
+
<story_type>feature</story_type>
|
127
|
+
<url>http://www.pivotaltracker.com/story/show/2746766</url>
|
128
|
+
<estimate type="integer">-1</estimate>
|
129
|
+
<current_state>unscheduled</current_state>
|
130
|
+
<description></description>
|
131
|
+
<name>Create stuff</name>
|
132
|
+
<requested_by>Justin Smestad</requested_by>
|
133
|
+
<created_at type="datetime">2010/03/10 11:40:33 MST</created_at>
|
134
|
+
<updated_at type="datetime">2010/03/10 11:40:33 MST</updated_at>
|
135
|
+
</story>
|
136
|
+
<story>
|
137
|
+
<id type="integer">2641471</id>
|
138
|
+
<project_id type="integer">59022</project_id>
|
139
|
+
<story_type>feature</story_type>
|
140
|
+
<url>http://www.pivotaltracker.com/story/show/2641471</url>
|
141
|
+
<estimate type="integer">-1</estimate>
|
142
|
+
<current_state>unscheduled</current_state>
|
143
|
+
<description></description>
|
144
|
+
<name>sample creation</name>
|
145
|
+
<requested_by>Justin Smestad</requested_by>
|
146
|
+
<created_at type="datetime">2010/03/01 16:16:51 MST</created_at>
|
147
|
+
<updated_at type="datetime">2010/03/01 16:16:51 MST</updated_at>
|
148
|
+
</story>
|
149
|
+
<story>
|
150
|
+
<id type="integer">2641410</id>
|
151
|
+
<project_id type="integer">59022</project_id>
|
152
|
+
<story_type>feature</story_type>
|
153
|
+
<url>http://www.pivotaltracker.com/story/show/2641410</url>
|
154
|
+
<estimate type="integer">-1</estimate>
|
155
|
+
<current_state>unscheduled</current_state>
|
156
|
+
<description></description>
|
157
|
+
<name>sample creation</name>
|
158
|
+
<requested_by>Justin Smestad</requested_by>
|
159
|
+
<created_at type="datetime">2010/03/01 16:11:15 MST</created_at>
|
160
|
+
<updated_at type="datetime">2010/03/10 11:41:51 MST</updated_at>
|
161
|
+
</story>
|
66
162
|
</stories>
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
require 'stale_fish'
|
3
|
+
|
1
4
|
Bundler.require(:default, :runtime, :test)
|
2
5
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
6
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
@@ -6,10 +9,8 @@ require 'pivotal-tracker'
|
|
6
9
|
require 'spec'
|
7
10
|
require 'spec/autorun'
|
8
11
|
|
9
|
-
|
10
|
-
|
12
|
+
PROJECT_ID = ENV['PROJECT_ID'] || "59022"
|
11
13
|
TOKEN = 'a40c739c5c2499461fcae008dda48b8c'
|
12
|
-
#PROJECT_ID = '59022'
|
13
14
|
|
14
15
|
# Requires supporting files with custom matchers and macros, etc,
|
15
16
|
# in ./support/ and its subdirectories.
|
@@ -29,6 +29,14 @@ module StaleFishFixtures
|
|
29
29
|
connection["/projects/59022/activities"].get
|
30
30
|
end
|
31
31
|
|
32
|
+
def update_iterations_all_fixture
|
33
|
+
connection["/projects/59022/iterations"].get
|
34
|
+
end
|
35
|
+
|
36
|
+
def update_iterations_current_fixture
|
37
|
+
connection["/projects/59022/iterations/current"].get
|
38
|
+
end
|
39
|
+
|
32
40
|
def create_new_story
|
33
41
|
connection["/projects/59022/stories"].post("<story><name>Create stuff</name></story>", :content_type => 'application/xml')
|
34
42
|
end
|
@@ -1,8 +1,30 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
|
2
2
|
|
3
3
|
describe PivotalTracker::Iteration do
|
4
|
+
before do
|
5
|
+
@project = PivotalTracker::Project.find(PROJECT_ID)
|
6
|
+
end
|
4
7
|
|
5
|
-
|
8
|
+
describe ".all" do
|
9
|
+
before do
|
10
|
+
@iterations = PivotalTracker::Iteration.all(@project)
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should return an array of Iterations for the given Project" do
|
14
|
+
@iterations.should be_a(Array)
|
15
|
+
@iterations.first.should be_a(PivotalTracker::Iteration)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe ".current" do
|
20
|
+
before do
|
21
|
+
@iteration = PivotalTracker::Iteration.current(@project)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should return an array of Iterations for the given Project" do
|
25
|
+
@iteration.should be_a(PivotalTracker::Iteration)
|
26
|
+
end
|
27
|
+
end
|
6
28
|
|
7
29
|
end
|
8
30
|
|
metadata
CHANGED
@@ -4,10 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
- 0
|
8
|
-
- 9
|
9
7
|
- 1
|
10
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Justin Smestad
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-
|
19
|
+
date: 2010-04-01 00:00:00 -06:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -105,6 +104,8 @@ files:
|
|
105
104
|
- pivotal-tracker.gemspec
|
106
105
|
- spec/fixtures/activity.xml
|
107
106
|
- spec/fixtures/created_story.xml
|
107
|
+
- spec/fixtures/iterations_all.xml
|
108
|
+
- spec/fixtures/iterations_current.xml
|
108
109
|
- spec/fixtures/memberships.xml
|
109
110
|
- spec/fixtures/project.xml
|
110
111
|
- spec/fixtures/project_activity.xml
|