pivotal_to_pdf 0.8.2 → 0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/Manifest +2 -0
- data/bin/pivotal_to_pdf +2 -2
- data/lib/pivotal_to_pdf/iteration.rb +4 -2
- data/lib/pivotal_to_pdf/pdf_writer.rb +52 -50
- data/lib/pivotal_to_pdf/pivotal.rb +9 -7
- data/lib/pivotal_to_pdf/simple_text_formatter.rb +13 -0
- data/lib/pivotal_to_pdf/story.rb +33 -19
- data/lib/pivotal_to_pdf.rb +12 -9
- data/pivotal_to_pdf.gemspec +5 -5
- data/spec/pivotal_to_pdf/simple_text_formatter_spec.rb +26 -0
- data/spec/pivotal_to_pdf/story_spec.rb +88 -68
- data/spec/pivotal_to_pdf_bin_spec.rb +5 -5
- metadata +8 -6
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
@@ -9,7 +9,9 @@ lib/pivotal_to_pdf.rb
|
|
9
9
|
lib/pivotal_to_pdf/iteration.rb
|
10
10
|
lib/pivotal_to_pdf/pdf_writer.rb
|
11
11
|
lib/pivotal_to_pdf/pivotal.rb
|
12
|
+
lib/pivotal_to_pdf/simple_text_formatter.rb
|
12
13
|
lib/pivotal_to_pdf/story.rb
|
14
|
+
spec/pivotal_to_pdf/simple_text_formatter_spec.rb
|
13
15
|
spec/pivotal_to_pdf/story_spec.rb
|
14
16
|
spec/pivotal_to_pdf_bin_spec.rb
|
15
17
|
spec/spec_helper.rb
|
data/bin/pivotal_to_pdf
CHANGED
@@ -7,13 +7,13 @@ class PivotalToPdfApp < Thor
|
|
7
7
|
desc "story STORY_ID", "print a single story specifed by ID into a PDF file. The card will have a color stripe. The color will be green for features, yellow for chores and red for bugs"
|
8
8
|
method_option :nocolor, :aliases => "-nc", :desc => "Make the card having no color stripe"
|
9
9
|
def story(story_id)
|
10
|
-
PivotalToPdf.story story_id, options[:nocolor]
|
10
|
+
PivotalToPdf::Main.story story_id, options[:nocolor]
|
11
11
|
end
|
12
12
|
|
13
13
|
desc "iteration", "print stories for the current iteration into a PDF file"
|
14
14
|
method_option :nocolor, :aliases => "-nc", :desc => "Make the card having no color stripe"
|
15
15
|
def iteration(iteration_number = "current")
|
16
|
-
PivotalToPdf.iteration iteration_number, options[:nocolor]
|
16
|
+
PivotalToPdf::Main.iteration iteration_number, options[:nocolor]
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -4,57 +4,59 @@ require 'rubygems'
|
|
4
4
|
require 'prawn'
|
5
5
|
require 'rainbow'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
pdf.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
7
|
+
module PivotalToPdf
|
8
|
+
class PdfWriter
|
9
|
+
attr_reader :story_or_iteration, :stories
|
10
|
+
def initialize(story_or_iteration, colored_stripe = true)
|
11
|
+
@story_or_iteration = story_or_iteration
|
12
|
+
@stories = story_or_iteration.is_a?(Iteration) ? story_or_iteration.stories : [story_or_iteration]
|
13
|
+
p stories.size
|
14
|
+
end
|
15
|
+
|
16
|
+
def write_to
|
17
|
+
Prawn::Document.generate("#{story_or_iteration.id}.pdf",
|
18
|
+
:page_layout => :landscape,
|
19
|
+
:margin => [25, 25, 50, 25],
|
20
|
+
:page_size => [302, 432]) do |pdf|
|
21
|
+
|
22
|
+
# pdf.font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
|
23
|
+
# pdf.start_new_page
|
24
|
+
|
25
|
+
stories.each_with_index do |story, index|
|
26
|
+
padding = 10
|
27
|
+
pdf.stroke_color = story.story_color
|
28
|
+
pdf.stroke_bounds
|
29
|
+
width = 370
|
30
|
+
pdf.line_width=6
|
31
|
+
# --- Write content
|
32
|
+
pdf.bounding_box [pdf.bounds.left+padding, pdf.bounds.top-padding], :width => width do
|
33
|
+
pdf.text story.formatted_name, :size => 14, :inline_format => true
|
34
|
+
pdf.fill_color "52D017"
|
35
|
+
pdf.text story.label_text, :size => 8
|
36
|
+
pdf.text "\n", :size => 14
|
37
|
+
pdf.fill_color "444444"
|
38
|
+
pdf.text story.formatted_description || "", :size => 10, :inline_format => true
|
39
|
+
pdf.fill_color "000000"
|
40
|
+
end
|
41
|
+
pdf.line(pdf.bounds.bottom_left, pdf.bounds.bottom_right)
|
42
|
+
pdf.stroke_bounds
|
43
|
+
|
44
|
+
pdf.text_box story.points, :size => 12, :at => [12, 50], :width => width-18 unless story.points.nil?
|
45
|
+
pdf.text_box "Owner: " + (story.respond_to?(:owned_by) ? story.owned_by : "None"),
|
46
|
+
:size => 8, :at => [12, 18], :width => width-18
|
47
|
+
|
48
|
+
pdf.fill_color "999999"
|
49
|
+
pdf.text_box story.story_type.capitalize, :size => 8, :align => :right, :at => [12, 18], :width => width-18
|
38
50
|
pdf.fill_color "000000"
|
51
|
+
pdf.start_new_page unless index == stories.size - 1
|
39
52
|
end
|
40
|
-
pdf.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
pdf.text_box story.story_type.capitalize, :size => 8, :align => :right, :at => [12, 18], :width => width-18
|
49
|
-
pdf.fill_color "000000"
|
50
|
-
pdf.start_new_page unless index == stories.size - 1
|
51
|
-
end
|
52
|
-
pdf.number_pages "<page>/<total>", {:at => [pdf.bounds.right - 16, -28]}
|
53
|
-
|
54
|
-
puts ">>> Generated PDF file in '#{story_or_iteration.id}.pdf'".foreground(:green)
|
55
|
-
end
|
56
|
-
rescue Exception
|
57
|
-
puts "[!] There was an error while generating the PDF file... What happened was:".foreground(:red)
|
58
|
-
raise
|
53
|
+
# pdf.number_pages "<page>/<total>", {:at => [pdf.bounds.right - 16, -28]}
|
54
|
+
|
55
|
+
puts ">>> Generated PDF file in '#{story_or_iteration.id}.pdf'".foreground(:green)
|
56
|
+
end
|
57
|
+
rescue Exception
|
58
|
+
puts "[!] There was an error while generating the PDF file... What happened was:".foreground(:red)
|
59
|
+
raise
|
60
|
+
end
|
59
61
|
end
|
60
62
|
end
|
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
module PivotalToPdf
|
2
|
+
class Pivotal < ActiveResource::Base
|
3
|
+
def self.inherited(sub)
|
4
|
+
base_dir = ENV["PIVOTAL_TO_PDF_CONFIG_DIR"] || "~"
|
5
|
+
info = YAML.load_file File.expand_path("#{base_dir}/.pivotal.yml")
|
6
|
+
sub.site = %Q|https://www.pivotaltracker.com/services/v3/projects/#{info['project_id']}|
|
7
|
+
sub.headers['X-TrackerToken'] = info["token"]
|
8
|
+
end
|
8
9
|
|
10
|
+
end
|
9
11
|
end
|
data/lib/pivotal_to_pdf/story.rb
CHANGED
@@ -1,28 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module PivotalToPdf
|
2
|
+
class Story < Pivotal
|
3
|
+
def label_text
|
4
|
+
return "" if !self.respond_to?(:labels) || self.labels.nil? || self.labels.empty?
|
5
|
+
labels
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
def points
|
9
|
+
return nil unless self.feature?
|
10
|
+
"Points: " + (self.respond_to?(:estimate) && !self.estimate.eql?(-1) ? self.estimate.to_s : "Not yet estimated")
|
11
|
+
end
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
def story_color
|
14
|
+
return "52D017" if feature?
|
15
|
+
return "FF0000" if bug?
|
16
|
+
return "FFFF00" if chore?
|
17
|
+
return "000000" # For Releases or Unknown type
|
18
|
+
end
|
18
19
|
|
19
|
-
|
20
|
+
def formatted_name
|
21
|
+
formatted_output :name
|
22
|
+
end
|
20
23
|
|
21
|
-
|
22
|
-
|
24
|
+
def formatted_description
|
25
|
+
formatted_output :description
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def formatted_output(field)
|
31
|
+
SimpleTextFormatter.new(send(field)).output
|
32
|
+
end
|
33
|
+
|
34
|
+
["feature", "bug", "chore", "release"].each do |type_str|
|
35
|
+
class_eval <<-EOS
|
23
36
|
def #{type_str}?
|
24
37
|
self.story_type == "#{type_str}"
|
25
38
|
end
|
26
|
-
|
39
|
+
EOS
|
40
|
+
end
|
27
41
|
end
|
28
42
|
end
|
data/lib/pivotal_to_pdf.rb
CHANGED
@@ -2,20 +2,23 @@ require 'rubygems'
|
|
2
2
|
require 'rainbow'
|
3
3
|
require 'thor'
|
4
4
|
require 'active_resource'
|
5
|
+
require 'pivotal_to_pdf/simple_text_formatter'
|
5
6
|
require 'pivotal_to_pdf/pivotal'
|
6
7
|
require 'pivotal_to_pdf/iteration'
|
7
8
|
require 'pivotal_to_pdf/story'
|
8
9
|
require 'pivotal_to_pdf/pdf_writer'
|
9
|
-
|
10
|
-
class
|
11
|
-
|
12
|
-
story =
|
13
|
-
|
14
|
-
|
10
|
+
module PivotalToPdf
|
11
|
+
class Main < Thor
|
12
|
+
class << self
|
13
|
+
def story(story_id, colored_stripe=true)
|
14
|
+
story = Story.find(story_id)
|
15
|
+
PivotalToPdf::PdfWriter.new(story, colored_stripe).write_to
|
16
|
+
end
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
|
18
|
+
def iteration(iteration_token, colored_stripe=true)
|
19
|
+
iteration = Iteration.find(:all, :params => {:group => iteration_token}).first
|
20
|
+
PivotalToPdf::PdfWriter.new(iteration, colored_stripe).write_to
|
21
|
+
end
|
19
22
|
end
|
20
23
|
end
|
21
24
|
end
|
data/pivotal_to_pdf.gemspec
CHANGED
@@ -2,22 +2,22 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{pivotal_to_pdf}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.9"
|
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-
|
9
|
+
s.date = %q{2011-10-30}
|
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}
|
13
13
|
s.executables = ["pivotal_to_pdf"]
|
14
|
-
s.extra_rdoc_files = ["CHANGELOG", "README.md", "bin/pivotal_to_pdf", "lib/pivotal_to_pdf.rb", "lib/pivotal_to_pdf/iteration.rb", "lib/pivotal_to_pdf/pdf_writer.rb", "lib/pivotal_to_pdf/pivotal.rb", "lib/pivotal_to_pdf/story.rb", "tasks/spec.rb"]
|
15
|
-
s.files = ["CHANGELOG", "Gemfile", "Gemfile.lock", "Manifest", "README.md", "Rakefile", "bin/pivotal_to_pdf", "lib/pivotal_to_pdf.rb", "lib/pivotal_to_pdf/iteration.rb", "lib/pivotal_to_pdf/pdf_writer.rb", "lib/pivotal_to_pdf/pivotal.rb", "lib/pivotal_to_pdf/story.rb", "spec/pivotal_to_pdf/story_spec.rb", "spec/pivotal_to_pdf_bin_spec.rb", "spec/spec_helper.rb", "tasks/spec.rb", "pivotal_to_pdf.gemspec"]
|
14
|
+
s.extra_rdoc_files = ["CHANGELOG", "README.md", "bin/pivotal_to_pdf", "lib/pivotal_to_pdf.rb", "lib/pivotal_to_pdf/iteration.rb", "lib/pivotal_to_pdf/pdf_writer.rb", "lib/pivotal_to_pdf/pivotal.rb", "lib/pivotal_to_pdf/simple_text_formatter.rb", "lib/pivotal_to_pdf/story.rb", "tasks/spec.rb"]
|
15
|
+
s.files = ["CHANGELOG", "Gemfile", "Gemfile.lock", "Manifest", "README.md", "Rakefile", "bin/pivotal_to_pdf", "lib/pivotal_to_pdf.rb", "lib/pivotal_to_pdf/iteration.rb", "lib/pivotal_to_pdf/pdf_writer.rb", "lib/pivotal_to_pdf/pivotal.rb", "lib/pivotal_to_pdf/simple_text_formatter.rb", "lib/pivotal_to_pdf/story.rb", "spec/pivotal_to_pdf/simple_text_formatter_spec.rb", "spec/pivotal_to_pdf/story_spec.rb", "spec/pivotal_to_pdf_bin_spec.rb", "spec/spec_helper.rb", "tasks/spec.rb", "pivotal_to_pdf.gemspec"]
|
16
16
|
s.homepage = %q{https://github.com/ywen/pivotal_to_pdf}
|
17
17
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pivotal_to_pdf", "--main", "README.md"]
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
s.rubyforge_project = %q{pivotal_to_pdf}
|
20
|
-
s.rubygems_version = %q{1.4.
|
20
|
+
s.rubygems_version = %q{1.4.2}
|
21
21
|
s.summary = %q{Convert Pivotal Tracker Stories to 4x6 PDF for printing}
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
|
2
|
+
|
3
|
+
module PivotalToPdf
|
4
|
+
describe SimpleTextFormatter do
|
5
|
+
subject {SimpleTextFormatter.new "a text"}
|
6
|
+
describe "#output" do
|
7
|
+
context "when there is no special formatting" do
|
8
|
+
it "should return the string" do
|
9
|
+
subject.output.should == "a text"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
context "when there is bold special formatting" do
|
13
|
+
it "should return the string converted" do
|
14
|
+
formatter = SimpleTextFormatter.new "a *special test* text"
|
15
|
+
formatter.output.should == "a <b>special test</b> text"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
context "when there is italic special formatting" do
|
19
|
+
it "should return the string converted" do
|
20
|
+
formatter = SimpleTextFormatter.new "a _special test_ text"
|
21
|
+
formatter.output.should == "a <i>special test</i> text"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -1,94 +1,114 @@
|
|
1
1
|
require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper"))
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
module PivotalToPdf
|
4
|
+
describe Story do
|
5
|
+
subject {Story.new :labels => [], :story_type => nil, :name => "a name"}
|
6
|
+
let(:formatter) {double :formatter, :output => nil}
|
7
|
+
describe "#label_text" do
|
8
|
+
describe "and there is no label" do
|
9
|
+
it "should return blank string" do
|
10
|
+
story = Story.new
|
11
|
+
story.label_text.should == ""
|
12
|
+
end
|
10
13
|
end
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
14
|
+
describe "and labels is empty" do
|
15
|
+
it "should return blank string" do
|
16
|
+
subject.label_text.should == ""
|
17
|
+
end
|
15
18
|
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
19
|
+
describe "and labels is nil" do
|
20
|
+
it "should return blank string" do
|
21
|
+
subject.labels = nil
|
22
|
+
subject.label_text.should == ""
|
23
|
+
end
|
21
24
|
end
|
22
|
-
end
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
describe "and when there are less than 3 labels" do
|
27
|
+
it "should return them in a nice format" do
|
28
|
+
subject.labels="test1, test2"
|
29
|
+
subject.label_text.should == "test1, test2"
|
30
|
+
end
|
28
31
|
end
|
29
32
|
end
|
30
|
-
end
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
it "should return nil" do
|
38
|
-
story.points.should be_nil
|
34
|
+
describe "#formatted_name" do
|
35
|
+
it "should ask the text formatter format the name" do
|
36
|
+
SimpleTextFormatter.should_receive(:new).with("a name").and_return formatter
|
37
|
+
formatter.should_receive(:output).and_return "new name"
|
38
|
+
subject.formatted_name.should == "new name"
|
39
39
|
end
|
40
40
|
end
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
41
|
+
|
42
|
+
describe "#formatted_description" do
|
43
|
+
it "should ask the text formatter format the description" do
|
44
|
+
subject.description = "a description"
|
45
|
+
SimpleTextFormatter.should_receive(:new).with("a description").and_return formatter
|
46
|
+
formatter.should_receive(:output).and_return "new desc"
|
47
|
+
subject.formatted_description.should == "new desc"
|
47
48
|
end
|
48
49
|
end
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
|
51
|
+
describe "#points" do
|
52
|
+
describe "and the story is a bug" do
|
53
|
+
before(:each) do
|
54
|
+
subject.story_type = "bug"
|
55
|
+
end
|
56
|
+
it "should return nil" do
|
57
|
+
subject.points.should be_nil
|
58
|
+
end
|
52
59
|
end
|
53
|
-
describe "and the story is
|
54
|
-
|
55
|
-
|
60
|
+
describe "and the story is a release" do
|
61
|
+
before(:each) do
|
62
|
+
subject.story_type = "release"
|
63
|
+
end
|
64
|
+
it "should return nil" do
|
65
|
+
subject.points.should be_nil
|
56
66
|
end
|
57
67
|
end
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
68
|
+
describe "and the story is a feature" do
|
69
|
+
before(:each) do
|
70
|
+
subject.story_type = "feature"
|
71
|
+
end
|
72
|
+
describe "and the story is not respond_to estimate" do
|
73
|
+
it "should return Not yet estimated" do
|
74
|
+
subject.points.should == "Points: Not yet estimated"
|
64
75
|
end
|
65
76
|
end
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
77
|
+
|
78
|
+
describe "and the story is respond_to estimate" do
|
79
|
+
let(:story) {Story.new :story_type => "feature", :estimate => -1}
|
80
|
+
describe "and the estimate is -1" do
|
81
|
+
it "should return not yet estimated" do
|
82
|
+
subject.points.should == "Points: Not yet estimated"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
describe "and the estimate is not -1" do
|
86
|
+
it "should return the points" do
|
87
|
+
subject.estimate = 5
|
88
|
+
subject.points.should == "Points: 5"
|
89
|
+
end
|
70
90
|
end
|
71
91
|
end
|
72
92
|
end
|
73
93
|
end
|
74
|
-
end
|
75
94
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
95
|
+
describe "#story_color" do
|
96
|
+
it "should return green for features" do
|
97
|
+
subject.story_type = "feature"
|
98
|
+
subject.story_color.should == "52D017"
|
99
|
+
end
|
100
|
+
it "should return red for bugs" do
|
101
|
+
subject.story_type = "bug"
|
102
|
+
subject.story_color.should == "FF0000"
|
103
|
+
end
|
104
|
+
it "should return yellow for chores" do
|
105
|
+
subject.story_type = "chore"
|
106
|
+
subject.story_color.should == "FFFF00"
|
107
|
+
end
|
108
|
+
it "should return black for releases" do
|
109
|
+
subject.story_type = "release"
|
110
|
+
subject.story_color.should == "000000"
|
111
|
+
end
|
92
112
|
end
|
93
113
|
end
|
94
114
|
end
|
@@ -4,30 +4,30 @@ load File.expand_path(File.join(File.dirname(__FILE__), "..", "bin", "pivotal_to
|
|
4
4
|
describe 'PivotalToPdf Bin' do
|
5
5
|
describe "when pased in story sub command" do
|
6
6
|
it "should call story" do
|
7
|
-
PivotalToPdf.should_receive(:story).with(123, nil)
|
7
|
+
PivotalToPdf::Main.should_receive(:story).with(123, nil)
|
8
8
|
PivotalToPdfApp.start(["story", 123])
|
9
9
|
end
|
10
10
|
it "should not call story when no story id is given" do
|
11
|
-
PivotalToPdf.should_not_receive(:story)
|
11
|
+
PivotalToPdf::Main.should_not_receive(:story)
|
12
12
|
PivotalToPdfApp.start(["story"])
|
13
13
|
end
|
14
14
|
|
15
15
|
describe "and when the nocolor option is defined" do
|
16
16
|
it "should pass the option in" do
|
17
|
-
PivotalToPdf.should_receive(:story).with(123, "nocolor")
|
17
|
+
PivotalToPdf::Main.should_receive(:story).with(123, "nocolor")
|
18
18
|
PivotalToPdfApp.start(["story", 123, "--nocolor"])
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
22
|
describe "when pased in iteration sub command" do
|
23
23
|
it "should call iteration" do
|
24
|
-
PivotalToPdf.should_receive(:iteration).with(123, nil)
|
24
|
+
PivotalToPdf::Main.should_receive(:iteration).with(123, nil)
|
25
25
|
PivotalToPdfApp.start(["iteration", 123])
|
26
26
|
end
|
27
27
|
|
28
28
|
describe "and when the nocolor option is defined" do
|
29
29
|
it "should pass the option in" do
|
30
|
-
PivotalToPdf.should_receive(:iteration).with(123, "nocolor")
|
30
|
+
PivotalToPdf::Main.should_receive(:iteration).with(123, "nocolor")
|
31
31
|
PivotalToPdfApp.start(["iteration", 123, "--nocolor"])
|
32
32
|
end
|
33
33
|
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.8.2
|
8
|
+
- 9
|
9
|
+
version: "0.9"
|
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-
|
17
|
+
date: 2011-10-30 00:00:00 -05:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -92,6 +91,7 @@ extra_rdoc_files:
|
|
92
91
|
- lib/pivotal_to_pdf/iteration.rb
|
93
92
|
- lib/pivotal_to_pdf/pdf_writer.rb
|
94
93
|
- lib/pivotal_to_pdf/pivotal.rb
|
94
|
+
- lib/pivotal_to_pdf/simple_text_formatter.rb
|
95
95
|
- lib/pivotal_to_pdf/story.rb
|
96
96
|
- tasks/spec.rb
|
97
97
|
files:
|
@@ -106,7 +106,9 @@ files:
|
|
106
106
|
- lib/pivotal_to_pdf/iteration.rb
|
107
107
|
- lib/pivotal_to_pdf/pdf_writer.rb
|
108
108
|
- lib/pivotal_to_pdf/pivotal.rb
|
109
|
+
- lib/pivotal_to_pdf/simple_text_formatter.rb
|
109
110
|
- lib/pivotal_to_pdf/story.rb
|
111
|
+
- spec/pivotal_to_pdf/simple_text_formatter_spec.rb
|
110
112
|
- spec/pivotal_to_pdf/story_spec.rb
|
111
113
|
- spec/pivotal_to_pdf_bin_spec.rb
|
112
114
|
- spec/spec_helper.rb
|
@@ -148,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
150
|
requirements: []
|
149
151
|
|
150
152
|
rubyforge_project: pivotal_to_pdf
|
151
|
-
rubygems_version: 1.4.
|
153
|
+
rubygems_version: 1.4.2
|
152
154
|
signing_key:
|
153
155
|
specification_version: 3
|
154
156
|
summary: Convert Pivotal Tracker Stories to 4x6 PDF for printing
|