pivotal_to_pdf 0.7.1 → 0.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.8
2
+ * Fixed an issue where the gem didn't handle the releases
1
3
  v0.7.1
2
4
  * To support prawn 0.11.1
3
5
  * To make the border thicker
data/Gemfile CHANGED
@@ -9,4 +9,5 @@ end
9
9
 
10
10
  group :test, :development do
11
11
  gem 'echoe', "4.5.6"
12
+ gem 'rake'
12
13
  end
data/Gemfile.lock CHANGED
@@ -26,6 +26,7 @@ GEM
26
26
  pdf-reader (>= 0.9.0)
27
27
  ttfunk (~> 1.0.0)
28
28
  rainbow (1.1.1)
29
+ rake (0.9.2)
29
30
  rspec (2.6.0)
30
31
  rspec-core (~> 2.6.0)
31
32
  rspec-expectations (~> 2.6.0)
@@ -47,5 +48,6 @@ DEPENDENCIES
47
48
  echoe (= 4.5.6)
48
49
  prawn
49
50
  rainbow
51
+ rake
50
52
  rspec
51
53
  thor
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  pivotal_to_pdf -- print the stories from pivotal tracker to a PDF file
2
2
  ====================================
3
3
 
4
+ [![Build Status](http://travis-ci.org/ywen/pivotal_to_pdf.png)](http://travis-ci.org/ywen/pivotal_to_pdf)
5
+
4
6
  ## DESCRIPTION
5
7
  This is a gem that can read a story from pivotal tracker and print into a 4x6 card so that you can print the card and stick to your physical story board.
6
8
 
@@ -31,4 +33,7 @@ Printed a green bounding box for feature, a yellow box for chores and a red box
31
33
  The gem assumes that you have https access to the pivotal tracker
32
34
 
33
35
  ##Contributors
34
- Yi Wen, Carol Nichols
36
+ * Yi Wen
37
+ * Carol Nichols
38
+ * Kristian Rasmussen
39
+ * [Alastair Mair](https://github.com/amair)
@@ -1,6 +1,7 @@
1
1
  class Pivotal < ActiveResource::Base
2
2
  def self.inherited(sub)
3
- info = YAML.load_file File.expand_path("~/.pivotal.yml")
3
+ base_dir = ENV["PIVOTAL_TO_PDF_CONFIG_DIR"] || "~"
4
+ info = YAML.load_file File.expand_path("#{base_dir}/.pivotal.yml")
4
5
  sub.site = %Q|https://www.pivotaltracker.com/services/v3/projects/#{info['project_id']}|
5
6
  sub.headers['X-TrackerToken'] = info["token"]
6
7
  end
@@ -13,11 +13,12 @@ class Story < Pivotal
13
13
  return "52D017" if feature?
14
14
  return "FF0000" if bug?
15
15
  return "FFFF00" if chore?
16
+ return "000000" # For Releases or Unknown type
16
17
  end
17
18
 
18
19
  private
19
20
 
20
- ["feature", "bug", "chore"].each do |type_str|
21
+ ["feature", "bug", "chore", "release"].each do |type_str|
21
22
  class_eval <<-EOS
22
23
  def #{type_str}?
23
24
  self.story_type == "#{type_str}"
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pivotal_to_pdf}
5
- s.version = "0.7.1"
5
+ s.version = "0.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Yi Wen"]
9
- s.date = %q{2011-06-20}
9
+ s.date = %q{2011-08-22}
10
10
  s.default_executable = %q{pivotal_to_pdf}
11
11
  s.description = %q{Convert Pivotal Tracker Stories to 4x6 PDF for printing so that you can stick the card to your story board}
12
12
  s.email = %q{hayafirst@gmail.com}
@@ -30,7 +30,7 @@ describe Story do
30
30
  end
31
31
 
32
32
  describe "#points" do
33
- describe "and the story is not a feature" do
33
+ describe "and the story is a bug" do
34
34
  before(:each) do
35
35
  story.story_type = "bug"
36
36
  end
@@ -38,6 +38,14 @@ describe Story do
38
38
  story.points.should be_nil
39
39
  end
40
40
  end
41
+ describe "and the story is a release" do
42
+ before(:each) do
43
+ story.story_type = "release"
44
+ end
45
+ it "should return nil" do
46
+ story.points.should be_nil
47
+ end
48
+ end
41
49
  describe "and the story is a feature" do
42
50
  before(:each) do
43
51
  story.story_type = "feature"
@@ -78,5 +86,9 @@ describe Story do
78
86
  story.story_type = "chore"
79
87
  story.story_color.should == "FFFF00"
80
88
  end
89
+ it "should return black for releases" do
90
+ story.story_type = "release"
91
+ story.story_color.should == "000000"
92
+ end
81
93
  end
82
94
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal_to_pdf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 7
9
- - 1
10
- version: 0.7.1
8
+ - 8
9
+ version: "0.8"
11
10
  platform: ruby
12
11
  authors:
13
12
  - Yi Wen
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-06-20 00:00:00 -05:00
17
+ date: 2011-08-22 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency