Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Adds 2 new fields for projects #47

Merged
merged 9 commits into from Mar 16, 2012

Conversation

Projects
None yet
3 participants

This adds:

  • first_iteration_start_time
  • current_iteration_number

To the PivotalTracker::Project class.

Changed the tests to reflect this, but stale_fish seems to be never updating the fixtures (everything is hard coded to be stale in spec_helper)

The fixtures were updated manually.

Anuradha Ramprakash added some commits Mar 14, 2012

Anuradha Ramprakash Added missing fields first_iteration_start_time and current_iteration…
… to project.rb
11cb14c
Anuradha Ramprakash Added test to check if project start date is not nil 076754e
Anuradha Ramprakash Added current_iteration_number and first_iteration_start_time to proj…
…ect and projects.xml, added test to check if current iteration is not null
b668f02

@tomazy tomazy and 1 other commented on an outdated diff Mar 15, 2012

lib/pivotal-tracker/project.rb
@@ -22,13 +22,15 @@ def find(id)
element :week_start_day, String
element :point_scale, String
element :labels, String
- element :week_start_day, String
+ #element :week_start_day, String
@tomazy

tomazy Mar 15, 2012

Contributor

why?

@subdigital

subdigital Mar 15, 2012

That line needs to be deleted :) -- It was a duplicate of line 22.

@tomazy

tomazy Mar 15, 2012

Contributor

Ok, so let's delete it :)

@tomazy tomazy and 1 other commented on an outdated diff Mar 15, 2012

spec/fixtures/stale_fish.yml
@@ -6,133 +6,133 @@
@tomazy

tomazy Mar 15, 2012

Contributor

please ignore this file when committing

@tomazy tomazy commented on an outdated diff Mar 15, 2012

spec/unit/pivotal-tracker/project_spec.rb
@@ -5,15 +5,28 @@
before do
PivotalTracker::Client.token = TOKEN
@projects = PivotalTracker::Project.all
+ @project = @projects.first
@tomazy

tomazy Mar 15, 2012

Contributor

the field doesn't seem to be used anywhere

@tomazy tomazy commented on an outdated diff Mar 15, 2012

spec/unit/pivotal-tracker/project_spec.rb
end
it "should return an array of available projects" do
@projects.should be_a(Array)
end
- it "should be a project instance" do
+ it "should be a project instance" do
@tomazy

tomazy Mar 15, 2012

Contributor

delete this change

Contributor

tomazy commented Mar 15, 2012

@subdigital, @anuradha-r please update the pull request according to suggested changes

Anuradha Ramprakash added some commits Mar 15, 2012

Anuradha Ramprakash Revert "Added current_iteration_number and first_iteration_start_time…
… to project and projects.xml, added test to check if current iteration is not null"

This reverts commit b668f02.
45f0668
Anuradha Ramprakash Reset stale_fish.yml to original state b3aec72
Anuradha Ramprakash Remove duplicate element week_start_day 7a38e70
Anuradha Ramprakash Add Pivotal XML fields for first_iteration_start_time and current_ite…
…ration_number
2dc33aa
Anuradha Ramprakash More descriptive spec
Spec for parsing current_iteration_number
60562f4
Contributor

anuradha-r commented Mar 15, 2012

@tomazy I think that should do it. Any other changes you'd like me to make?

@tomazy tomazy commented on an outdated diff Mar 15, 2012

spec/unit/pivotal-tracker/project_spec.rb
@@ -14,6 +14,17 @@
it "should be a project instance" do
@projects.first.should be_a(PivotalTracker::Project)
end
+
+ it "should parse first_iteration_start_time" do
+ @projects.each do |pt|
+ pt.first_iteration_start_time.should_not be_nil
+ end
+ end
+ it "should parse field current_iteration_number" do
+ @projects.each do |pt|
+ pt.current_iteration_number.should_not be_nil
+ end
+ end
end
@tomazy

tomazy Mar 15, 2012

Contributor

@anuradha-r I think it would have more sense to move these tests to ".find" context and make them to look like:

it "should have first_iteration_start_time attribute" do
  @project.respond_to?(:first_iteration_start_time).should be_true
end 

as this is how we check for attributes in other parts of this file. Also separate tests by a blank line.

Anuradha Ramprakash Moved the tests for checking first_iteration_start_timee and current_…
…iteration_number to .find context
4251fd6
Contributor

anuradha-r commented Mar 15, 2012

@tomazy I moved those tests and also changed them as you suggested :)

@tomazy tomazy added a commit that referenced this pull request Mar 16, 2012

@tomazy tomazy Merge pull request #47 from chaione/master
Adds 2 new fields for projects: first_iteration_start_time, current_iteration_number
32d6c34

@tomazy tomazy merged commit 32d6c34 into jsmestad:master Mar 16, 2012

Contributor

tomazy commented Mar 16, 2012

@anuradha-r, @subdigital - thanks :)

Thanks for accepting!

Contributor

anuradha-r commented Mar 16, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment