code2pdf 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.
- data/README.textile +5 -1
- data/bin/code2pdf +1 -2
- data/code2pdf.gemspec +1 -0
- data/examples/example.pdf +24488 -0
- data/lib/code2pdf/convert_to_pdf.rb +2 -1
- data/lib/code2pdf/version.rb +1 -1
- metadata +21 -4
|
@@ -11,8 +11,9 @@ class ConvertToPDF
|
|
|
11
11
|
def pdf
|
|
12
12
|
Prawn::Document.new PDF_OPTIONS do |pdf|
|
|
13
13
|
@code_files.each do |file|
|
|
14
|
+
puts "Converting to PDF => #{file.first}"
|
|
14
15
|
pdf.font 'Courier' do
|
|
15
|
-
pdf.text file.first, :size => 12, :inline_format => true
|
|
16
|
+
pdf.text "File: <strong>#{file.first}</strong>", :size => 12, :inline_format => true
|
|
16
17
|
pdf.move_down 20
|
|
17
18
|
pdf.text file.last, :size => 12, :inline_format => true
|
|
18
19
|
pdf.move_down 40
|
data/lib/code2pdf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code2pdf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 31
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.1.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Lucas Caton
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-06-
|
|
18
|
+
date: 2011-06-06 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: prawn
|
|
@@ -31,6 +31,22 @@ dependencies:
|
|
|
31
31
|
version: "0"
|
|
32
32
|
type: :development
|
|
33
33
|
version_requirements: *id001
|
|
34
|
+
- !ruby/object:Gem::Dependency
|
|
35
|
+
name: prawn
|
|
36
|
+
prerelease: false
|
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
38
|
+
none: false
|
|
39
|
+
requirements:
|
|
40
|
+
- - ~>
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
hash: 49
|
|
43
|
+
segments:
|
|
44
|
+
- 0
|
|
45
|
+
- 11
|
|
46
|
+
- 1
|
|
47
|
+
version: 0.11.1
|
|
48
|
+
type: :development
|
|
49
|
+
version_requirements: *id002
|
|
34
50
|
description: Convert your source code to PDF
|
|
35
51
|
email:
|
|
36
52
|
- lucascaton@gmail.com
|
|
@@ -49,6 +65,7 @@ files:
|
|
|
49
65
|
- Rakefile
|
|
50
66
|
- bin/code2pdf
|
|
51
67
|
- code2pdf.gemspec
|
|
68
|
+
- examples/example.pdf
|
|
52
69
|
- lib/code2pdf/convert_to_pdf.rb
|
|
53
70
|
- lib/code2pdf/version.rb
|
|
54
71
|
homepage: http://blog.lucascaton.com.br/
|