git2pdf 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/VERSION +1 -1
- data/git2pdf.gemspec +2 -1
- data/lib/assets/images/pocketworks.png +0 -0
- data/lib/git2pdf.rb +32 -28
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00634eb07b6a4b24b666c606cc42202d09260421
|
4
|
+
data.tar.gz: ff361da091a149a428617436c962fa9552f81926
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0020e07533c6f495e7bb8e2431c3bf6bfd5f8b654dcc32f1dcc5fe58f2b20a440f26f19cc1445255857d0a2e7749de551565f2d903b5a38696d5423b5c11d532
|
7
|
+
data.tar.gz: 3c3b6ab2c3c1f41dc8818ad6bfc0acb38d1dcea6635446e440f051c330097c6099686f8d6ca32cbb818d7a28e41b918a45e7526e423f92f10625fb97553f5db3
|
data/README.md
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-

|
1
|
+

|
2
|
+
|
3
|
+
by [Pocketworks](http://pocketworks.co.uk), a UK mobile apps and sales technology development company.
|
2
4
|
|
3
5
|
# Git2Pdf
|
4
6
|
|
5
7
|
**Print physical Kanban cards from your GitHub issues, and stick that sweet stuff on your office wall**
|
6
8
|
|
9
|
+
|
10
|
+

|
11
|
+
|
7
12
|
## Install
|
8
13
|
|
9
14
|
gem install git2pdf
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/git2pdf.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "git2pdf"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tobin Harris"]
|
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
"lib/assets/fonts/Lato-Light.ttf",
|
40
40
|
"lib/assets/fonts/Lato-LightItalic.ttf",
|
41
41
|
"lib/assets/fonts/Lato-Regular.ttf",
|
42
|
+
"lib/assets/images/pocketworks.png",
|
42
43
|
"lib/git2pdf.rb",
|
43
44
|
"test/helper.rb",
|
44
45
|
"test/test_git2pdf.rb"
|
Binary file
|
data/lib/git2pdf.rb
CHANGED
@@ -65,7 +65,8 @@ class Git2Pdf
|
|
65
65
|
:normal => "#{dir}/assets/fonts/Lato-Light.ttf"})
|
66
66
|
font 'Lato'
|
67
67
|
batch = batch.sort { |a, b| a["ref"]<=>b["ref"] and a["project"]<=>b["project"] }
|
68
|
-
logo = open("http://www.pocketworks.co.uk/images/logo.png")
|
68
|
+
#logo = open("http://www.pocketworks.co.uk/images/logo.png")
|
69
|
+
logo = open("#{dir}/assets/images/pocketworks.png")
|
69
70
|
batch.each do |issue|
|
70
71
|
|
71
72
|
##
|
@@ -91,9 +92,11 @@ class Git2Pdf
|
|
91
92
|
y_offset = 195
|
92
93
|
|
93
94
|
#Ref
|
94
|
-
font 'Lato', :style => :
|
95
|
-
text_box issue[:ref] || "", :at => [185, y_offset], :width => 100, :overflow => :shrink_to_fit, :align => :right
|
95
|
+
font 'Lato', :style => :bold, size: 28
|
96
|
+
text_box "##{issue[:ref]}" || "", :at => [185, y_offset], :width => 100, :overflow => :shrink_to_fit, :align => :right
|
96
97
|
|
98
|
+
# image watermark
|
99
|
+
image logo, :at=>[240,60], :width=>50
|
97
100
|
|
98
101
|
#Short title
|
99
102
|
short_title = issue[:short_title]
|
@@ -104,48 +107,49 @@ class Git2Pdf
|
|
104
107
|
if issue[:milestone] and issue[:milestone] != ""
|
105
108
|
y_offset = y_offset - 30
|
106
109
|
# Milestone
|
107
|
-
font 'Lato', :style => :normal, size:
|
110
|
+
font 'Lato', :style => :normal, size: 16
|
108
111
|
text_box issue[:milestone].upcase, :at => [margin, y_offset], :width => 280, :overflow => :shrink_to_fit
|
109
112
|
#text_box fields["due"] || "", :at=>[120,20], :width=>60, :overflow=>:shrink_to_fit
|
113
|
+
y_offset = y_offset + 20
|
110
114
|
end
|
111
115
|
|
112
|
-
y_offset = y_offset - 10
|
113
116
|
|
117
|
+
|
118
|
+
fill_color "EEEEEE"
|
119
|
+
fill_color "D0021B" if issue[:type] == "BUG"
|
120
|
+
fill_color "1D8FCE" if issue[:type] == "TASK"
|
121
|
+
fill_color "FBF937" if issue[:type] == "FEATURE"
|
122
|
+
fill_color "F5B383" if issue[:type] == "AMEND"
|
123
|
+
fill_color "FBF937" if issue[:type] == "ENHANCEMENT"
|
124
|
+
|
114
125
|
if issue[:type] and issue[:type] != ""
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
fill_color "CCCCCC" if issue[:type] == "TASK"
|
119
|
-
fill_color "FBF937" if issue[:type] == "FEATURE"
|
120
|
-
fill_color "F5B383" if issue[:type] == "AMEND"
|
121
|
-
fill_color "FBF937" if issue[:type] == "ENHANCEMENT"
|
122
|
-
|
123
|
-
fill{rectangle([0,220], margin-10, 220)}
|
124
|
-
fill_color "000000"
|
125
|
-
end
|
126
|
-
|
127
|
-
y_offset = y_offset - 20
|
128
|
-
# Type
|
129
|
-
font 'Lato', :style => :bold, size: 16, :color => '888888'
|
130
|
-
text_box issue[:type], :at => [margin, y_offset], :width => 280-margin, :overflow => :shrink_to_fit
|
126
|
+
fill{rectangle([0,220], margin-10, 220)}
|
127
|
+
else
|
128
|
+
fill{rectangle([0,220], margin-10, 220)}
|
131
129
|
end
|
130
|
+
fill_color "000000"
|
131
|
+
|
132
|
+
# if issue[:type] and issue[:type] != ""
|
133
|
+
# y_offset = y_offset - 20
|
134
|
+
# # Type
|
135
|
+
# font 'Lato', :style => :bold, size: 16, :color => '888888'
|
136
|
+
# text_box issue[:type], :at => [margin, y_offset], :width => 280-margin, :overflow => :shrink_to_fit
|
137
|
+
# end
|
132
138
|
|
133
139
|
if issue[:long_title]
|
134
|
-
y_offset = y_offset -
|
140
|
+
y_offset = y_offset - 50
|
135
141
|
# Long title
|
136
|
-
font 'Lato', :style => :normal, size:
|
142
|
+
font 'Lato', :style => :normal, size: 18
|
137
143
|
text_box issue[:long_title] ? issue[:long_title][0..120] : "NO DESCRIPTION", :at => [margin, y_offset], :width => 280-margin, :overflow => :shrink_to_fit
|
138
144
|
end
|
139
145
|
|
140
146
|
# Labels
|
141
|
-
font 'Lato', :style => :
|
142
|
-
text_box issue[:labels]
|
147
|
+
font 'Lato', :style => :bold, size: 12
|
148
|
+
text_box issue[:labels].length == 0 ? "NO LABELS!" : issue[:labels], :at => [margin, 20], :width => 220-margin, :overflow => :shrink_to_fit
|
143
149
|
#text_box fields[:due] || "", :at=>[120,20], :width=>60, :overflow=>:shrink_to_fit
|
144
150
|
#end
|
145
151
|
|
146
|
-
|
147
|
-
|
148
|
-
image logo, :at=>[220,23], :width=>65
|
152
|
+
|
149
153
|
|
150
154
|
#if col == 1
|
151
155
|
# row = row + 1
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git2pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobin Harris
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/assets/fonts/Lato-Light.ttf
|
140
140
|
- lib/assets/fonts/Lato-LightItalic.ttf
|
141
141
|
- lib/assets/fonts/Lato-Regular.ttf
|
142
|
+
- lib/assets/images/pocketworks.png
|
142
143
|
- lib/git2pdf.rb
|
143
144
|
- test/helper.rb
|
144
145
|
- test/test_git2pdf.rb
|