pivotal-tracker 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -47,9 +47,9 @@ module PivotalTracker
47
47
 
48
48
  def iteration(group)
49
49
  case group.to_sym
50
- when :done: Iteration.done(self)
51
- when :current: Iteration.current(self)
52
- when :backlog: Iteration.backlog(self)
50
+ when :done then Iteration.done(self)
51
+ when :current then Iteration.current(self)
52
+ when :backlog then Iteration.backlog(self)
53
53
  else
54
54
  raise ArgumentError, "Invalid group. Use :done, :current or :backlog instead."
55
55
  end
@@ -116,6 +116,8 @@ module PivotalTracker
116
116
  # xml.jira_url "#{jira_url}"
117
117
  xml.other_id "#{other_id}"
118
118
  xml.integration_id "#{integration_id}"
119
+ xml.created_at DateTime.parse(created_at.to_s).to_s if created_at
120
+ xml.accepted_at DateTime.parse(accepted_at.to_s).to_s if accepted_at
119
121
  }
120
122
  end
121
123
  return builder.to_xml
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pivotal-tracker}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Smestad", "Josh Nichols", "Terence Lee"]
12
- s.date = %q{2010-08-07}
12
+ s.date = %q{2010-09-20}
13
13
  s.email = %q{justin.smestad@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -6,95 +6,95 @@
6
6
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/memberships
7
7
  request_type: GET
8
8
  update_method: StaleFishFixtures.update_memberships_fixture
9
- last_updated_at: 2010-07-29T13:15:09-06:00
9
+ last_updated_at: 2010-07-29T20:15:09+01: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-07-29T13:15:09-06:00
16
+ last_updated_at: 2010-07-29T20:15:09+01: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/102622/stories/4459994/tasks
21
21
  request_type: GET
22
22
  update_method: StaleFishFixtures.update_tasks_fixture
23
- last_updated_at: 2010-07-29T13:15:10-06:00
23
+ last_updated_at: 2010-07-29T20:15:10+01: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/102622
28
28
  request_type: GET
29
29
  update_method: StaleFishFixtures.update_project_fixture
30
- last_updated_at: 2010-07-29T13:15:11-06:00
30
+ last_updated_at: 2010-07-29T20:15:11+01: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-07-29T13:15:11-06:00
37
+ last_updated_at: 2010-07-29T20:15:11+01: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/102622/stories
42
42
  request_type: GET
43
43
  update_method: StaleFishFixtures.update_stories_fixture
44
- last_updated_at: 2010-07-29T13:15:12-06:00
44
+ last_updated_at: 2010-07-29T20:15:12+01: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/102622/activities
49
49
  request_type: GET
50
50
  update_method: StaleFishFixtures.update_project_activity_fixture
51
- last_updated_at: 2010-07-29T13:15:13-06:00
51
+ last_updated_at: 2010-07-29T20:15:13+01: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/102622/stories
56
56
  request_type: POST
57
57
  update_method: StaleFishFixtures.create_new_story
58
- last_updated_at: 2010-07-29T13:15:14-06:00
58
+ last_updated_at: 2010-07-29T20:15:14+01:00
59
59
  - iterations_current:
60
60
  file: 'iterations_current.xml'
61
61
  update_interval: 2.weeks
62
62
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/iterations/current
63
63
  request_type: GET
64
64
  update_method: StaleFishFixtures.update_iterations_current_fixture
65
- last_updated_at: 2010-07-29T13:15:14-06:00
65
+ last_updated_at: 2010-07-29T20:15:14+01:00
66
66
  - iterations_done:
67
67
  file: 'iterations_done.xml'
68
68
  update_interval: 2.weeks
69
69
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/iterations/done
70
70
  request_type: GET
71
71
  update_method: StaleFishFixtures.update_iterations_done_fixture
72
- last_updated_at: 2010-07-29T13:15:14-06:00
72
+ last_updated_at: 2010-07-29T20:15:14+01:00
73
73
  - iterations_backlog:
74
74
  file: 'iterations_backlog.xml'
75
75
  update_interval: 2.weeks
76
76
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/iterations/backlog
77
77
  request_type: GET
78
78
  update_method: StaleFishFixtures.update_iterations_backlog_fixture
79
- last_updated_at: 2010-07-29T13:15:15-06:00
79
+ last_updated_at: 2010-07-29T20:15:15+01:00
80
80
  - iterations_all:
81
81
  file: 'iterations_all.xml'
82
82
  update_interval: 2.weeks
83
83
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/iterations
84
84
  request_type: GET
85
85
  update_method: StaleFishFixtures.update_iterations_all_fixture
86
- last_updated_at: 2010-07-29T13:15:16-06:00
86
+ last_updated_at: 2010-07-29T20:15:16+01:00
87
87
  - notes:
88
88
  file: 'notes.xml'
89
89
  update_interval: 2.weeks
90
90
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/stories/4460038/notes
91
91
  request_type: GET
92
92
  update_method: StaleFishFixtures.update_notes_fixture
93
- last_updated_at: 2010-07-29T13:15:16-06:00
93
+ last_updated_at: 2010-07-29T20:15:16+01:00
94
94
  - create_note:
95
95
  file: 'created_note.xml'
96
96
  update_interval: 2.weeks
97
97
  check_against: http://www.pivotaltracker.com/services/v3/projects/102622/stories/4460038/notes
98
98
  request_type: POST
99
99
  update_method: StaleFishFixtures.create_new_story
100
- last_updated_at: 2010-07-29T13:15:17-06:00
100
+ last_updated_at: 2010-07-29T20:15:17+01:00
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Activity do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Attachment do
4
4
 
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Iteration do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Project do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Note do
4
4
  before do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Project do
4
4
  context ".all" do
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Story do
4
4
  before do
@@ -86,14 +86,6 @@ describe PivotalTracker::Story do
86
86
  story_for(:url => "somewhere")["url"].should be_nil
87
87
  end
88
88
 
89
- it "should include created_at" do
90
- story_for(:created_at => Time.now)["created_at"].should be_nil
91
- end
92
-
93
- it "should include accepted_at" do
94
- story_for(:accepted_at => Time.now)["accepted_at"].should be_nil
95
- end
96
-
97
89
  end
98
90
 
99
91
  describe "attributes that are sent to the tracker" do
@@ -147,6 +139,24 @@ describe PivotalTracker::Story do
147
139
  # story_for(:jira_url => "somewhere")["jira_url"].should == "somewhere"
148
140
  # end
149
141
 
142
+ [:created_at, :accepted_at].each do |date_attribute|
143
+ it "should include #{date_attribute} date when given a string" do
144
+ story_for(:created_at => '9/20/1984, 10:23am UTC')["created_at"].should == "1984-09-20T10:23:00+00:00"
145
+ end
146
+
147
+ it "should include #{date_attribute} date when given a Time" do
148
+ story_for(:created_at => Time.parse('9/20/1984, 10:23am UTC'))["created_at"].should == "1984-09-20T10:23:00+00:00"
149
+ end
150
+
151
+ it "should include #{date_attribute} date when given a DateTime" do
152
+ story_for(:created_at => DateTime.parse('9/20/1984, 10:23am UTC'))["created_at"].should == "1984-09-20T10:23:00+00:00"
153
+ end
154
+
155
+ it "should include #{date_attribute} date when given a Date" do
156
+ # Dates don't have time zones, but the time will be in local time, so we convert the date to create the expectation
157
+ story_for(:created_at => Date.parse('9/20/1984'))["created_at"].should == DateTime.parse('9/20/1984').to_s
158
+ end
159
+ end
150
160
  end
151
161
 
152
162
  end
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe PivotalTracker::Task do
4
4
  before do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-tracker
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Smestad
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-08-07 00:00:00 -06:00
20
+ date: 2010-09-20 00:00:00 -06:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency