html2pdf 0.2.3 → 0.2.4
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/CHANGELOG.md +6 -0
- data/README.md +1 -40
- data/bin/html2pdf +0 -6
- data/html2pdf.gemspec +13 -16
- data/lib/html2pdf.rb +11 -3
- data/lib/html2pdf/cli.rb +0 -4
- data/{config/initializers → lib/html2pdf/config}/html2pdf.rb +0 -1
- data/lib/html2pdf/html2pdf.rb +0 -4
- data/lib/html2pdf/version.rb +1 -1
- metadata +85 -71
- checksums.yaml +0 -7
- data/test/fixtures/samples/demo1_xxx.rb.xhtml +0 -117
- data/test/fixtures/samples/demo1_xxx.rb.xhtml.pdf +0 -0
- data/test/fixtures/samples/demo2_xxx.rb.xhtml +0 -123
- data/test/fixtures/samples/demo2_xxx.rb.xhtml.pdf +0 -0
- data/test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml +0 -124
- data/test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml.pdf +0 -0
- data/test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml +0 -101
- data/test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml.pdf +0 -0
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -89,12 +89,11 @@ the pdf version of it.
|
|
89
89
|
### Customization
|
90
90
|
|
91
91
|
If you like to adjust the output for pdf you can override the default settings by
|
92
|
-
set your own configuration in the file `config/
|
92
|
+
set your own configuration in the file `lib/html2pdf/config/html2pdf.rb`
|
93
93
|
|
94
94
|
For more customization please see the [wkhtmltopdf manual][] page for detail.
|
95
95
|
|
96
96
|
```ruby
|
97
|
-
require_relative "../../lib/html2pdf/configuration"
|
98
97
|
module Html2Pdf
|
99
98
|
class << self
|
100
99
|
# rubocop:disable MethodLength
|
@@ -122,44 +121,6 @@ module Html2Pdf
|
|
122
121
|
end
|
123
122
|
```
|
124
123
|
|
125
|
-
You can use the custom settings by loading it in the `bin/html2pdf` like:
|
126
|
-
|
127
|
-
```ruby
|
128
|
-
#!/usr/bin/env ruby
|
129
|
-
require_relative "../lib/html2pdf"
|
130
|
-
# Note: if you like to customize the settings for `wkhtmltopdf` then
|
131
|
-
# uncomment the next two lines
|
132
|
-
# -----------------------------------------------------------------#
|
133
|
-
require_relative "../config/initializers/html2pdf"
|
134
|
-
Html2Pdf.update_config
|
135
|
-
# -----------------------------------------------------------------#
|
136
|
-
if ARGV.empty?
|
137
|
-
Html2Pdf::CLI.start(%w[usage])
|
138
|
-
else
|
139
|
-
Html2Pdf::CLI.start(%w[export].concat(ARGV))
|
140
|
-
end
|
141
|
-
```
|
142
|
-
|
143
|
-
Note: by default the above configuration is configured in
|
144
|
-
the file `./lib/html2pdf/configuration.rb`. Which contain the following values
|
145
|
-
|
146
|
-
```ruby
|
147
|
-
wkhtmltopdf = (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltopdf` : `which wkhtmltopdf`).chomp,
|
148
|
-
page_settings = [
|
149
|
-
"--margin-top 4",
|
150
|
-
"--margin-bottom 4",
|
151
|
-
"--margin-left 4",
|
152
|
-
"--margin-right 4",
|
153
|
-
'--header-center "[webpage] :: [page]/[topage]"',
|
154
|
-
"--header-spacing 1",
|
155
|
-
"--header-font-size 8",
|
156
|
-
"--header-line",
|
157
|
-
"--footer-spacing 1",
|
158
|
-
"--footer-font-size 8",
|
159
|
-
"--footer-line"
|
160
|
-
]
|
161
|
-
```
|
162
|
-
|
163
124
|
### Contributing
|
164
125
|
|
165
126
|
1. Fork it ( http://github.com/agilecreativity/html2pdf/fork )
|
data/bin/html2pdf
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require_relative "../lib/html2pdf"
|
3
|
-
# If you like to customize the settings for `wkhtmltopdf` then
|
4
|
-
# edit the file `config/initializers/html2pdf.rb` and enable it in the next 2 lines
|
5
|
-
# -----------------------------------------------------------------#
|
6
|
-
# require_relative "../config/initializers/html2pdf"
|
7
|
-
# Html2Pdf.update_config
|
8
|
-
# -----------------------------------------------------------------#
|
9
3
|
if ARGV.empty?
|
10
4
|
Html2Pdf::CLI.start(%w[usage])
|
11
5
|
else
|
data/html2pdf.gemspec
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require "html2pdf/version"
|
5
|
-
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = "html2pdf"
|
8
7
|
spec.version = Html2Pdf::VERSION
|
@@ -13,31 +12,29 @@ Gem::Specification.new do |spec|
|
|
13
12
|
spec.homepage = "https://github.com/agilecreativity/html2pdf"
|
14
13
|
spec.required_ruby_version = ">= 1.9.3"
|
15
14
|
spec.license = "MIT"
|
16
|
-
spec.files = Dir.glob("{bin,lib
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
spec.files = Dir.glob("{bin,lib}/**/*") + %w[Gemfile
|
16
|
+
Rakefile
|
17
|
+
html2pdf.gemspec
|
18
|
+
README.md
|
19
|
+
CHANGELOG.md
|
20
|
+
LICENSE
|
21
|
+
.rubocop.yml
|
22
|
+
.gitignore]
|
24
23
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
25
24
|
spec.test_files = Dir.glob("{test}/**/*")
|
26
25
|
spec.require_paths = ["lib"]
|
27
|
-
|
28
26
|
spec.add_runtime_dependency "thor", "~> 0.19.1"
|
29
|
-
spec.add_runtime_dependency "agile_utils", "~> 0.2.
|
30
|
-
spec.add_runtime_dependency "code_lister", "~> 0.2.
|
31
|
-
|
27
|
+
spec.add_runtime_dependency "agile_utils", "~> 0.2.3"
|
28
|
+
spec.add_runtime_dependency "code_lister", "~> 0.2.4"
|
32
29
|
spec.add_development_dependency "awesome_print", "~> 1.2.0"
|
33
30
|
spec.add_development_dependency "bundler", "~> 1.7.3"
|
34
31
|
spec.add_development_dependency "gem-ctags", "~> 1.0.6"
|
35
32
|
spec.add_development_dependency "guard", "~> 2.6.1"
|
36
33
|
spec.add_development_dependency "guard-minitest", "~> 2.3.1"
|
37
|
-
spec.add_development_dependency "minitest", "~> 5.4.
|
34
|
+
spec.add_development_dependency "minitest", "~> 5.4.2"
|
38
35
|
spec.add_development_dependency "minitest-spec-context", "~> 0.0.3"
|
39
|
-
spec.add_development_dependency "pry", "~> 0.10.
|
36
|
+
spec.add_development_dependency "pry", "~> 0.10.1"
|
40
37
|
spec.add_development_dependency "rake", "~> 10.3.2"
|
41
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
38
|
+
spec.add_development_dependency "rubocop", "~> 0.26.1"
|
42
39
|
spec.add_development_dependency "yard", "~> 0.8.7"
|
43
40
|
end
|
data/lib/html2pdf.rb
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
+
require "open3"
|
2
|
+
require "thor"
|
3
|
+
require "tmpdir"
|
4
|
+
require "fileutils"
|
1
5
|
require "agile_utils"
|
2
6
|
require "code_lister"
|
3
|
-
|
4
|
-
|
5
|
-
|
7
|
+
require "html2pdf/version"
|
8
|
+
require "html2pdf/configuration"
|
9
|
+
require "html2pdf/config/html2pdf"
|
10
|
+
require "html2pdf/html2pdf"
|
11
|
+
require "html2pdf/cli"
|
6
12
|
include AgileUtils::Options
|
7
13
|
include CodeLister
|
14
|
+
include Html2Pdf
|
15
|
+
Html2Pdf.update_config
|
data/lib/html2pdf/cli.rb
CHANGED
data/lib/html2pdf/html2pdf.rb
CHANGED
data/lib/html2pdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,209 +1,238 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html2pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Burin Choomnuan
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: thor
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 0.19.1
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.19.1
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: agile_utils
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.
|
37
|
+
version: 0.2.3
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.2.
|
45
|
+
version: 0.2.3
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: code_lister
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.2.
|
53
|
+
version: 0.2.4
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.
|
61
|
+
version: 0.2.4
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: awesome_print
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- -
|
67
|
+
- - ~>
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: 1.2.0
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- -
|
75
|
+
- - ~>
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: 1.2.0
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: bundler
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- -
|
83
|
+
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: 1.7.3
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- -
|
91
|
+
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: 1.7.3
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: gem-ctags
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- -
|
99
|
+
- - ~>
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: 1.0.6
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- -
|
107
|
+
- - ~>
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: 1.0.6
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: guard
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ~>
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: 2.6.1
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- -
|
123
|
+
- - ~>
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: 2.6.1
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: guard-minitest
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- -
|
131
|
+
- - ~>
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: 2.3.1
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- -
|
139
|
+
- - ~>
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: 2.3.1
|
125
142
|
- !ruby/object:Gem::Dependency
|
126
143
|
name: minitest
|
127
144
|
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
128
146
|
requirements:
|
129
|
-
- -
|
147
|
+
- - ~>
|
130
148
|
- !ruby/object:Gem::Version
|
131
|
-
version: 5.4.
|
149
|
+
version: 5.4.2
|
132
150
|
type: :development
|
133
151
|
prerelease: false
|
134
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
135
154
|
requirements:
|
136
|
-
- -
|
155
|
+
- - ~>
|
137
156
|
- !ruby/object:Gem::Version
|
138
|
-
version: 5.4.
|
157
|
+
version: 5.4.2
|
139
158
|
- !ruby/object:Gem::Dependency
|
140
159
|
name: minitest-spec-context
|
141
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
142
162
|
requirements:
|
143
|
-
- -
|
163
|
+
- - ~>
|
144
164
|
- !ruby/object:Gem::Version
|
145
165
|
version: 0.0.3
|
146
166
|
type: :development
|
147
167
|
prerelease: false
|
148
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
149
170
|
requirements:
|
150
|
-
- -
|
171
|
+
- - ~>
|
151
172
|
- !ruby/object:Gem::Version
|
152
173
|
version: 0.0.3
|
153
174
|
- !ruby/object:Gem::Dependency
|
154
175
|
name: pry
|
155
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
156
178
|
requirements:
|
157
|
-
- -
|
179
|
+
- - ~>
|
158
180
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.10.
|
181
|
+
version: 0.10.1
|
160
182
|
type: :development
|
161
183
|
prerelease: false
|
162
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
163
186
|
requirements:
|
164
|
-
- -
|
187
|
+
- - ~>
|
165
188
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.10.
|
189
|
+
version: 0.10.1
|
167
190
|
- !ruby/object:Gem::Dependency
|
168
191
|
name: rake
|
169
192
|
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
170
194
|
requirements:
|
171
|
-
- -
|
195
|
+
- - ~>
|
172
196
|
- !ruby/object:Gem::Version
|
173
197
|
version: 10.3.2
|
174
198
|
type: :development
|
175
199
|
prerelease: false
|
176
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
177
202
|
requirements:
|
178
|
-
- -
|
203
|
+
- - ~>
|
179
204
|
- !ruby/object:Gem::Version
|
180
205
|
version: 10.3.2
|
181
206
|
- !ruby/object:Gem::Dependency
|
182
207
|
name: rubocop
|
183
208
|
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
184
210
|
requirements:
|
185
|
-
- -
|
211
|
+
- - ~>
|
186
212
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.
|
213
|
+
version: 0.26.1
|
188
214
|
type: :development
|
189
215
|
prerelease: false
|
190
216
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
191
218
|
requirements:
|
192
|
-
- -
|
219
|
+
- - ~>
|
193
220
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.
|
221
|
+
version: 0.26.1
|
195
222
|
- !ruby/object:Gem::Dependency
|
196
223
|
name: yard
|
197
224
|
requirement: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
198
226
|
requirements:
|
199
|
-
- -
|
227
|
+
- - ~>
|
200
228
|
- !ruby/object:Gem::Version
|
201
229
|
version: 0.8.7
|
202
230
|
type: :development
|
203
231
|
prerelease: false
|
204
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
205
234
|
requirements:
|
206
|
-
- -
|
235
|
+
- - ~>
|
207
236
|
- !ruby/object:Gem::Version
|
208
237
|
version: 0.8.7
|
209
238
|
description: Export list of html or xhtml files to pdfs with 'wkhtmltopdf'
|
@@ -214,72 +243,57 @@ executables:
|
|
214
243
|
extensions: []
|
215
244
|
extra_rdoc_files: []
|
216
245
|
files:
|
217
|
-
- ".gitignore"
|
218
|
-
- ".rubocop.yml"
|
219
|
-
- CHANGELOG.md
|
220
|
-
- Gemfile
|
221
|
-
- LICENSE
|
222
|
-
- README.md
|
223
|
-
- Rakefile
|
224
246
|
- bin/html2pdf
|
225
|
-
- config/initializers/html2pdf.rb
|
226
|
-
- html2pdf.gemspec
|
227
|
-
- lib/html2pdf.rb
|
228
247
|
- lib/html2pdf/cli.rb
|
248
|
+
- lib/html2pdf/config/html2pdf.rb
|
229
249
|
- lib/html2pdf/configuration.rb
|
230
250
|
- lib/html2pdf/html2pdf.rb
|
231
251
|
- lib/html2pdf/version.rb
|
252
|
+
- lib/html2pdf.rb
|
253
|
+
- Gemfile
|
254
|
+
- Rakefile
|
255
|
+
- html2pdf.gemspec
|
256
|
+
- README.md
|
257
|
+
- CHANGELOG.md
|
258
|
+
- LICENSE
|
259
|
+
- .rubocop.yml
|
260
|
+
- .gitignore
|
232
261
|
- test/fixtures/samples/demo1_xxx.rb
|
233
|
-
- test/fixtures/samples/demo1_xxx.rb.xhtml
|
234
|
-
- test/fixtures/samples/demo1_xxx.rb.xhtml.pdf
|
235
262
|
- test/fixtures/samples/demo2_xxx.rb
|
236
|
-
- test/fixtures/samples/demo2_xxx.rb.xhtml
|
237
|
-
- test/fixtures/samples/demo2_xxx.rb.xhtml.pdf
|
238
263
|
- test/fixtures/samples/sub_dir/demo3_xxx.rb
|
239
|
-
- test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml
|
240
|
-
- test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml.pdf
|
241
264
|
- test/fixtures/samples/sub_dir/demo4_xxx.rb
|
242
|
-
- test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml
|
243
|
-
- test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml.pdf
|
244
265
|
- test/lib/html2pdf/test_html2pdf.rb
|
245
266
|
- test/test_helper.rb
|
246
267
|
homepage: https://github.com/agilecreativity/html2pdf
|
247
268
|
licenses:
|
248
269
|
- MIT
|
249
|
-
metadata: {}
|
250
270
|
post_install_message:
|
251
271
|
rdoc_options: []
|
252
272
|
require_paths:
|
253
273
|
- lib
|
254
274
|
required_ruby_version: !ruby/object:Gem::Requirement
|
275
|
+
none: false
|
255
276
|
requirements:
|
256
|
-
- -
|
277
|
+
- - ! '>='
|
257
278
|
- !ruby/object:Gem::Version
|
258
279
|
version: 1.9.3
|
259
280
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
281
|
+
none: false
|
260
282
|
requirements:
|
261
|
-
- -
|
283
|
+
- - ! '>='
|
262
284
|
- !ruby/object:Gem::Version
|
263
285
|
version: '0'
|
264
286
|
requirements: []
|
265
287
|
rubyforge_project:
|
266
|
-
rubygems_version:
|
288
|
+
rubygems_version: 1.8.23.2
|
267
289
|
signing_key:
|
268
|
-
specification_version:
|
290
|
+
specification_version: 3
|
269
291
|
summary: Bulk export list of html or xhtml files to pdfs with 'wkhtmltopdf'
|
270
292
|
test_files:
|
271
293
|
- test/fixtures/samples/demo1_xxx.rb
|
272
|
-
- test/fixtures/samples/demo1_xxx.rb.xhtml
|
273
|
-
- test/fixtures/samples/demo1_xxx.rb.xhtml.pdf
|
274
294
|
- test/fixtures/samples/demo2_xxx.rb
|
275
|
-
- test/fixtures/samples/demo2_xxx.rb.xhtml
|
276
|
-
- test/fixtures/samples/demo2_xxx.rb.xhtml.pdf
|
277
295
|
- test/fixtures/samples/sub_dir/demo3_xxx.rb
|
278
|
-
- test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml
|
279
|
-
- test/fixtures/samples/sub_dir/demo3_xxx.rb.xhtml.pdf
|
280
296
|
- test/fixtures/samples/sub_dir/demo4_xxx.rb
|
281
|
-
- test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml
|
282
|
-
- test/fixtures/samples/sub_dir/demo4_xxx.rb.xhtml.pdf
|
283
297
|
- test/lib/html2pdf/test_html2pdf.rb
|
284
298
|
- test/test_helper.rb
|
285
299
|
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f08a07eec32cb1c2d61d5c55e13564be762e3f02
|
4
|
-
data.tar.gz: 87be8a1e229e6b50b98c97d83dc2e656d252b980
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: ba57939e79c75dab5c88e02c0b20763243131bb5f6d1577610f5d8756c4d8d353ade38063be9c4ae56f0d462103a7e67c8b2d53e3afd3c325afea4f0b59110c0
|
7
|
-
data.tar.gz: c10e140b039773c4b23df868227fafc1f26d322b799f28440f34082df48877be1beffd9efd53258327705eb841af64ee13258ba013fff8c5e4c2928deab61844
|
@@ -1,117 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
-
<head>
|
5
|
-
<title>~/Dropbox/spikes/code_exporter_original/spec/fixtures/demo1.xxx.rb.xhtml</title>
|
6
|
-
<meta name="Generator" content="Vim/7.4" />
|
7
|
-
<meta name="plugin-version" content="vim7.4_v1" />
|
8
|
-
<meta name="syntax" content="ruby" />
|
9
|
-
<meta name="settings" content="no_progress,number_lines,dynamic_folds,no_pre,use_xhtml,use_css,expand_tabs,line_ids,prevent_copy=" />
|
10
|
-
<meta name="colorscheme" content="Tomorrow-Night" />
|
11
|
-
<style type="text/css">
|
12
|
-
|
13
|
-
body { color: #bcbcbc; background-color: #262626; font-family: monospace; }
|
14
|
-
* { font-size: 1em; }
|
15
|
-
.Operator { color: #87afaf; }
|
16
|
-
.rubyConstant { color: #ffd787; }
|
17
|
-
.rubyInclude { color: #87afaf; }
|
18
|
-
.rubyStringDelimiter { color: #afaf5f; }
|
19
|
-
.Function { color: #87afaf; }
|
20
|
-
.Define { color: #af87af; }
|
21
|
-
.FoldColumn { color: #00ffff; background-color: #262626; padding-bottom: 1px; }
|
22
|
-
.rubyConditional { color: #af87af; }
|
23
|
-
.LineNr { color: #4e4e4e; }
|
24
|
-
.Comment { color: #8a8a8a; }
|
25
|
-
.String { color: #afaf5f; }
|
26
|
-
.Constant { color: #d7875f; }
|
27
|
-
.FoldColumn { text-decoration: none; white-space: pre; }
|
28
|
-
.open-fold .Folded { display: none; }
|
29
|
-
.open-fold .fulltext { display: inline; }
|
30
|
-
.open-fold .toggle-open { display: none; }
|
31
|
-
.closed-fold .toggle-closed { display: inline; }
|
32
|
-
|
33
|
-
.closed-fold .fulltext { display: none; }
|
34
|
-
.closed-fold .Folded { display: inline; }
|
35
|
-
.closed-fold .toggle-open { display: inline; }
|
36
|
-
.closed-fold .toggle-closed { display: none; }
|
37
|
-
|
38
|
-
</style>
|
39
|
-
|
40
|
-
<script type='text/javascript'>
|
41
|
-
//<![CDATA[
|
42
|
-
|
43
|
-
function toggleFold(objID)
|
44
|
-
{
|
45
|
-
var fold;
|
46
|
-
fold = document.getElementById(objID);
|
47
|
-
if(fold.className == 'closed-fold')
|
48
|
-
{
|
49
|
-
fold.className = 'open-fold';
|
50
|
-
}
|
51
|
-
else if (fold.className == 'open-fold')
|
52
|
-
{
|
53
|
-
fold.className = 'closed-fold';
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
/* function to open any folds containing a jumped-to line before jumping to it */
|
58
|
-
function JumpToLine()
|
59
|
-
{
|
60
|
-
var lineNum;
|
61
|
-
lineNum = window.location.hash;
|
62
|
-
lineNum = lineNum.substr(1); /* strip off '#' */
|
63
|
-
|
64
|
-
if (lineNum.indexOf('L') == -1) {
|
65
|
-
lineNum = 'L'+lineNum;
|
66
|
-
}
|
67
|
-
lineElem = document.getElementById(lineNum);
|
68
|
-
|
69
|
-
/* navigate upwards in the DOM tree to open all folds containing the line */
|
70
|
-
var node = lineElem;
|
71
|
-
while (node && node.id != 'vimCodeElement')
|
72
|
-
{
|
73
|
-
if (node.className == 'closed-fold')
|
74
|
-
{
|
75
|
-
node.className = 'open-fold';
|
76
|
-
}
|
77
|
-
node = node.parentNode;
|
78
|
-
}
|
79
|
-
/* Always jump to new location even if the line was hidden inside a fold, or
|
80
|
-
* we corrected the raw number to a line ID.
|
81
|
-
*/
|
82
|
-
if (lineElem) {
|
83
|
-
lineElem.scrollIntoView(true);
|
84
|
-
}
|
85
|
-
return true;
|
86
|
-
}
|
87
|
-
if ('onhashchange' in window) {
|
88
|
-
window.onhashchange = JumpToLine;
|
89
|
-
}
|
90
|
-
|
91
|
-
//]]>
|
92
|
-
</script>
|
93
|
-
</head>
|
94
|
-
<body onload='JumpToLine();'>
|
95
|
-
<div id='vimCodeElement'>
|
96
|
-
<span id="L1" class="LineNr"> 1 </span><span class="Comment"># file: spec/fixtures/demo1.rb</span><br />
|
97
|
-
<span id="L2" class="LineNr"> 2 </span><span class="Comment"># from: <a href="https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/food.rb">https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/food.rb</a></span><br />
|
98
|
-
<span id="L3" class="LineNr"> 3 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">active_support/inflector</span><span class="rubyStringDelimiter">'</span><br />
|
99
|
-
<span id="L4" class="LineNr"> 4 </span><span class="Define">module</span> <span class="rubyConstant">Foodie</span><br />
|
100
|
-
<span id="L5" class="LineNr"> 5 </span>  <span class="Define">class</span> <span class="rubyConstant">Food</span><br />
|
101
|
-
<span id="L6" class="LineNr"> 6 </span>    <span class="Define">def</span> <span class="Constant">self</span>.<span class="Function">portray</span>(food)<br />
|
102
|
-
<span id="L7" class="LineNr"> 7 </span>      <span class="rubyConditional">if</span> food.downcase <span class="Operator">==</span> <span class="rubyStringDelimiter">"</span><span class="String">broccoli</span><span class="rubyStringDelimiter">"</span><br />
|
103
|
-
<span id="L8" class="LineNr"> 8 </span>        <span class="rubyStringDelimiter">"</span><span class="String">Gross!</span><span class="rubyStringDelimiter">"</span><br />
|
104
|
-
<span id="L9" class="LineNr"> 9 </span>      <span class="rubyConditional">else</span><br />
|
105
|
-
<span id="L10" class="LineNr">10 </span>        <span class="rubyStringDelimiter">"</span><span class="String">Delicious!</span><span class="rubyStringDelimiter">"</span><br />
|
106
|
-
<span id="L11" class="LineNr">11 </span>      <span class="rubyConditional">end</span><br />
|
107
|
-
<span id="L12" class="LineNr">12 </span>    <span class="Define">end</span><br />
|
108
|
-
<span id="L13" class="LineNr">13 </span><br />
|
109
|
-
<span id="L14" class="LineNr">14 </span>    <span class="Define">def</span> <span class="Constant">self</span>.<span class="Function">pluralize</span>(word)<br />
|
110
|
-
<span id="L15" class="LineNr">15 </span>      word.pluralize<br />
|
111
|
-
<span id="L16" class="LineNr">16 </span>    <span class="Define">end</span><br />
|
112
|
-
<span id="L17" class="LineNr">17 </span>  <span class="Define">end</span><br />
|
113
|
-
<span id="L18" class="LineNr">18 </span><span class="Define">end</span><br />
|
114
|
-
</div>
|
115
|
-
</body>
|
116
|
-
</html>
|
117
|
-
<!-- vim: set foldmethod=manual : -->
|
Binary file
|
@@ -1,123 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
-
<head>
|
5
|
-
<title>~/Dropbox/spikes/code_exporter_original/spec/fixtures/demo2.xxx.rb.xhtml</title>
|
6
|
-
<meta name="Generator" content="Vim/7.4" />
|
7
|
-
<meta name="plugin-version" content="vim7.4_v1" />
|
8
|
-
<meta name="syntax" content="ruby" />
|
9
|
-
<meta name="settings" content="no_progress,number_lines,dynamic_folds,no_pre,use_xhtml,use_css,expand_tabs,line_ids,prevent_copy=" />
|
10
|
-
<meta name="colorscheme" content="Tomorrow-Night" />
|
11
|
-
<style type="text/css">
|
12
|
-
|
13
|
-
body { color: #bcbcbc; background-color: #262626; font-family: monospace; }
|
14
|
-
* { font-size: 1em; }
|
15
|
-
.Operator { color: #87afaf; }
|
16
|
-
.rubySymbol { color: #afaf5f; }
|
17
|
-
.rubyConstant { color: #ffd787; }
|
18
|
-
.rubyInclude { color: #87afaf; }
|
19
|
-
.rubyStringDelimiter { color: #afaf5f; }
|
20
|
-
.Function { color: #87afaf; }
|
21
|
-
.Define { color: #af87af; }
|
22
|
-
.FoldColumn { color: #00ffff; background-color: #262626; padding-bottom: 1px; }
|
23
|
-
.LineNr { color: #4e4e4e; }
|
24
|
-
.Comment { color: #8a8a8a; }
|
25
|
-
.String { color: #afaf5f; }
|
26
|
-
.FoldColumn { text-decoration: none; white-space: pre; }
|
27
|
-
.open-fold .Folded { display: none; }
|
28
|
-
.open-fold .fulltext { display: inline; }
|
29
|
-
.open-fold .toggle-open { display: none; }
|
30
|
-
.closed-fold .toggle-closed { display: inline; }
|
31
|
-
|
32
|
-
.closed-fold .fulltext { display: none; }
|
33
|
-
.closed-fold .Folded { display: inline; }
|
34
|
-
.closed-fold .toggle-open { display: inline; }
|
35
|
-
.closed-fold .toggle-closed { display: none; }
|
36
|
-
|
37
|
-
</style>
|
38
|
-
|
39
|
-
<script type='text/javascript'>
|
40
|
-
//<![CDATA[
|
41
|
-
|
42
|
-
function toggleFold(objID)
|
43
|
-
{
|
44
|
-
var fold;
|
45
|
-
fold = document.getElementById(objID);
|
46
|
-
if(fold.className == 'closed-fold')
|
47
|
-
{
|
48
|
-
fold.className = 'open-fold';
|
49
|
-
}
|
50
|
-
else if (fold.className == 'open-fold')
|
51
|
-
{
|
52
|
-
fold.className = 'closed-fold';
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
/* function to open any folds containing a jumped-to line before jumping to it */
|
57
|
-
function JumpToLine()
|
58
|
-
{
|
59
|
-
var lineNum;
|
60
|
-
lineNum = window.location.hash;
|
61
|
-
lineNum = lineNum.substr(1); /* strip off '#' */
|
62
|
-
|
63
|
-
if (lineNum.indexOf('L') == -1) {
|
64
|
-
lineNum = 'L'+lineNum;
|
65
|
-
}
|
66
|
-
lineElem = document.getElementById(lineNum);
|
67
|
-
|
68
|
-
/* navigate upwards in the DOM tree to open all folds containing the line */
|
69
|
-
var node = lineElem;
|
70
|
-
while (node && node.id != 'vimCodeElement')
|
71
|
-
{
|
72
|
-
if (node.className == 'closed-fold')
|
73
|
-
{
|
74
|
-
node.className = 'open-fold';
|
75
|
-
}
|
76
|
-
node = node.parentNode;
|
77
|
-
}
|
78
|
-
/* Always jump to new location even if the line was hidden inside a fold, or
|
79
|
-
* we corrected the raw number to a line ID.
|
80
|
-
*/
|
81
|
-
if (lineElem) {
|
82
|
-
lineElem.scrollIntoView(true);
|
83
|
-
}
|
84
|
-
return true;
|
85
|
-
}
|
86
|
-
if ('onhashchange' in window) {
|
87
|
-
window.onhashchange = JumpToLine;
|
88
|
-
}
|
89
|
-
|
90
|
-
//]]>
|
91
|
-
</script>
|
92
|
-
</head>
|
93
|
-
<body onload='JumpToLine();'>
|
94
|
-
<div id='vimCodeElement'>
|
95
|
-
<span id="L1" class="LineNr"> 1 </span><span class="Comment"># file: spec/fixtures/demo2.rb</span><br />
|
96
|
-
<span id="L2" class="LineNr"> 2 </span><span class="Comment"># from: <a href="https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/cli.rb">https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/cli.rb</a></span><br />
|
97
|
-
<span id="L3" class="LineNr"> 3 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">thor</span><span class="rubyStringDelimiter">'</span><br />
|
98
|
-
<span id="L4" class="LineNr"> 4 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">foodie</span><span class="rubyStringDelimiter">'</span><br />
|
99
|
-
<span id="L5" class="LineNr"> 5 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">foodie/generators/recipe</span><span class="rubyStringDelimiter">'</span><br />
|
100
|
-
<span id="L6" class="LineNr"> 6 </span><br />
|
101
|
-
<span id="L7" class="LineNr"> 7 </span><span class="Define">module</span> <span class="rubyConstant">Foodie</span><br />
|
102
|
-
<span id="L8" class="LineNr"> 8 </span>  <span class="Define">class</span> <span class="rubyConstant">CLI</span> < <span class="rubyConstant">Thor</span><br />
|
103
|
-
<span id="L9" class="LineNr"> 9 </span>    desc <span class="rubyStringDelimiter">"</span><span class="String">portray ITEM</span><span class="rubyStringDelimiter">"</span>, <span class="rubyStringDelimiter">"</span><span class="String">Determines if a piece of food is gross or delicious</span><span class="rubyStringDelimiter">"</span><br />
|
104
|
-
<span id="L10" class="LineNr">10 </span>    <span class="Define">def</span> <span class="Function">portray</span>(name)<br />
|
105
|
-
<span id="L11" class="LineNr">11 </span>      puts <span class="rubyConstant">Foodie</span><span class="Operator">::</span><span class="rubyConstant">Food</span>.portray(name)<br />
|
106
|
-
<span id="L12" class="LineNr">12 </span>    <span class="Define">end</span><br />
|
107
|
-
<span id="L13" class="LineNr">13 </span><br />
|
108
|
-
<span id="L14" class="LineNr">14 </span>    desc <span class="rubyStringDelimiter">"</span><span class="String">pluralize</span><span class="rubyStringDelimiter">"</span>, <span class="rubyStringDelimiter">"</span><span class="String">Pluralizes a word</span><span class="rubyStringDelimiter">"</span><br />
|
109
|
-
<span id="L15" class="LineNr">15 </span>    method_option <span class="rubySymbol">:word</span>, <span class="rubySymbol">:aliases</span> => <span class="rubySymbol">:word</span><br />
|
110
|
-
<span id="L16" class="LineNr">16 </span>    <span class="Define">def</span> <span class="Function">pluralize</span><br />
|
111
|
-
<span id="L17" class="LineNr">17 </span>      puts <span class="rubyConstant">Foodie</span><span class="Operator">::</span><span class="rubyConstant">Food</span>.pluralize(options<span class="Operator">[</span><span class="rubySymbol">:word</span><span class="Operator">]</span>)<br />
|
112
|
-
<span id="L18" class="LineNr">18 </span>    <span class="Define">end</span><br />
|
113
|
-
<span id="L19" class="LineNr">19 </span><br />
|
114
|
-
<span id="L20" class="LineNr">20 </span>    desc <span class="rubyStringDelimiter">"</span><span class="String">recipe</span><span class="rubyStringDelimiter">"</span>, <span class="rubyStringDelimiter">"</span><span class="String">Generates a recipe scaffold</span><span class="rubyStringDelimiter">"</span><br />
|
115
|
-
<span id="L21" class="LineNr">21 </span>    <span class="Define">def</span> <span class="Function">recipe</span>(group, name)<br />
|
116
|
-
<span id="L22" class="LineNr">22 </span>      <span class="rubyConstant">Foodie</span><span class="Operator">::</span><span class="rubyConstant">Generators</span><span class="Operator">::</span><span class="rubyConstant">Recipe</span>.start([group, name])<br />
|
117
|
-
<span id="L23" class="LineNr">23 </span>    <span class="Define">end</span><br />
|
118
|
-
<span id="L24" class="LineNr">24 </span>  <span class="Define">end</span><br />
|
119
|
-
<span id="L25" class="LineNr">25 </span><span class="Define">end</span><br />
|
120
|
-
</div>
|
121
|
-
</body>
|
122
|
-
</html>
|
123
|
-
<!-- vim: set foldmethod=manual : -->
|
Binary file
|
@@ -1,124 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
-
<head>
|
5
|
-
<title>~/Dropbox/spikes/code_exporter_original/spec/fixtures/sub_dir/demo3.xxx.rb.xhtml</title>
|
6
|
-
<meta name="Generator" content="Vim/7.4" />
|
7
|
-
<meta name="plugin-version" content="vim7.4_v1" />
|
8
|
-
<meta name="syntax" content="ruby" />
|
9
|
-
<meta name="settings" content="no_progress,number_lines,dynamic_folds,no_pre,use_xhtml,use_css,expand_tabs,line_ids,prevent_copy=" />
|
10
|
-
<meta name="colorscheme" content="Tomorrow-Night" />
|
11
|
-
<style type="text/css">
|
12
|
-
|
13
|
-
body { color: #bcbcbc; background-color: #262626; font-family: monospace; }
|
14
|
-
* { font-size: 1em; }
|
15
|
-
.Operator { color: #87afaf; }
|
16
|
-
.rubySymbol { color: #afaf5f; }
|
17
|
-
.rubyConstant { color: #ffd787; }
|
18
|
-
.rubyInclude { color: #87afaf; }
|
19
|
-
.rubyStringDelimiter { color: #afaf5f; }
|
20
|
-
.Function { color: #87afaf; }
|
21
|
-
.Define { color: #af87af; }
|
22
|
-
.FoldColumn { color: #00ffff; background-color: #262626; padding-bottom: 1px; }
|
23
|
-
.rubyInterpolationDelimiter { color: #d7875f; }
|
24
|
-
.Comment { color: #8a8a8a; }
|
25
|
-
.LineNr { color: #4e4e4e; }
|
26
|
-
.String { color: #afaf5f; }
|
27
|
-
.Constant { color: #d7875f; }
|
28
|
-
.FoldColumn { text-decoration: none; white-space: pre; }
|
29
|
-
.open-fold .Folded { display: none; }
|
30
|
-
.open-fold .fulltext { display: inline; }
|
31
|
-
.open-fold .toggle-open { display: none; }
|
32
|
-
.closed-fold .toggle-closed { display: inline; }
|
33
|
-
|
34
|
-
.closed-fold .fulltext { display: none; }
|
35
|
-
.closed-fold .Folded { display: inline; }
|
36
|
-
.closed-fold .toggle-open { display: inline; }
|
37
|
-
.closed-fold .toggle-closed { display: none; }
|
38
|
-
|
39
|
-
</style>
|
40
|
-
|
41
|
-
<script type='text/javascript'>
|
42
|
-
//<![CDATA[
|
43
|
-
|
44
|
-
function toggleFold(objID)
|
45
|
-
{
|
46
|
-
var fold;
|
47
|
-
fold = document.getElementById(objID);
|
48
|
-
if(fold.className == 'closed-fold')
|
49
|
-
{
|
50
|
-
fold.className = 'open-fold';
|
51
|
-
}
|
52
|
-
else if (fold.className == 'open-fold')
|
53
|
-
{
|
54
|
-
fold.className = 'closed-fold';
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
/* function to open any folds containing a jumped-to line before jumping to it */
|
59
|
-
function JumpToLine()
|
60
|
-
{
|
61
|
-
var lineNum;
|
62
|
-
lineNum = window.location.hash;
|
63
|
-
lineNum = lineNum.substr(1); /* strip off '#' */
|
64
|
-
|
65
|
-
if (lineNum.indexOf('L') == -1) {
|
66
|
-
lineNum = 'L'+lineNum;
|
67
|
-
}
|
68
|
-
lineElem = document.getElementById(lineNum);
|
69
|
-
|
70
|
-
/* navigate upwards in the DOM tree to open all folds containing the line */
|
71
|
-
var node = lineElem;
|
72
|
-
while (node && node.id != 'vimCodeElement')
|
73
|
-
{
|
74
|
-
if (node.className == 'closed-fold')
|
75
|
-
{
|
76
|
-
node.className = 'open-fold';
|
77
|
-
}
|
78
|
-
node = node.parentNode;
|
79
|
-
}
|
80
|
-
/* Always jump to new location even if the line was hidden inside a fold, or
|
81
|
-
* we corrected the raw number to a line ID.
|
82
|
-
*/
|
83
|
-
if (lineElem) {
|
84
|
-
lineElem.scrollIntoView(true);
|
85
|
-
}
|
86
|
-
return true;
|
87
|
-
}
|
88
|
-
if ('onhashchange' in window) {
|
89
|
-
window.onhashchange = JumpToLine;
|
90
|
-
}
|
91
|
-
|
92
|
-
//]]>
|
93
|
-
</script>
|
94
|
-
</head>
|
95
|
-
<body onload='JumpToLine();'>
|
96
|
-
<div id='vimCodeElement'>
|
97
|
-
<span id="L1" class="LineNr"> 1 </span><span class="Comment"># file: spec/fixtures/sub-dir/demo3.xxx.rb</span><br />
|
98
|
-
<span id="L2" class="LineNr"> 2 </span><span class="Comment"># from: <a href="https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/generators/recipe.rb">https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie/generators/recipe.rb</a></span><br />
|
99
|
-
<span id="L3" class="LineNr"> 3 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">thor/group</span><span class="rubyStringDelimiter">'</span><br />
|
100
|
-
<span id="L4" class="LineNr"> 4 </span><span class="Define">module</span> <span class="rubyConstant">Foodie</span><br />
|
101
|
-
<span id="L5" class="LineNr"> 5 </span>  <span class="Define">module</span> <span class="rubyConstant">Generators</span><br />
|
102
|
-
<span id="L6" class="LineNr"> 6 </span>    <span class="Define">class</span> <span class="rubyConstant">Recipe</span> < <span class="rubyConstant">Thor</span><span class="Operator">::</span><span class="rubyConstant">Group</span><br />
|
103
|
-
<span id="L7" class="LineNr"> 7 </span>      argument <span class="rubySymbol">:group</span>, <span class="rubySymbol">:type</span> => <span class="rubySymbol">:string</span><br />
|
104
|
-
<span id="L8" class="LineNr"> 8 </span>      argument <span class="rubySymbol">:name</span>, <span class="rubySymbol">:type</span> => <span class="rubySymbol">:string</span><br />
|
105
|
-
<span id="L9" class="LineNr"> 9 </span>      <span class="rubyInclude">include</span> <span class="rubyConstant">Thor</span><span class="Operator">::</span><span class="rubyConstant">Actions</span><br />
|
106
|
-
<span id="L10" class="LineNr">10 </span><br />
|
107
|
-
<span id="L11" class="LineNr">11 </span>      <span class="Define">def</span> <span class="Constant">self</span>.<span class="Function">source_root</span><br />
|
108
|
-
<span id="L12" class="LineNr">12 </span>        <span class="rubyConstant">File</span>.dirname(<span class="Constant">__FILE__</span>) <span class="Operator">+</span> <span class="rubyStringDelimiter">"</span><span class="String">/recipe</span><span class="rubyStringDelimiter">"</span><br />
|
109
|
-
<span id="L13" class="LineNr">13 </span>      <span class="Define">end</span><br />
|
110
|
-
<span id="L14" class="LineNr">14 </span><br />
|
111
|
-
<span id="L15" class="LineNr">15 </span>      <span class="Define">def</span> <span class="Function">create_group</span><br />
|
112
|
-
<span id="L16" class="LineNr">16 </span>        empty_directory(group)<br />
|
113
|
-
<span id="L17" class="LineNr">17 </span>      <span class="Define">end</span><br />
|
114
|
-
<span id="L18" class="LineNr">18 </span><br />
|
115
|
-
<span id="L19" class="LineNr">19 </span>      <span class="Define">def</span> <span class="Function">copy_recipe</span><br />
|
116
|
-
<span id="L20" class="LineNr">20 </span>        template(<span class="rubyStringDelimiter">"</span><span class="String">recipe.txt</span><span class="rubyStringDelimiter">"</span>, <span class="rubyStringDelimiter">"</span><span class="rubyInterpolationDelimiter">#{</span>group<span class="rubyInterpolationDelimiter">}</span><span class="String">/</span><span class="rubyInterpolationDelimiter">#{</span>name<span class="rubyInterpolationDelimiter">}</span><span class="String">.txt</span><span class="rubyStringDelimiter">"</span>)<br />
|
117
|
-
<span id="L21" class="LineNr">21 </span>      <span class="Define">end</span><br />
|
118
|
-
<span id="L22" class="LineNr">22 </span>    <span class="Define">end</span><br />
|
119
|
-
<span id="L23" class="LineNr">23 </span>  <span class="Define">end</span><br />
|
120
|
-
<span id="L24" class="LineNr">24 </span>en<br />
|
121
|
-
</div>
|
122
|
-
</body>
|
123
|
-
</html>
|
124
|
-
<!-- vim: set foldmethod=manual : -->
|
Binary file
|
@@ -1,101 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
-
<head>
|
5
|
-
<title>~/Dropbox/spikes/code_exporter_original/spec/fixtures/sub_dir/demo4.xxx.rb.xhtml</title>
|
6
|
-
<meta name="Generator" content="Vim/7.4" />
|
7
|
-
<meta name="plugin-version" content="vim7.4_v1" />
|
8
|
-
<meta name="syntax" content="ruby" />
|
9
|
-
<meta name="settings" content="no_progress,number_lines,dynamic_folds,no_pre,use_xhtml,use_css,expand_tabs,line_ids,prevent_copy=" />
|
10
|
-
<meta name="colorscheme" content="Tomorrow-Night" />
|
11
|
-
<style type="text/css">
|
12
|
-
|
13
|
-
body { color: #bcbcbc; background-color: #262626; font-family: monospace; }
|
14
|
-
* { font-size: 1em; }
|
15
|
-
.Define { color: #af87af; }
|
16
|
-
.rubyConstant { color: #ffd787; }
|
17
|
-
.rubyInclude { color: #87afaf; }
|
18
|
-
.rubyStringDelimiter { color: #afaf5f; }
|
19
|
-
.Comment { color: #8a8a8a; }
|
20
|
-
.LineNr { color: #4e4e4e; }
|
21
|
-
.FoldColumn { color: #00ffff; background-color: #262626; padding-bottom: 1px; }
|
22
|
-
.String { color: #afaf5f; }
|
23
|
-
.FoldColumn { text-decoration: none; white-space: pre; }
|
24
|
-
.open-fold .Folded { display: none; }
|
25
|
-
.open-fold .fulltext { display: inline; }
|
26
|
-
.open-fold .toggle-open { display: none; }
|
27
|
-
.closed-fold .toggle-closed { display: inline; }
|
28
|
-
|
29
|
-
.closed-fold .fulltext { display: none; }
|
30
|
-
.closed-fold .Folded { display: inline; }
|
31
|
-
.closed-fold .toggle-open { display: inline; }
|
32
|
-
.closed-fold .toggle-closed { display: none; }
|
33
|
-
|
34
|
-
</style>
|
35
|
-
|
36
|
-
<script type='text/javascript'>
|
37
|
-
//<![CDATA[
|
38
|
-
|
39
|
-
function toggleFold(objID)
|
40
|
-
{
|
41
|
-
var fold;
|
42
|
-
fold = document.getElementById(objID);
|
43
|
-
if(fold.className == 'closed-fold')
|
44
|
-
{
|
45
|
-
fold.className = 'open-fold';
|
46
|
-
}
|
47
|
-
else if (fold.className == 'open-fold')
|
48
|
-
{
|
49
|
-
fold.className = 'closed-fold';
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
/* function to open any folds containing a jumped-to line before jumping to it */
|
54
|
-
function JumpToLine()
|
55
|
-
{
|
56
|
-
var lineNum;
|
57
|
-
lineNum = window.location.hash;
|
58
|
-
lineNum = lineNum.substr(1); /* strip off '#' */
|
59
|
-
|
60
|
-
if (lineNum.indexOf('L') == -1) {
|
61
|
-
lineNum = 'L'+lineNum;
|
62
|
-
}
|
63
|
-
lineElem = document.getElementById(lineNum);
|
64
|
-
|
65
|
-
/* navigate upwards in the DOM tree to open all folds containing the line */
|
66
|
-
var node = lineElem;
|
67
|
-
while (node && node.id != 'vimCodeElement')
|
68
|
-
{
|
69
|
-
if (node.className == 'closed-fold')
|
70
|
-
{
|
71
|
-
node.className = 'open-fold';
|
72
|
-
}
|
73
|
-
node = node.parentNode;
|
74
|
-
}
|
75
|
-
/* Always jump to new location even if the line was hidden inside a fold, or
|
76
|
-
* we corrected the raw number to a line ID.
|
77
|
-
*/
|
78
|
-
if (lineElem) {
|
79
|
-
lineElem.scrollIntoView(true);
|
80
|
-
}
|
81
|
-
return true;
|
82
|
-
}
|
83
|
-
if ('onhashchange' in window) {
|
84
|
-
window.onhashchange = JumpToLine;
|
85
|
-
}
|
86
|
-
|
87
|
-
//]]>
|
88
|
-
</script>
|
89
|
-
</head>
|
90
|
-
<body onload='JumpToLine();'>
|
91
|
-
<div id='vimCodeElement'>
|
92
|
-
<span id="L1" class="LineNr">1 </span><span class="Comment"># file: spec/fixtures/sub-dir/demo3.xxx.rb</span><br />
|
93
|
-
<span id="L2" class="LineNr">2 </span><span class="Comment"># from: <a href="https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie.rb">https://github.com/radar/guides/blob/master/gem-development/foodie/lib/foodie.rb</a></span><br />
|
94
|
-
<span id="L3" class="LineNr">3 </span><span class="rubyInclude">require</span> <span class="rubyStringDelimiter">'</span><span class="String">foodie/food</span><span class="rubyStringDelimiter">'</span><br />
|
95
|
-
<span id="L4" class="LineNr">4 </span><span class="Define">module</span> <span class="rubyConstant">Foodie</span><br />
|
96
|
-
<span id="L5" class="LineNr">5 </span>  <span class="Comment"># Your code goes here...</span><br />
|
97
|
-
<span id="L6" class="LineNr">6 </span><span class="Define">end</span><br />
|
98
|
-
</div>
|
99
|
-
</body>
|
100
|
-
</html>
|
101
|
-
<!-- vim: set foldmethod=manual : -->
|
Binary file
|