tracker-ical 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,7 @@
1
+ = 0.0.2
2
+ Releases are now included in the iCal feed
3
+ Iterations display the total number of points in each
4
+ = 0.0.1
5
+ Initial release.
6
+ Provides iCal formatted output of Iterations
7
+ Simple display of stories in the description field for each iteration
data/README.rdoc CHANGED
@@ -3,12 +3,12 @@
3
3
  Pivotal iterations and releases output as iCal feed
4
4
 
5
5
  == Usage
6
- TrackerIcal.token('myusername@email.com', 'secretpassword') # Automatically fetch API Token
7
- TrackerIcal.token = 'jkfduisj97823974j2kl24899234' # Manually set API Token
6
+ TrackerIcal.token('myusername@email.com', 'secretpassword') # Automatically fetch API Token
7
+ TrackerIcal.token = 'jkfduisj97823974j2kl24899234' # Manually set API Token
8
8
 
9
- TrackerIcal.create_calendar_for_project_id(project_id) #Pass the projectID of the Pivotal Project to generate iCal string for
9
+ TrackerIcal.create_calendar_for_project_id(project_id) #Pass the projectID of the Pivotal Project to generate iCal string for
10
10
 
11
- TrackerIcal.create_ics_file_for_project_id(filepath,project_id) #Generates an ics file at the specified filepath for the Pivotal project with project_id
11
+ TrackerIcal.create_ics_file_for_project_id(filepath,project_id) #Generates an ics file at the specified filepath for the Pivotal project with project_id
12
12
 
13
13
  == Note on Patches/Pull Requests
14
14
 
data/Rakefile CHANGED
@@ -43,5 +43,6 @@ Rake::RDocTask.new do |rdoc|
43
43
  rdoc.rdoc_dir = 'rdoc'
44
44
  rdoc.title = "tracker-ical #{version}"
45
45
  rdoc.rdoc_files.include('README*')
46
+ rdoc.rdoc_files.include('CHANGELOG*')
46
47
  rdoc.rdoc_files.include('lib/**/*.rb')
47
48
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -0,0 +1,6 @@
1
+ module PivotalTracker
2
+ class Story
3
+
4
+ element :deadline, DateTime
5
+ end
6
+ end
data/lib/tracker-ical.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'icalendar'
2
2
  require 'pivotal-tracker'
3
+ require File.join(File.dirname(__FILE__), 'pivotal-tracker', 'story')
3
4
 
4
5
  class TrackerIcal
5
6
 
@@ -38,23 +39,35 @@ class TrackerIcal
38
39
  private
39
40
 
40
41
  def self.release_event(project,calendar,release)
41
- puts("Release events not yet implemented")
42
+ unless release.deadline.nil?
43
+ calendar.event do
44
+ dtstart Date.new(release.deadline.year,release.deadline.month,release.deadline.day)
45
+ dtend Date.new(release.deadline.year,release.deadline.month,release.deadline.day)
46
+ summary release.name
47
+ description release.description
48
+ end
49
+ end
50
+ end
51
+
52
+ def self.iteration_points(iteration)
53
+ point_array = iteration.stories.collect(&:estimate).compact
54
+ eval point_array.join('+')
42
55
  end
43
56
 
44
57
  def self.iteration_event(project,calendar,iter)
45
- story_hash={}
58
+ stories = []
59
+
46
60
  iter.stories.each do |story|
47
- story_hash[story.name] = story.current_state
48
- end
49
- desc = []
50
- story_hash.keys.each do |key|
51
- desc.push("#{key}: #{story_hash[key]}")
61
+ stories.push("#{story.name} (#{story.current_state})")
52
62
  end
63
+
64
+ points = self.iteration_points(iter)
65
+
53
66
  calendar.event do
54
67
  dtstart Date.new(iter.start.year,iter.start.month,iter.start.day)
55
68
  dtend Date.new(iter.finish.year,iter.finish.month,iter.finish.day)
56
- summary "#{project.name}: Iteration #{iter.number}"
57
- description desc.join("\n")
69
+ summary "#{project.name}: Iteration #{iter.number} (#{points} points)"
70
+ description stories.join("\n")
58
71
  end
59
72
  end
60
73
 
data/tracker-ical.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tracker-ical}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Niels Meersschaert"]
@@ -19,10 +19,12 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".gitignore",
22
+ "CHANGELOG.rdoc",
22
23
  "LICENSE",
23
24
  "README.rdoc",
24
25
  "Rakefile",
25
26
  "VERSION",
27
+ "lib/pivotal-tracker/story.rb",
26
28
  "lib/tracker-ical.rb",
27
29
  "spec/spec.opts",
28
30
  "spec/spec_helper.rb",
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracker-ical
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Niels Meersschaert
@@ -78,10 +78,12 @@ extra_rdoc_files:
78
78
  files:
79
79
  - .document
80
80
  - .gitignore
81
+ - CHANGELOG.rdoc
81
82
  - LICENSE
82
83
  - README.rdoc
83
84
  - Rakefile
84
85
  - VERSION
86
+ - lib/pivotal-tracker/story.rb
85
87
  - lib/tracker-ical.rb
86
88
  - spec/spec.opts
87
89
  - spec/spec_helper.rb