pivotal_to_pdf 0.9 → 0.9.1

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.9.1
2
+ * A bug fix where a nil description or name field will break the PDF generation
1
3
  v0.9
2
4
  * Added printing support for bold and italic fonts
3
5
  * removed page number. Did not find it really useful
data/README.md CHANGED
@@ -33,7 +33,8 @@ Printed a green bounding box for feature, a yellow box for chores and a red box
33
33
  The gem assumes that you have https access to the pivotal tracker
34
34
 
35
35
  ##Contributors
36
- * Yi Wen
36
+ * [Yi Wen](https://github.com/ywen)
37
37
  * Carol Nichols
38
38
  * Kristian Rasmussen
39
39
  * [Alastair Mair](https://github.com/amair)
40
+ * [John-Mason P. Shackelford](https://github.com/jpshackelford)
@@ -3,7 +3,7 @@ module PivotalToPdf
3
3
  attr_reader :string
4
4
  private :string
5
5
  def initialize(string)
6
- @string = string
6
+ @string = string.to_s
7
7
  end
8
8
 
9
9
  def output
@@ -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.9"
5
+ s.version = "0.9.1"
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-10-30}
9
+ s.date = %q{2011-11-02}
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}
@@ -2,25 +2,31 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
2
2
 
3
3
  module PivotalToPdf
4
4
  describe SimpleTextFormatter do
5
- subject {SimpleTextFormatter.new "a text"}
6
5
  describe "#output" do
6
+ let(:formatter) {SimpleTextFormatter.new "a text"}
7
7
  context "when there is no special formatting" do
8
8
  it "should return the string" do
9
- subject.output.should == "a text"
9
+ formatter.output.should == "a text"
10
10
  end
11
11
  end
12
12
  context "when there is bold special formatting" do
13
+ let(:formatter) {SimpleTextFormatter.new "a *special test* text"}
13
14
  it "should return the string converted" do
14
- formatter = SimpleTextFormatter.new "a *special test* text"
15
15
  formatter.output.should == "a <b>special test</b> text"
16
16
  end
17
17
  end
18
18
  context "when there is italic special formatting" do
19
+ let(:formatter) {SimpleTextFormatter.new "a _special test_ text"}
19
20
  it "should return the string converted" do
20
- formatter = SimpleTextFormatter.new "a _special test_ text"
21
21
  formatter.output.should == "a <i>special test</i> text"
22
22
  end
23
23
  end
24
+ context "when the text to format is nil" do
25
+ let(:formatter) {SimpleTextFormatter.new nil}
26
+ it "should convert to an empty string" do
27
+ formatter.output.should be_empty
28
+ end
29
+ end
24
30
  end
25
31
  end
26
32
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal_to_pdf
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- version: "0.9"
9
+ - 1
10
+ version: 0.9.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Yi Wen
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-10-30 00:00:00 -05:00
18
+ date: 2011-11-02 00:00:00 -05:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency