code2pdf_rdeterre 0.4.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.
Files changed (36) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +61 -0
  6. data/LICENSE +24 -0
  7. data/README.md +52 -0
  8. data/Rakefile +7 -0
  9. data/bin/code2pdf +39 -0
  10. data/code2pdf.gemspec +24 -0
  11. data/examples/example.pdf +24488 -0
  12. data/lib/code2pdf.rb +4 -0
  13. data/lib/code2pdf/convert_to_pdf.rb +120 -0
  14. data/lib/code2pdf/version.rb +3 -0
  15. data/spec/code2pdf/convert_to_pdf_spec.rb +73 -0
  16. data/spec/fixtures/hello_world/.code2pdf +7 -0
  17. data/spec/fixtures/hello_world/doc/HelloWorld.html +162 -0
  18. data/spec/fixtures/hello_world/doc/HelloWorld/Gambi.html +150 -0
  19. data/spec/fixtures/hello_world/doc/HelloWorld/Goodbye.html +199 -0
  20. data/spec/fixtures/hello_world/doc/HelloWorld/Helo.html +199 -0
  21. data/spec/fixtures/hello_world/doc/created.rid +5 -0
  22. data/spec/fixtures/hello_world/doc/index.html +66 -0
  23. data/spec/fixtures/hello_world/doc/lib/gambi_rb.html +52 -0
  24. data/spec/fixtures/hello_world/doc/lib/goodbye_rb.html +52 -0
  25. data/spec/fixtures/hello_world/doc/lib/hello_rb.html +52 -0
  26. data/spec/fixtures/hello_world/doc/rdoc.css +706 -0
  27. data/spec/fixtures/hello_world/doc/tmp_txt.html +90 -0
  28. data/spec/fixtures/hello_world/lib/gambi.rb +5 -0
  29. data/spec/fixtures/hello_world/lib/goodbye.rb +7 -0
  30. data/spec/fixtures/hello_world/lib/hello.rb +7 -0
  31. data/spec/fixtures/hello_world/tmp.txt +1 -0
  32. data/spec/fixtures/hello_world_original.pdf +0 -0
  33. data/spec/fixtures/purplelist.yml +3 -0
  34. data/spec/fixtures/syntax_highlight.html +15 -0
  35. data/spec/spec_helper.rb +10 -0
  36. metadata +189 -0
@@ -0,0 +1,90 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+
9
+ <title>File: tmp.txt [RDoc Documentation]</title>
10
+
11
+ <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet" />
12
+
13
+ <script src="./js/jquery.js" type="text/javascript"
14
+ charset="utf-8"></script>
15
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
16
+ charset="utf-8"></script>
17
+ <script src="./js/quicksearch.js" type="text/javascript"
18
+ charset="utf-8"></script>
19
+ <script src="./js/darkfish.js" type="text/javascript"
20
+ charset="utf-8"></script>
21
+ </head>
22
+
23
+ <body class="file">
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="project-metadata">
36
+
37
+
38
+ <div id="fileindex-section" class="section project-section">
39
+ <h3 class="section-header">Files</h3>
40
+ <ul>
41
+
42
+ <li class="file"><a href="./tmp_txt.html">tmp.txt</a></li>
43
+
44
+ </ul>
45
+ </div>
46
+
47
+
48
+ <div id="classindex-section" class="section project-section">
49
+ <h3 class="section-header">Class Index
50
+ <span class="search-toggle"><img src="./images/find.png"
51
+ height="16" width="16" alt="[+]"
52
+ title="show/hide quicksearch" /></span></h3>
53
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
54
+ <fieldset>
55
+ <legend>Quicksearch</legend>
56
+ <input type="text" name="quicksearch" value=""
57
+ class="quicksearch-field" />
58
+ </fieldset>
59
+ </form>
60
+
61
+ <ul class="link-list">
62
+
63
+ <li><a href="./HelloWorld.html">HelloWorld</a></li>
64
+
65
+ <li><a href="./HelloWorld/Gambi.html">HelloWorld::Gambi</a></li>
66
+
67
+ <li><a href="./HelloWorld/Goodbye.html">HelloWorld::Goodbye</a></li>
68
+
69
+ <li><a href="./HelloWorld/Helo.html">HelloWorld::Helo</a></li>
70
+
71
+ </ul>
72
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
73
+ </div>
74
+
75
+
76
+ </div>
77
+ </div>
78
+
79
+ <div id="documentation">
80
+
81
+ </div>
82
+
83
+ <div id="validator-badges">
84
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
85
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
86
+ Rdoc Generator</a> 1.1.6</small>.</p>
87
+ </div>
88
+ </body>
89
+ </html>
90
+
@@ -0,0 +1,5 @@
1
+ module HelloWorld
2
+ class Gambi
3
+ # ... some ugly code that I don't want to print in PDF file
4
+ end
5
+ end
@@ -0,0 +1,7 @@
1
+ module HelloWorld
2
+ class Goodbye
3
+ def say
4
+ 'See ya!'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module HelloWorld
2
+ class Helo
3
+ def say(name)
4
+ "Hi, #{name}!"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ sample content which should not be included in the generated PDF file
@@ -0,0 +1,3 @@
1
+ :invalid:
2
+ - foo
3
+ - bar
@@ -0,0 +1,15 @@
1
+ <table class="rouge-table"><tbody><tr><td class="rouge-gutter gl"><pre class="lineno">1
2
+ 2
3
+ 3
4
+ 4
5
+ 5
6
+ 6
7
+ 7
8
+ </pre></td><td class="rouge-code"><pre><span style="color: #aa759f">module</span> <span style="color: #f4bf75">HelloWorld</span>
9
+ <span style="color: #aa759f">class</span> <span style="color: #f4bf75">Helo</span>
10
+ <span style="color: #aa759f">def</span> <span style="color: #303030">say</span><span style="color: #d0d0d0">(</span><span style="color: #303030">name</span><span style="color: #d0d0d0">)</span>
11
+ <span style="color: #90a959">"Hi, </span><span style="color: #8f5536">#{</span><span style="color: #303030">name</span><span style="color: #8f5536">}</span><span style="color: #90a959">!"</span>
12
+ <span style="color: #aa759f">end</span>
13
+ <span style="color: #aa759f">end</span>
14
+ <span style="color: #aa759f">end</span>
15
+ </pre></td></tr></tbody></table>
@@ -0,0 +1,10 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+
3
+ require 'code2pdf'
4
+
5
+ Dir['./spec/support/**/*.rb'].each { |f| require f }
6
+
7
+ RSpec.configure do |config|
8
+ config.filter_run :focus
9
+ config.run_all_when_everything_filtered = true
10
+ end
metadata ADDED
@@ -0,0 +1,189 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: code2pdf_rdeterre
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.2
5
+ platform: ruby
6
+ authors:
7
+ - Lucas Caton
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-10-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pdfkit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: wkhtmltopdf-binary
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rouge
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pdf-inspector
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Convert your source code to PDF
126
+ email:
127
+ executables:
128
+ - code2pdf
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - Gemfile
135
+ - Gemfile.lock
136
+ - LICENSE
137
+ - README.md
138
+ - Rakefile
139
+ - bin/code2pdf
140
+ - code2pdf.gemspec
141
+ - examples/example.pdf
142
+ - lib/code2pdf.rb
143
+ - lib/code2pdf/convert_to_pdf.rb
144
+ - lib/code2pdf/version.rb
145
+ - spec/code2pdf/convert_to_pdf_spec.rb
146
+ - spec/fixtures/hello_world/.code2pdf
147
+ - spec/fixtures/hello_world/doc/HelloWorld.html
148
+ - spec/fixtures/hello_world/doc/HelloWorld/Gambi.html
149
+ - spec/fixtures/hello_world/doc/HelloWorld/Goodbye.html
150
+ - spec/fixtures/hello_world/doc/HelloWorld/Helo.html
151
+ - spec/fixtures/hello_world/doc/created.rid
152
+ - spec/fixtures/hello_world/doc/index.html
153
+ - spec/fixtures/hello_world/doc/lib/gambi_rb.html
154
+ - spec/fixtures/hello_world/doc/lib/goodbye_rb.html
155
+ - spec/fixtures/hello_world/doc/lib/hello_rb.html
156
+ - spec/fixtures/hello_world/doc/rdoc.css
157
+ - spec/fixtures/hello_world/doc/tmp_txt.html
158
+ - spec/fixtures/hello_world/lib/gambi.rb
159
+ - spec/fixtures/hello_world/lib/goodbye.rb
160
+ - spec/fixtures/hello_world/lib/hello.rb
161
+ - spec/fixtures/hello_world/tmp.txt
162
+ - spec/fixtures/hello_world_original.pdf
163
+ - spec/fixtures/purplelist.yml
164
+ - spec/fixtures/syntax_highlight.html
165
+ - spec/spec_helper.rb
166
+ homepage:
167
+ licenses: []
168
+ metadata: {}
169
+ post_install_message:
170
+ rdoc_options: []
171
+ require_paths:
172
+ - lib
173
+ required_ruby_version: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: 2.0.0
178
+ required_rubygems_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ requirements: []
184
+ rubyforge_project:
185
+ rubygems_version: 2.6.14.1
186
+ signing_key:
187
+ specification_version: 4
188
+ summary: Convert your source code to PDF
189
+ test_files: []