taskmapper-pivotal 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.travis.yml +4 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +50 -0
- data/LICENSE +22 -0
- data/README.markdown +17 -0
- data/Rakefile +41 -0
- data/VERSION +1 -0
- data/lib/pivotal/pivotal-api.rb +74 -0
- data/lib/provider/comment.rb +70 -0
- data/lib/provider/pivotal.rb +37 -0
- data/lib/provider/project.rb +55 -0
- data/lib/provider/ticket.rb +124 -0
- data/lib/taskmapper-pivotal.rb +6 -0
- data/spec/comments_spec.rb +67 -0
- data/spec/fixtures/activities.xml +39 -0
- data/spec/fixtures/notes/1946635.xml +7 -0
- data/spec/fixtures/notes.xml +15 -0
- data/spec/fixtures/projects/93790.xml +33 -0
- data/spec/fixtures/projects.xml +35 -0
- data/spec/fixtures/stories/4056827.xml +29 -0
- data/spec/fixtures/stories.xml +121 -0
- data/spec/projects_spec.rb +70 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/taskmapper-pivotal_spec.rb +22 -0
- data/spec/tickets_spec.rb +114 -0
- data/taskmapper-pivotal.gemspec +78 -0
- metadata +129 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project>
|
3
|
+
<id>93790</id>
|
4
|
+
<name>TaskMapper</name>
|
5
|
+
<iteration_length type="integer">1</iteration_length>
|
6
|
+
<week_start_day>Monday</week_start_day>
|
7
|
+
<point_scale>0,1,2,3</point_scale>
|
8
|
+
<account>Hong Quach</account>
|
9
|
+
<velocity_scheme>Average of 3 iterations</velocity_scheme>
|
10
|
+
<current_velocity>10</current_velocity>
|
11
|
+
<initial_velocity>10</initial_velocity>
|
12
|
+
<number_of_done_iterations_to_show>12</number_of_done_iterations_to_show>
|
13
|
+
<labels></labels>
|
14
|
+
<last_activity_at type="datetime">2010/07/06 21:47:40 UTC</last_activity_at>
|
15
|
+
<allow_attachments>true</allow_attachments>
|
16
|
+
<public>false</public>
|
17
|
+
<use_https>false</use_https>
|
18
|
+
<bugs_and_chores_are_estimatable>false</bugs_and_chores_are_estimatable>
|
19
|
+
<commit_mode>false</commit_mode>
|
20
|
+
<memberships>
|
21
|
+
<membership>
|
22
|
+
<id>305546</id>
|
23
|
+
<person>
|
24
|
+
<email>hong.quach@abigfisch.com</email>
|
25
|
+
<name>Hong Quach</name>
|
26
|
+
<initials>HQ</initials>
|
27
|
+
</person>
|
28
|
+
<role>Owner</role>
|
29
|
+
</membership>
|
30
|
+
</memberships>
|
31
|
+
<integrations>
|
32
|
+
</integrations>
|
33
|
+
</project>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<projects type="array">
|
3
|
+
<project>
|
4
|
+
<id>93790</id>
|
5
|
+
<name>TaskMapper</name>
|
6
|
+
<iteration_length type="integer">1</iteration_length>
|
7
|
+
<week_start_day>Monday</week_start_day>
|
8
|
+
<point_scale>0,1,2,3</point_scale>
|
9
|
+
<account>Hong Quach</account>
|
10
|
+
<velocity_scheme>Average of 3 iterations</velocity_scheme>
|
11
|
+
<current_velocity>10</current_velocity>
|
12
|
+
<initial_velocity>10</initial_velocity>
|
13
|
+
<number_of_done_iterations_to_show>12</number_of_done_iterations_to_show>
|
14
|
+
<labels></labels>
|
15
|
+
<last_activity_at type="datetime">2010/07/06 21:47:40 UTC</last_activity_at>
|
16
|
+
<allow_attachments>true</allow_attachments>
|
17
|
+
<public>false</public>
|
18
|
+
<use_https>false</use_https>
|
19
|
+
<bugs_and_chores_are_estimatable>false</bugs_and_chores_are_estimatable>
|
20
|
+
<commit_mode>false</commit_mode>
|
21
|
+
<memberships>
|
22
|
+
<membership>
|
23
|
+
<id>305546</id>
|
24
|
+
<person>
|
25
|
+
<email>hong.quach@abigfisch.com</email>
|
26
|
+
<name>Hong Quach</name>
|
27
|
+
<initials>HQ</initials>
|
28
|
+
</person>
|
29
|
+
<role>Owner</role>
|
30
|
+
</membership>
|
31
|
+
</memberships>
|
32
|
+
<integrations>
|
33
|
+
</integrations>
|
34
|
+
</project>
|
35
|
+
</projects>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<story>
|
3
|
+
<id type="integer">4056827</id>
|
4
|
+
<project_id type="integer">93790</project_id>
|
5
|
+
<story_type>feature</story_type>
|
6
|
+
<url>http://www.pivotaltracker.com/story/show/4056827</url>
|
7
|
+
<estimate type="integer">-1</estimate>
|
8
|
+
<current_state>unstarted</current_state>
|
9
|
+
<description>Hi hi. Description!</description>
|
10
|
+
<name>Hello</name>
|
11
|
+
<requested_by>Hong Quach</requested_by>
|
12
|
+
<owned_by>Hong Quach</owned_by>
|
13
|
+
<created_at type="datetime">2010/06/26 22:31:08 UTC</created_at>
|
14
|
+
<updated_at type="datetime">2010/06/26 22:56:02 UTC</updated_at>
|
15
|
+
<notes type="array">
|
16
|
+
<note>
|
17
|
+
<id type="integer">1946635</id>
|
18
|
+
<text>note</text>
|
19
|
+
<author>Hong Quach</author>
|
20
|
+
<noted_at type="datetime">2010/07/03 08:09:38 UTC</noted_at>
|
21
|
+
</note>
|
22
|
+
<note>
|
23
|
+
<id type="integer">1946719</id>
|
24
|
+
<text>etuhanoeth naou</text>
|
25
|
+
<author>Hong Quach</author>
|
26
|
+
<noted_at type="datetime">2010/07/03 09:57:03 UTC</noted_at>
|
27
|
+
</note>
|
28
|
+
</notes>
|
29
|
+
</story>
|
@@ -0,0 +1,121 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<stories type="array" count="17" total="17">
|
3
|
+
<story>
|
4
|
+
<id type="integer">4056827</id>
|
5
|
+
<project_id type="integer">93790</project_id>
|
6
|
+
<story_type>feature</story_type>
|
7
|
+
<url>http://www.pivotaltracker.com/story/show/4056827</url>
|
8
|
+
<estimate type="integer">-1</estimate>
|
9
|
+
<current_state>unstarted</current_state>
|
10
|
+
<description>Hi hi. Description!</description>
|
11
|
+
<name>Hello</name>
|
12
|
+
<requested_by>Hong Quach</requested_by>
|
13
|
+
<created_at type="datetime">2010/06/26 22:31:08 UTC</created_at>
|
14
|
+
<updated_at type="datetime">2010/06/26 22:56:02 UTC</updated_at>
|
15
|
+
<notes type="array">
|
16
|
+
<note>
|
17
|
+
<id type="integer">1946635</id>
|
18
|
+
<text>note</text>
|
19
|
+
<author>Hong Quach</author>
|
20
|
+
<noted_at type="datetime">2010/07/03 08:09:38 UTC</noted_at>
|
21
|
+
</note>
|
22
|
+
<note>
|
23
|
+
<id type="integer">1946719</id>
|
24
|
+
<text>etuhanoeth naou</text>
|
25
|
+
<author>Hong Quach</author>
|
26
|
+
<noted_at type="datetime">2010/07/03 09:57:03 UTC</noted_at>
|
27
|
+
</note>
|
28
|
+
</notes>
|
29
|
+
</story>
|
30
|
+
<story>
|
31
|
+
<id type="integer">4175660</id>
|
32
|
+
<project_id type="integer">93790</project_id>
|
33
|
+
<story_type>feature</story_type>
|
34
|
+
<url>http://www.pivotaltracker.com/story/show/4175660</url>
|
35
|
+
<estimate type="integer">-1</estimate>
|
36
|
+
<current_state>unscheduled</current_state>
|
37
|
+
<description></description>
|
38
|
+
<name>Some ticket</name>
|
39
|
+
<requested_by>Hong Quach</requested_by>
|
40
|
+
<created_at type="datetime">2010/07/06 21:47:38 UTC</created_at>
|
41
|
+
<updated_at type="datetime">2010/07/06 21:47:38 UTC</updated_at>
|
42
|
+
<notes type="array">
|
43
|
+
<note>
|
44
|
+
<id type="integer">1959905</id>
|
45
|
+
<text>Yeah yeah</text>
|
46
|
+
<author>Hong Quach</author>
|
47
|
+
<noted_at type="datetime">2010/07/06 21:47:39 UTC</noted_at>
|
48
|
+
</note>
|
49
|
+
<note>
|
50
|
+
<id type="integer">1959906</id>
|
51
|
+
<text>ntua aeotnh aouetn
|
52
|
+
|
53
|
+
Hmm...</text>
|
54
|
+
<author>Hong Quach</author>
|
55
|
+
<noted_at type="datetime">2010/07/06 21:47:40 UTC</noted_at>
|
56
|
+
</note>
|
57
|
+
</notes>
|
58
|
+
</story>
|
59
|
+
<story>
|
60
|
+
<id type="integer">4175659</id>
|
61
|
+
<project_id type="integer">93790</project_id>
|
62
|
+
<story_type>feature</story_type>
|
63
|
+
<url>http://www.pivotaltracker.com/story/show/4175659</url>
|
64
|
+
<estimate type="integer">-1</estimate>
|
65
|
+
<current_state>unscheduled</current_state>
|
66
|
+
<description></description>
|
67
|
+
<name>Cheese cakes</name>
|
68
|
+
<requested_by>Hong Quach</requested_by>
|
69
|
+
<created_at type="datetime">2010/07/06 21:47:22 UTC</created_at>
|
70
|
+
<updated_at type="datetime">2010/07/06 21:47:22 UTC</updated_at>
|
71
|
+
<notes type="array">
|
72
|
+
<note>
|
73
|
+
<id type="integer">1959894</id>
|
74
|
+
<text>nt.,hntHOETUHAONTUHANOSTEUHANTOU</text>
|
75
|
+
<author>Hong Quach</author>
|
76
|
+
<noted_at type="datetime">2010/07/06 21:47:23 UTC</noted_at>
|
77
|
+
</note>
|
78
|
+
<note>
|
79
|
+
<id type="integer">1959895</id>
|
80
|
+
<text>Rokatoo</text>
|
81
|
+
<author>Hong Quach</author>
|
82
|
+
<noted_at type="datetime">2010/07/06 21:47:25 UTC</noted_at>
|
83
|
+
</note>
|
84
|
+
<note>
|
85
|
+
<id type="integer">1959897</id>
|
86
|
+
<text>This is a ticket set from tm console</text>
|
87
|
+
<author>Hong Quach</author>
|
88
|
+
<noted_at type="datetime">2010/07/06 21:47:27 UTC</noted_at>
|
89
|
+
</note>
|
90
|
+
<note>
|
91
|
+
<id type="integer">1959898</id>
|
92
|
+
<text>What the hey?</text>
|
93
|
+
<author>Hong Quach</author>
|
94
|
+
<noted_at type="datetime">2010/07/06 21:47:28 UTC</noted_at>
|
95
|
+
</note>
|
96
|
+
<note>
|
97
|
+
<id type="integer">1959899</id>
|
98
|
+
<text>What the hey?</text>
|
99
|
+
<author>Hong Quach</author>
|
100
|
+
<noted_at type="datetime">2010/07/06 21:47:29 UTC</noted_at>
|
101
|
+
</note>
|
102
|
+
<note>
|
103
|
+
<id type="integer">1959901</id>
|
104
|
+
<text>taoh natht aehu sa utaohe nsahu saeho nsahoeunsau '</text>
|
105
|
+
<author>Hong Quach</author>
|
106
|
+
<noted_at type="datetime">2010/07/06 21:47:33 UTC</noted_at>
|
107
|
+
</note>
|
108
|
+
<note>
|
109
|
+
<id type="integer">1959903</id>
|
110
|
+
<text>tt</text>
|
111
|
+
<author>Hong Quach</author>
|
112
|
+
<noted_at type="datetime">2010/07/06 21:47:35 UTC</noted_at>
|
113
|
+
</note>
|
114
|
+
<note>
|
115
|
+
<id type="integer">1959904</id>
|
116
|
+
<text>nhdhdntdtdtdt</text>
|
117
|
+
<author>Hong Quach</author>
|
118
|
+
<noted_at type="datetime">2010/07/06 21:47:37 UTC</noted_at>
|
119
|
+
</note>
|
120
|
+
</notes>
|
121
|
+
</story></stories>
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "TaskMapper::Provider::Pivotal::Project" do
|
4
|
+
before(:all) do
|
5
|
+
headers = {'X-TrackerToken' => '000000'}
|
6
|
+
wheaders = headers.merge('Content-Type' => 'application/xml')
|
7
|
+
@project_id = 93790
|
8
|
+
ActiveResource::HttpMock.respond_to do |mock|
|
9
|
+
mock.get '/services/v3/projects.xml', headers, fixture_for('projects'), 200
|
10
|
+
mock.get '/services/v3/projects/93790.xml', headers, fixture_for('projects/93790'), 200
|
11
|
+
mock.get '/projects/create.xml', headers, fixture_for('projects/93790'), 200
|
12
|
+
mock.put '/services/v3/projects/93790.xml', wheaders, '', 200
|
13
|
+
mock.post '/services/v3/projects.xml', wheaders, '', 201, 'Location' => '/projects/create.xml'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
before(:each) do
|
18
|
+
@taskmapper = TaskMapper.new(:pivotal, :token => '000000')
|
19
|
+
@klass = TaskMapper::Provider::Pivotal::Project
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should be able to load all projects" do
|
23
|
+
@taskmapper.projects.should be_an_instance_of(Array)
|
24
|
+
@taskmapper.projects.first.should be_an_instance_of(@klass)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should be able to load projects from an array of ids" do
|
28
|
+
@projects = @taskmapper.projects([@project_id])
|
29
|
+
@projects.should be_an_instance_of(Array)
|
30
|
+
@projects.first.should be_an_instance_of(@klass)
|
31
|
+
@projects.first.id.should == @project_id
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should be able to load all projects from attributes" do
|
35
|
+
@projects = @taskmapper.projects(:id => @project_id)
|
36
|
+
@projects.should be_an_instance_of(Array)
|
37
|
+
@projects.first.should be_an_instance_of(@klass)
|
38
|
+
@projects.first.id.should == @project_id
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should be able to find a project" do
|
42
|
+
@taskmapper.project.should == @klass
|
43
|
+
@taskmapper.project.find(@project_id).should be_an_instance_of(@klass)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should be able to find a project by id" do
|
47
|
+
@taskmapper.project(@project_id).should be_an_instance_of(@klass)
|
48
|
+
@taskmapper.project(@project_id).id.should == @project_id
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should be able to find a project by attributes" do
|
52
|
+
@taskmapper.project(:id => @project_id).id.should == @project_id
|
53
|
+
@taskmapper.project(:id => @project_id).should be_an_instance_of(@klass)
|
54
|
+
end
|
55
|
+
|
56
|
+
# always returns true, pivotal doesn't allow updating project attributes
|
57
|
+
# (at least not the ones taskmapper cares about at the moment)
|
58
|
+
it "should be able to update and save a project" do
|
59
|
+
@project = @taskmapper.project(@project_id)
|
60
|
+
@project.update!(:name => 'some new name').should == true
|
61
|
+
@project.name = 'this is a change'
|
62
|
+
@project.save.should == true
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should be able to create a project" do
|
66
|
+
@project = @taskmapper.project.create(:name => 'Project #1')
|
67
|
+
@project.should be_an_instance_of(@klass)
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'rubygems'
|
4
|
+
require 'taskmapper'
|
5
|
+
require 'taskmapper-pivotal'
|
6
|
+
require 'active_resource/http_mock'
|
7
|
+
require 'rspec'
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.color_enabled = true
|
11
|
+
end
|
12
|
+
|
13
|
+
def fixture_for(name)
|
14
|
+
File.read(File.dirname(__FILE__) + '/fixtures/' + name + '.xml')
|
15
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "TaskMapperPivotal" do
|
4
|
+
|
5
|
+
before(:each) do
|
6
|
+
headers = {'X-TrackerToken' => '000000'}
|
7
|
+
ActiveResource::HttpMock.respond_to do |mock|
|
8
|
+
mock.get '/services/v3/projects.xml', headers, fixture_for('projects'), 200
|
9
|
+
end
|
10
|
+
@taskmapper = TaskMapper.new(:pivotal, {:token => '000000'})
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should be able to instantiate a new instance" do
|
14
|
+
@taskmapper.should be_an_instance_of(TaskMapper)
|
15
|
+
@taskmapper.should be_a_kind_of(TaskMapper::Provider::Pivotal)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should return true with valid authentication" do
|
19
|
+
@taskmapper.valid?.should be_true
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "TaskMapper::Provider::Pivotal::Ticket" do
|
4
|
+
before(:all) do
|
5
|
+
headers = {'X-TrackerToken' => '000000'}
|
6
|
+
wheaders = headers.merge('Content-Type' => 'application/xml')
|
7
|
+
ActiveResource::HttpMock.respond_to do |mock|
|
8
|
+
mock.get '/services/v3/projects/93790.xml', headers, fixture_for('projects/93790'), 200
|
9
|
+
mock.get '/services/v3/projects/93790/stories.xml', headers, fixture_for('stories'), 200
|
10
|
+
mock.get '/services/v3/projects/93790/stories.xml?filter=', headers, fixture_for('stories'), 200
|
11
|
+
mock.get '/services/v3/projects/93790/activities.xml?occurred_since_date=2010%2F06%2F26', headers, fixture_for('activities'), 200
|
12
|
+
mock.get '/services/v3/projects/93790/stories.xml?filter=id%3A4056827', headers, fixture_for('stories'), 200
|
13
|
+
mock.get '/services/v3/projects/93790/stories/4056827.xml', headers, fixture_for('stories/4056827'), 200
|
14
|
+
mock.put '/services/v3/projects/93790/stories/4056827.xml', wheaders, '', 200
|
15
|
+
mock.post '/services/v3/projects/93790/stories.xml', wheaders, fixture_for('stories/4056827'), 200
|
16
|
+
|
17
|
+
end
|
18
|
+
@project_id = 93790
|
19
|
+
@ticket_id = 4056827
|
20
|
+
end
|
21
|
+
|
22
|
+
before(:each) do
|
23
|
+
@taskmapper = TaskMapper.new(:pivotal, :token => '000000')
|
24
|
+
@project = @taskmapper.project(@project_id)
|
25
|
+
@klass = TaskMapper::Provider::Pivotal::Ticket
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should be able to load all tickets" do
|
29
|
+
@project.tickets.should be_an_instance_of(Array)
|
30
|
+
@project.tickets.first.should be_an_instance_of(@klass)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should be able to load all tickets based on an array of ids" do
|
34
|
+
@tickets = @project.tickets([@ticket_id])
|
35
|
+
@tickets.should be_an_instance_of(Array)
|
36
|
+
@tickets.first.should be_an_instance_of(@klass)
|
37
|
+
@tickets.first.id.should == @ticket_id
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should be able to load all tickets based on attributes" do
|
41
|
+
@tickets = @project.tickets(:id => @ticket_id)
|
42
|
+
@tickets.should be_an_instance_of(Array)
|
43
|
+
@tickets.first.should be_an_instance_of(@klass)
|
44
|
+
@tickets.first.id.should == @ticket_id
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should return the ticket class" do
|
48
|
+
@project.ticket.should == @klass
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should be able to load a single ticket" do
|
52
|
+
@ticket = @project.ticket(@ticket_id)
|
53
|
+
@ticket.should be_an_instance_of(@klass)
|
54
|
+
@ticket.id.should == @ticket_id
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should be able to load a single ticket based on attributes" do
|
58
|
+
@ticket = @project.ticket(:id => @ticket_id)
|
59
|
+
@ticket.should be_an_instance_of(@klass)
|
60
|
+
@ticket.id.should == @ticket_id
|
61
|
+
end
|
62
|
+
|
63
|
+
it "should be able to update and save a ticket" do
|
64
|
+
@ticket = @project.ticket(@ticket_id)
|
65
|
+
#@ticket.save.should == nil
|
66
|
+
@ticket.description = 'hello'
|
67
|
+
@ticket.save.should == true
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should be able to create a ticket" do
|
71
|
+
@ticket = @project.ticket!(:title => 'Ticket #12', :description => 'Body')
|
72
|
+
@ticket.should be_an_instance_of(@klass)
|
73
|
+
end
|
74
|
+
|
75
|
+
it "should be able to load all tickets based on attributes using updated_at field" do
|
76
|
+
@ticket = @project.ticket(@ticket_id)
|
77
|
+
tickets = @project.tickets(:updated_at => @ticket.updated_at)
|
78
|
+
tickets.should be_an_instance_of(Array)
|
79
|
+
tickets.first.should be_an_instance_of(@klass)
|
80
|
+
end
|
81
|
+
|
82
|
+
it "shoule be able to load all tickets based on attributes using created_at field" do
|
83
|
+
@ticket = @project.ticket(@ticket_id)
|
84
|
+
tickets = @project.tickets(:created_at => @ticket.created_at)
|
85
|
+
tickets.should be_an_instance_of(Array)
|
86
|
+
tickets.first.should be_an_instance_of(@klass)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should return the requested_by field" do
|
90
|
+
@ticket = @project.ticket(@ticket_id)
|
91
|
+
@ticket.requestor.should == 'Hong Quach'
|
92
|
+
end
|
93
|
+
|
94
|
+
it "should be able to update a ticket" do
|
95
|
+
@ticket = @project.ticket(@ticket_id)
|
96
|
+
@ticket.title = "Hello World"
|
97
|
+
@ticket.save.should be_true
|
98
|
+
end
|
99
|
+
|
100
|
+
it "should have all contract fields for tickets" do
|
101
|
+
@ticket = @project.ticket(@ticket_id)
|
102
|
+
@ticket.title.should_not be_nil
|
103
|
+
@ticket.description.should_not be_nil
|
104
|
+
@ticket.status.should_not be_nil
|
105
|
+
@ticket.priority.should_not be_nil
|
106
|
+
@ticket.resolution.should_not be_nil
|
107
|
+
@ticket.created_at.should_not be_nil
|
108
|
+
@ticket.updated_at.should_not be_nil
|
109
|
+
@ticket.assignee.should_not be_nil
|
110
|
+
@ticket.requestor.should_not be_nil
|
111
|
+
@ticket.project_id.should_not be_nil
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "taskmapper-pivotal"
|
8
|
+
s.version = "0.8.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["HybridGroup"]
|
12
|
+
s.date = "2012-05-14"
|
13
|
+
s.description = "This is a taskmapper provider for interacting with Pivotal Tracker ."
|
14
|
+
s.email = "hong.quach@abigfisch.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.markdown"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".travis.yml",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/pivotal/pivotal-api.rb",
|
29
|
+
"lib/provider/comment.rb",
|
30
|
+
"lib/provider/pivotal.rb",
|
31
|
+
"lib/provider/project.rb",
|
32
|
+
"lib/provider/ticket.rb",
|
33
|
+
"lib/taskmapper-pivotal.rb",
|
34
|
+
"spec/comments_spec.rb",
|
35
|
+
"spec/fixtures/activities.xml",
|
36
|
+
"spec/fixtures/notes.xml",
|
37
|
+
"spec/fixtures/notes/1946635.xml",
|
38
|
+
"spec/fixtures/projects.xml",
|
39
|
+
"spec/fixtures/projects/93790.xml",
|
40
|
+
"spec/fixtures/stories.xml",
|
41
|
+
"spec/fixtures/stories/4056827.xml",
|
42
|
+
"spec/projects_spec.rb",
|
43
|
+
"spec/spec.opts",
|
44
|
+
"spec/spec_helper.rb",
|
45
|
+
"spec/taskmapper-pivotal_spec.rb",
|
46
|
+
"spec/tickets_spec.rb",
|
47
|
+
"taskmapper-pivotal.gemspec"
|
48
|
+
]
|
49
|
+
s.homepage = "http://ticket.rb"
|
50
|
+
s.require_paths = ["lib"]
|
51
|
+
s.rubygems_version = "1.8.15"
|
52
|
+
s.summary = "This is a taskmapper provider for interacting with Pivotal Tracker"
|
53
|
+
|
54
|
+
if s.respond_to? :specification_version then
|
55
|
+
s.specification_version = 3
|
56
|
+
|
57
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
58
|
+
s.add_runtime_dependency(%q<taskmapper>, ["~> 0.8"])
|
59
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.8"])
|
60
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6"])
|
61
|
+
s.add_development_dependency(%q<simplecov>, ["~> 0.5"])
|
62
|
+
s.add_development_dependency(%q<rcov>, ["~> 1.0"])
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<taskmapper>, ["~> 0.8"])
|
65
|
+
s.add_dependency(%q<rspec>, ["~> 2.8"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
67
|
+
s.add_dependency(%q<simplecov>, ["~> 0.5"])
|
68
|
+
s.add_dependency(%q<rcov>, ["~> 1.0"])
|
69
|
+
end
|
70
|
+
else
|
71
|
+
s.add_dependency(%q<taskmapper>, ["~> 0.8"])
|
72
|
+
s.add_dependency(%q<rspec>, ["~> 2.8"])
|
73
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6"])
|
74
|
+
s.add_dependency(%q<simplecov>, ["~> 0.5"])
|
75
|
+
s.add_dependency(%q<rcov>, ["~> 1.0"])
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
metadata
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: taskmapper-pivotal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- HybridGroup
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-14 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: taskmapper
|
16
|
+
requirement: &85854910 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.8'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *85854910
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &85854650 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.8'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *85854650
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: jeweler
|
38
|
+
requirement: &85854410 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '1.6'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *85854410
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: simplecov
|
49
|
+
requirement: &85854140 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.5'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *85854140
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rcov
|
60
|
+
requirement: &85853890 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *85853890
|
69
|
+
description: This is a taskmapper provider for interacting with Pivotal Tracker .
|
70
|
+
email: hong.quach@abigfisch.com
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files:
|
74
|
+
- LICENSE
|
75
|
+
- README.markdown
|
76
|
+
files:
|
77
|
+
- .document
|
78
|
+
- .travis.yml
|
79
|
+
- Gemfile
|
80
|
+
- Gemfile.lock
|
81
|
+
- LICENSE
|
82
|
+
- README.markdown
|
83
|
+
- Rakefile
|
84
|
+
- VERSION
|
85
|
+
- lib/pivotal/pivotal-api.rb
|
86
|
+
- lib/provider/comment.rb
|
87
|
+
- lib/provider/pivotal.rb
|
88
|
+
- lib/provider/project.rb
|
89
|
+
- lib/provider/ticket.rb
|
90
|
+
- lib/taskmapper-pivotal.rb
|
91
|
+
- spec/comments_spec.rb
|
92
|
+
- spec/fixtures/activities.xml
|
93
|
+
- spec/fixtures/notes.xml
|
94
|
+
- spec/fixtures/notes/1946635.xml
|
95
|
+
- spec/fixtures/projects.xml
|
96
|
+
- spec/fixtures/projects/93790.xml
|
97
|
+
- spec/fixtures/stories.xml
|
98
|
+
- spec/fixtures/stories/4056827.xml
|
99
|
+
- spec/projects_spec.rb
|
100
|
+
- spec/spec.opts
|
101
|
+
- spec/spec_helper.rb
|
102
|
+
- spec/taskmapper-pivotal_spec.rb
|
103
|
+
- spec/tickets_spec.rb
|
104
|
+
- taskmapper-pivotal.gemspec
|
105
|
+
homepage: http://ticket.rb
|
106
|
+
licenses: []
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
none: false
|
113
|
+
requirements:
|
114
|
+
- - ! '>='
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ! '>='
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0'
|
123
|
+
requirements: []
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 1.8.15
|
126
|
+
signing_key:
|
127
|
+
specification_version: 3
|
128
|
+
summary: This is a taskmapper provider for interacting with Pivotal Tracker
|
129
|
+
test_files: []
|