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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cc2313ada374007aa0ae9dc382e91e5d5d4e0ca
4
- data.tar.gz: 914bc60f17a2ca3776aea4bacd4e250c9cc376ba
3
+ metadata.gz: 00634eb07b6a4b24b666c606cc42202d09260421
4
+ data.tar.gz: ff361da091a149a428617436c962fa9552f81926
5
5
  SHA512:
6
- metadata.gz: ccb6a1d2cbeca72e090b9824e8dad9735e76a42b8e469377291df97c23f2b24b942ec00fb442b0ee2028f4dbcff42680f452d8c338ff8f6a0285f0fb52d51eb1
7
- data.tar.gz: f0fd9b34975ed68cd11ab9fe2abdc989008da8ef7427b2c9754d7db3702ba53033d1ad8a6c486392afc34262355fb1d8c14c92549ee35e98ceed7c630960aee2
6
+ metadata.gz: 0020e07533c6f495e7bb8e2431c3bf6bfd5f8b654dcc32f1dcc5fe58f2b20a440f26f19cc1445255857d0a2e7749de551565f2d903b5a38696d5423b5c11d532
7
+ data.tar.gz: 3c3b6ab2c3c1f41dc8818ad6bfc0acb38d1dcea6635446e440f051c330097c6099686f8d6ca32cbb818d7a28e41b918a45e7526e423f92f10625fb97553f5db3
data/README.md CHANGED
@@ -1,9 +1,14 @@
1
- ![](http://www.pocketworks.co.uk/images/logo.png)
1
+ ![](http://www.pocketworks.co.uk/images/git2pdf/logo.png)
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
+ ![](http://pocketworks.co.uk/images/git2pdf/git2pdf-on-wall.jpg)
11
+
7
12
  ## Install
8
13
 
9
14
  gem install git2pdf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.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.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 => :normal, size: 28
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: 13
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
- if issue[:type]
116
-
117
- fill_color "CE1852" #default, assume everything a bug
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 - 20
140
+ y_offset = y_offset - 50
135
141
  # Long title
136
- font 'Lato', :style => :normal, size: 16
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 => :normal, size: 13
142
- text_box issue[:labels] || "", :at => [margin, 20], :width => 280-margin, :overflow => :shrink_to_fit
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
- # image
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.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