pug-ruby 1.0.2 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/.rubocop.yml +81 -0
  4. data/.travis.yml +17 -8
  5. data/.yardopts +4 -0
  6. data/Gemfile +3 -3
  7. data/Gemfile.lock +32 -0
  8. data/LICENSE +21 -0
  9. data/README.md +256 -24
  10. data/Rakefile +74 -8
  11. data/lib/jade-pug/base.rb +178 -0
  12. data/lib/jade-pug/compiler.rb +166 -0
  13. data/lib/jade-pug/config.rb +60 -0
  14. data/lib/jade-pug/errors/compilation-error.rb +14 -0
  15. data/lib/jade-pug/errors/compiler-error.rb +13 -0
  16. data/lib/jade-pug/shipped-compiler.rb +80 -0
  17. data/lib/jade-pug/system-compiler.rb +139 -0
  18. data/lib/jade-ruby/compilation-essentials.rb +24 -0
  19. data/lib/jade-ruby/config.rb +17 -44
  20. data/lib/jade-ruby/errors/compilation-error.rb +14 -0
  21. data/lib/jade-ruby/errors/compiler-error.rb +13 -0
  22. data/lib/jade-ruby/shipped-compiler.rb +15 -0
  23. data/lib/jade-ruby/system-compiler.rb +15 -0
  24. data/lib/pug-ruby.rb +46 -5
  25. data/lib/pug-ruby/compilation-essentials.rb +29 -0
  26. data/lib/pug-ruby/config.rb +11 -37
  27. data/lib/pug-ruby/errors/compilation-error.rb +14 -0
  28. data/lib/pug-ruby/errors/compiler-error.rb +13 -0
  29. data/lib/pug-ruby/shipped-compiler.rb +15 -0
  30. data/lib/pug-ruby/system-compiler.rb +15 -0
  31. data/lib/pug-ruby/version.rb +7 -0
  32. data/package.json +11 -0
  33. data/pug-ruby.gemspec +19 -12
  34. data/support/browserify-jade-runtime.js +19 -0
  35. data/support/browserify-jade.js +17 -0
  36. data/support/browserify-pug-runtime.js +19 -0
  37. data/support/browserify-pug.js +23 -0
  38. data/support/minify-jade.js +11 -0
  39. data/support/minify-pug.js +11 -0
  40. data/test/helper.rb +202 -0
  41. data/test/jade/includes/includes/footer.jade +1 -1
  42. data/test/manual.html +21 -0
  43. data/test/manual.rb +25 -0
  44. data/test/pug/includes/includes/footer.pug +1 -1
  45. data/test/pug/index.pug +3 -3
  46. data/test/test-jade.rb +3 -67
  47. data/test/test-pug.rb +3 -67
  48. data/vendor/jade-1.0.0.min.js +1 -0
  49. data/vendor/jade-1.0.1.min.js +1 -0
  50. data/vendor/jade-1.0.2.min.js +1 -0
  51. data/vendor/jade-1.1.0.min.js +1 -0
  52. data/vendor/jade-1.1.1.min.js +1 -0
  53. data/vendor/jade-1.1.2.min.js +1 -0
  54. data/vendor/jade-1.1.3.min.js +1 -0
  55. data/vendor/jade-1.1.4.min.js +1 -0
  56. data/vendor/jade-1.1.5.min.js +1 -0
  57. data/vendor/jade-1.10.0.min.js +1 -0
  58. data/vendor/jade-1.11.0.min.js +1 -0
  59. data/vendor/jade-1.2.0.min.js +1 -0
  60. data/vendor/jade-1.3.0.min.js +1 -0
  61. data/vendor/jade-1.3.1.min.js +1 -0
  62. data/vendor/jade-1.4.0.min.js +1 -0
  63. data/vendor/jade-1.4.1.min.js +1 -0
  64. data/vendor/jade-1.4.2.min.js +1 -0
  65. data/vendor/jade-1.5.0.min.js +1 -0
  66. data/vendor/jade-1.6.0.min.js +1 -0
  67. data/vendor/jade-1.7.0.min.js +1 -0
  68. data/vendor/jade-1.8.0.min.js +1 -0
  69. data/vendor/jade-1.8.1.min.js +1 -0
  70. data/vendor/jade-1.8.2.min.js +1 -0
  71. data/vendor/jade-1.9.0.min.js +1 -0
  72. data/vendor/jade-1.9.1.min.js +1 -0
  73. data/vendor/jade-1.9.2.min.js +1 -0
  74. data/vendor/jade-runtime-1.0.0-license +22 -0
  75. data/vendor/jade-runtime-1.0.0.js +199 -0
  76. data/vendor/jade-runtime-1.0.1-license +22 -0
  77. data/vendor/jade-runtime-1.0.1.js +199 -0
  78. data/vendor/jade-runtime-1.0.2-license +22 -0
  79. data/vendor/jade-runtime-1.0.2.js +199 -0
  80. data/vendor/jade-runtime-1.1.0-license +22 -0
  81. data/vendor/jade-runtime-1.1.0.js +199 -0
  82. data/vendor/jade-runtime-1.1.1-license +22 -0
  83. data/vendor/jade-runtime-1.1.1.js +199 -0
  84. data/vendor/jade-runtime-1.1.2-license +22 -0
  85. data/vendor/jade-runtime-1.1.2.js +200 -0
  86. data/vendor/jade-runtime-1.1.3-license +22 -0
  87. data/vendor/jade-runtime-1.1.3.js +200 -0
  88. data/vendor/jade-runtime-1.1.4-license +22 -0
  89. data/vendor/jade-runtime-1.1.4.js +200 -0
  90. data/vendor/jade-runtime-1.1.5-license +22 -0
  91. data/vendor/jade-runtime-1.1.5.js +200 -0
  92. data/vendor/jade-runtime-1.10.0-license +22 -0
  93. data/vendor/jade-runtime-1.10.0.js +233 -0
  94. data/vendor/jade-runtime-1.11.0-license +22 -0
  95. data/vendor/jade-runtime-1.11.0.js +246 -0
  96. data/vendor/jade-runtime-1.2.0-license +22 -0
  97. data/vendor/jade-runtime-1.2.0.js +200 -0
  98. data/vendor/jade-runtime-1.3.0-license +22 -0
  99. data/vendor/jade-runtime-1.3.0.js +200 -0
  100. data/vendor/jade-runtime-1.3.1-license +22 -0
  101. data/vendor/jade-runtime-1.3.1.js +200 -0
  102. data/vendor/jade-runtime-1.4.0-license +22 -0
  103. data/vendor/jade-runtime-1.4.0.js +200 -0
  104. data/vendor/jade-runtime-1.4.1-license +22 -0
  105. data/vendor/jade-runtime-1.4.1.js +200 -0
  106. data/vendor/jade-runtime-1.4.2-license +22 -0
  107. data/vendor/jade-runtime-1.4.2.js +200 -0
  108. data/vendor/jade-runtime-1.5.0-license +22 -0
  109. data/vendor/jade-runtime-1.5.0.js +200 -0
  110. data/vendor/jade-runtime-1.6.0-license +22 -0
  111. data/vendor/jade-runtime-1.6.0.js +200 -0
  112. data/vendor/jade-runtime-1.7.0-license +22 -0
  113. data/vendor/jade-runtime-1.7.0.js +200 -0
  114. data/vendor/jade-runtime-1.8.0-license +22 -0
  115. data/vendor/jade-runtime-1.8.0.js +228 -0
  116. data/vendor/jade-runtime-1.8.1-license +22 -0
  117. data/vendor/jade-runtime-1.8.1.js +228 -0
  118. data/vendor/jade-runtime-1.8.2-license +22 -0
  119. data/vendor/jade-runtime-1.8.2.js +228 -0
  120. data/vendor/jade-runtime-1.9.0-license +22 -0
  121. data/vendor/jade-runtime-1.9.0.js +228 -0
  122. data/vendor/jade-runtime-1.9.1-license +22 -0
  123. data/vendor/jade-runtime-1.9.1.js +228 -0
  124. data/vendor/jade-runtime-1.9.2-license +22 -0
  125. data/vendor/jade-runtime-1.9.2.js +228 -0
  126. data/vendor/pug-2.0.0-beta.12-license +22 -0
  127. data/vendor/pug-2.0.0-beta.12.min.js +1 -0
  128. data/vendor/pug-2.0.0-beta1-license +22 -0
  129. data/vendor/pug-2.0.0-beta1.min.js +1 -0
  130. data/vendor/pug-2.0.0-beta10-license +22 -0
  131. data/vendor/pug-2.0.0-beta10.min.js +1 -0
  132. data/vendor/pug-2.0.0-beta11-license +22 -0
  133. data/vendor/pug-2.0.0-beta11.min.js +1 -0
  134. data/vendor/pug-2.0.0-beta2-license +22 -0
  135. data/vendor/pug-2.0.0-beta2.min.js +1 -0
  136. data/vendor/pug-2.0.0-beta3-license +22 -0
  137. data/vendor/pug-2.0.0-beta3.min.js +1 -0
  138. data/vendor/pug-2.0.0-beta4-license +22 -0
  139. data/vendor/pug-2.0.0-beta4.min.js +1 -0
  140. data/vendor/pug-2.0.0-beta5-license +22 -0
  141. data/vendor/pug-2.0.0-beta5.min.js +1 -0
  142. data/vendor/pug-2.0.0-beta6-license +22 -0
  143. data/vendor/pug-2.0.0-beta6.min.js +1 -0
  144. data/vendor/pug-2.0.0-beta7-license +22 -0
  145. data/vendor/pug-2.0.0-beta7.min.js +1 -0
  146. data/vendor/pug-2.0.0-beta8-license +22 -0
  147. data/vendor/pug-2.0.0-beta8.min.js +1 -0
  148. data/vendor/pug-2.0.0-beta9-license +22 -0
  149. data/vendor/pug-2.0.0-beta9.min.js +1 -0
  150. data/vendor/pug-2.0.0-rc.1-license +22 -0
  151. data/vendor/pug-2.0.0-rc.1.min.js +1 -0
  152. data/vendor/pug-2.0.0-rc.2-license +22 -0
  153. data/vendor/pug-2.0.0-rc.2.min.js +1 -0
  154. data/vendor/pug-2.0.0-rc.3-license +22 -0
  155. data/vendor/pug-2.0.0-rc.3.min.js +1 -0
  156. data/vendor/pug-runtime-2.0.0-license +19 -0
  157. data/vendor/pug-runtime-2.0.0.js +266 -0
  158. data/vendor/pug-runtime-2.0.1-license +19 -0
  159. data/vendor/pug-runtime-2.0.1.js +266 -0
  160. data/vendor/pug-runtime-2.0.2-license +19 -0
  161. data/vendor/pug-runtime-2.0.2.js +267 -0
  162. metadata +242 -13
  163. data/lib/jade-ruby/compile.rb +0 -79
  164. data/lib/pug-ruby/compile.rb +0 -88
metadata CHANGED
@@ -1,29 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pug-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Konoplov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-06 00:00:00.000000000 Z
11
+ date: 2017-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: execjs
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
20
- type: :development
19
+ version: '2.0'
20
+ type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: memoist
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.15'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: regexp-match-polyfill
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 1.0.2
51
+ type: :runtime
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '1.0'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 1.0.2
61
+ - !ruby/object:Gem::Dependency
62
+ name: method-not-implemented
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.0.1
71
+ type: :runtime
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.0'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.0.1
27
81
  - !ruby/object:Gem::Dependency
28
82
  name: rake
29
83
  requirement: !ruby/object:Gem::Requirement
@@ -38,29 +92,87 @@ dependencies:
38
92
  - - "~>"
39
93
  - !ruby/object:Gem::Version
40
94
  version: '10.0'
41
- description: Ruby wrapper for the Pug/Jade template engine.
95
+ - !ruby/object:Gem::Dependency
96
+ name: test-unit
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: '3.1'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: '3.1'
109
+ - !ruby/object:Gem::Dependency
110
+ name: bundler
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '1.7'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '1.7'
123
+ description: Ruby wrapper for the Jade / Pug template engine.
42
124
  email: eahome00@gmail.com
43
125
  executables: []
44
126
  extensions: []
45
127
  extra_rdoc_files: []
46
128
  files:
47
129
  - ".gitignore"
130
+ - ".rubocop.yml"
48
131
  - ".travis.yml"
132
+ - ".yardopts"
49
133
  - Gemfile
134
+ - Gemfile.lock
135
+ - LICENSE
50
136
  - README.md
51
137
  - Rakefile
52
- - lib/jade-ruby/compile.rb
138
+ - lib/jade-pug/base.rb
139
+ - lib/jade-pug/compiler.rb
140
+ - lib/jade-pug/config.rb
141
+ - lib/jade-pug/errors/compilation-error.rb
142
+ - lib/jade-pug/errors/compiler-error.rb
143
+ - lib/jade-pug/shipped-compiler.rb
144
+ - lib/jade-pug/system-compiler.rb
145
+ - lib/jade-ruby/compilation-essentials.rb
53
146
  - lib/jade-ruby/config.rb
147
+ - lib/jade-ruby/errors/compilation-error.rb
148
+ - lib/jade-ruby/errors/compiler-error.rb
149
+ - lib/jade-ruby/shipped-compiler.rb
150
+ - lib/jade-ruby/system-compiler.rb
54
151
  - lib/pug-ruby.rb
55
- - lib/pug-ruby/compile.rb
152
+ - lib/pug-ruby/compilation-essentials.rb
56
153
  - lib/pug-ruby/config.rb
154
+ - lib/pug-ruby/errors/compilation-error.rb
155
+ - lib/pug-ruby/errors/compiler-error.rb
156
+ - lib/pug-ruby/shipped-compiler.rb
157
+ - lib/pug-ruby/system-compiler.rb
158
+ - lib/pug-ruby/version.rb
159
+ - package.json
57
160
  - pug-ruby.gemspec
161
+ - support/browserify-jade-runtime.js
162
+ - support/browserify-jade.js
163
+ - support/browserify-pug-runtime.js
164
+ - support/browserify-pug.js
165
+ - support/minify-jade.js
166
+ - support/minify-pug.js
167
+ - test/helper.rb
58
168
  - test/jade/extends/index.jade
59
169
  - test/jade/extends/layout.jade
60
170
  - test/jade/includes/includes/footer.jade
61
171
  - test/jade/includes/includes/header.jade
62
172
  - test/jade/includes/index.jade
63
173
  - test/jade/index.jade
174
+ - test/manual.html
175
+ - test/manual.rb
64
176
  - test/pug/extends/index.pug
65
177
  - test/pug/extends/layout.pug
66
178
  - test/pug/includes/includes/footer.pug
@@ -69,6 +181,120 @@ files:
69
181
  - test/pug/index.pug
70
182
  - test/test-jade.rb
71
183
  - test/test-pug.rb
184
+ - vendor/jade-1.0.0.min.js
185
+ - vendor/jade-1.0.1.min.js
186
+ - vendor/jade-1.0.2.min.js
187
+ - vendor/jade-1.1.0.min.js
188
+ - vendor/jade-1.1.1.min.js
189
+ - vendor/jade-1.1.2.min.js
190
+ - vendor/jade-1.1.3.min.js
191
+ - vendor/jade-1.1.4.min.js
192
+ - vendor/jade-1.1.5.min.js
193
+ - vendor/jade-1.10.0.min.js
194
+ - vendor/jade-1.11.0.min.js
195
+ - vendor/jade-1.2.0.min.js
196
+ - vendor/jade-1.3.0.min.js
197
+ - vendor/jade-1.3.1.min.js
198
+ - vendor/jade-1.4.0.min.js
199
+ - vendor/jade-1.4.1.min.js
200
+ - vendor/jade-1.4.2.min.js
201
+ - vendor/jade-1.5.0.min.js
202
+ - vendor/jade-1.6.0.min.js
203
+ - vendor/jade-1.7.0.min.js
204
+ - vendor/jade-1.8.0.min.js
205
+ - vendor/jade-1.8.1.min.js
206
+ - vendor/jade-1.8.2.min.js
207
+ - vendor/jade-1.9.0.min.js
208
+ - vendor/jade-1.9.1.min.js
209
+ - vendor/jade-1.9.2.min.js
210
+ - vendor/jade-runtime-1.0.0-license
211
+ - vendor/jade-runtime-1.0.0.js
212
+ - vendor/jade-runtime-1.0.1-license
213
+ - vendor/jade-runtime-1.0.1.js
214
+ - vendor/jade-runtime-1.0.2-license
215
+ - vendor/jade-runtime-1.0.2.js
216
+ - vendor/jade-runtime-1.1.0-license
217
+ - vendor/jade-runtime-1.1.0.js
218
+ - vendor/jade-runtime-1.1.1-license
219
+ - vendor/jade-runtime-1.1.1.js
220
+ - vendor/jade-runtime-1.1.2-license
221
+ - vendor/jade-runtime-1.1.2.js
222
+ - vendor/jade-runtime-1.1.3-license
223
+ - vendor/jade-runtime-1.1.3.js
224
+ - vendor/jade-runtime-1.1.4-license
225
+ - vendor/jade-runtime-1.1.4.js
226
+ - vendor/jade-runtime-1.1.5-license
227
+ - vendor/jade-runtime-1.1.5.js
228
+ - vendor/jade-runtime-1.10.0-license
229
+ - vendor/jade-runtime-1.10.0.js
230
+ - vendor/jade-runtime-1.11.0-license
231
+ - vendor/jade-runtime-1.11.0.js
232
+ - vendor/jade-runtime-1.2.0-license
233
+ - vendor/jade-runtime-1.2.0.js
234
+ - vendor/jade-runtime-1.3.0-license
235
+ - vendor/jade-runtime-1.3.0.js
236
+ - vendor/jade-runtime-1.3.1-license
237
+ - vendor/jade-runtime-1.3.1.js
238
+ - vendor/jade-runtime-1.4.0-license
239
+ - vendor/jade-runtime-1.4.0.js
240
+ - vendor/jade-runtime-1.4.1-license
241
+ - vendor/jade-runtime-1.4.1.js
242
+ - vendor/jade-runtime-1.4.2-license
243
+ - vendor/jade-runtime-1.4.2.js
244
+ - vendor/jade-runtime-1.5.0-license
245
+ - vendor/jade-runtime-1.5.0.js
246
+ - vendor/jade-runtime-1.6.0-license
247
+ - vendor/jade-runtime-1.6.0.js
248
+ - vendor/jade-runtime-1.7.0-license
249
+ - vendor/jade-runtime-1.7.0.js
250
+ - vendor/jade-runtime-1.8.0-license
251
+ - vendor/jade-runtime-1.8.0.js
252
+ - vendor/jade-runtime-1.8.1-license
253
+ - vendor/jade-runtime-1.8.1.js
254
+ - vendor/jade-runtime-1.8.2-license
255
+ - vendor/jade-runtime-1.8.2.js
256
+ - vendor/jade-runtime-1.9.0-license
257
+ - vendor/jade-runtime-1.9.0.js
258
+ - vendor/jade-runtime-1.9.1-license
259
+ - vendor/jade-runtime-1.9.1.js
260
+ - vendor/jade-runtime-1.9.2-license
261
+ - vendor/jade-runtime-1.9.2.js
262
+ - vendor/pug-2.0.0-beta.12-license
263
+ - vendor/pug-2.0.0-beta.12.min.js
264
+ - vendor/pug-2.0.0-beta1-license
265
+ - vendor/pug-2.0.0-beta1.min.js
266
+ - vendor/pug-2.0.0-beta10-license
267
+ - vendor/pug-2.0.0-beta10.min.js
268
+ - vendor/pug-2.0.0-beta11-license
269
+ - vendor/pug-2.0.0-beta11.min.js
270
+ - vendor/pug-2.0.0-beta2-license
271
+ - vendor/pug-2.0.0-beta2.min.js
272
+ - vendor/pug-2.0.0-beta3-license
273
+ - vendor/pug-2.0.0-beta3.min.js
274
+ - vendor/pug-2.0.0-beta4-license
275
+ - vendor/pug-2.0.0-beta4.min.js
276
+ - vendor/pug-2.0.0-beta5-license
277
+ - vendor/pug-2.0.0-beta5.min.js
278
+ - vendor/pug-2.0.0-beta6-license
279
+ - vendor/pug-2.0.0-beta6.min.js
280
+ - vendor/pug-2.0.0-beta7-license
281
+ - vendor/pug-2.0.0-beta7.min.js
282
+ - vendor/pug-2.0.0-beta8-license
283
+ - vendor/pug-2.0.0-beta8.min.js
284
+ - vendor/pug-2.0.0-beta9-license
285
+ - vendor/pug-2.0.0-beta9.min.js
286
+ - vendor/pug-2.0.0-rc.1-license
287
+ - vendor/pug-2.0.0-rc.1.min.js
288
+ - vendor/pug-2.0.0-rc.2-license
289
+ - vendor/pug-2.0.0-rc.2.min.js
290
+ - vendor/pug-2.0.0-rc.3-license
291
+ - vendor/pug-2.0.0-rc.3.min.js
292
+ - vendor/pug-runtime-2.0.0-license
293
+ - vendor/pug-runtime-2.0.0.js
294
+ - vendor/pug-runtime-2.0.1-license
295
+ - vendor/pug-runtime-2.0.1.js
296
+ - vendor/pug-runtime-2.0.2-license
297
+ - vendor/pug-runtime-2.0.2.js
72
298
  homepage: https://github.com/yivo/pug-ruby
73
299
  licenses:
74
300
  - MIT
@@ -84,22 +310,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
310
  version: '0'
85
311
  required_rubygems_version: !ruby/object:Gem::Requirement
86
312
  requirements:
87
- - - ">="
313
+ - - ">"
88
314
  - !ruby/object:Gem::Version
89
- version: '0'
315
+ version: 1.3.1
90
316
  requirements: []
91
317
  rubyforge_project:
92
- rubygems_version: 2.5.1
318
+ rubygems_version: 2.6.12
93
319
  signing_key:
94
320
  specification_version: 4
95
- summary: Ruby wrapper for the Pug/Jade template engine.
321
+ summary: Ruby wrapper for the Jade / Pug template engine.
96
322
  test_files:
323
+ - test/helper.rb
97
324
  - test/jade/extends/index.jade
98
325
  - test/jade/extends/layout.jade
99
326
  - test/jade/includes/includes/footer.jade
100
327
  - test/jade/includes/includes/header.jade
101
328
  - test/jade/includes/index.jade
102
329
  - test/jade/index.jade
330
+ - test/manual.html
331
+ - test/manual.rb
103
332
  - test/pug/extends/index.pug
104
333
  - test/pug/extends/layout.pug
105
334
  - test/pug/includes/includes/footer.pug
@@ -1,79 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: true
3
-
4
- require 'open3'
5
- require 'json'
6
- require 'shellwords'
7
-
8
- module Jade
9
- class << self
10
- def compile(source, options = {})
11
- check_executable!
12
-
13
- source = source.read if source.respond_to?(:read)
14
- options = config.to_hash.merge(options)
15
-
16
- # http://web.archive.org/web/*/http://jade-lang.com/command-line/
17
- cmd = ['jade']
18
-
19
- options[:compileDebug] = options[:compile_debug]
20
- options[:nameAfterFile] = options[:name_after_file]
21
-
22
- options.respond_to?(:compact) ? options.compact : options.delete_if { |k, v| v.nil? }
23
-
24
- # Command line arguments take precedence over json options
25
- # https://github.com/jadejs/jade/blob/master/bin/jade.js
26
- cmd.push('--obj', JSON.generate(options))
27
-
28
- cmd.push('--out', escape(options[:out])) if options[:out]
29
- cmd.push('--path', escape(options[:filename])) if options[:filename]
30
- cmd.push('--basedir', escape(options[:basedir])) if options[:basedir]
31
- cmd.push('--pretty') if options[:pretty]
32
- cmd.push('--client') if options[:client]
33
- cmd.push('--name', escape(options[:name])) if options[:name]
34
- cmd.push('--no-debug') unless options[:compile_debug]
35
- cmd.push('--extension', escape(options[:extension])) if options[:extension]
36
- cmd.push('--hierarchy', escape(options[:hierarchy])) if options[:hierarchy]
37
- cmd.push('--name-after-file', escape(options[:name_after_file])) if options[:name_after_file]
38
- cmd.push('--doctype', escape(options[:doctype])) if options[:doctype]
39
-
40
- stdout, stderr, exit_status = Open3.capture3(*cmd, stdin_data: source)
41
- raise CompileError, stderr unless exit_status.success?
42
-
43
- if options[:client]
44
- %{ (function(jade) { #{stdout}; return #{options[:name]}; }).call(this, jade); }
45
- else
46
- stdout
47
- end
48
- end
49
-
50
- def version
51
- @version ||= begin
52
- version = `jade --version`
53
- version if $?.success?
54
- end
55
- end
56
-
57
- def check_executable!
58
- unless @executable_checked
59
- if version
60
- puts "jade version: #{version}"
61
- else
62
- raise ExecutableError, 'No jade executable found in your system. Did you forget to "npm install -g jade"?'
63
- end
64
- @executable_checked = true
65
- end
66
- end
67
-
68
- protected
69
- def escape(string)
70
- string.shellescape
71
- end
72
- end
73
-
74
- class CompileError < StandardError
75
- end
76
-
77
- class ExecutableError < StandardError
78
- end
79
- end
@@ -1,88 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: true
3
-
4
- require 'open3'
5
- require 'json'
6
- require 'shellwords'
7
-
8
- module Pug
9
- class << self
10
- def compile(source, options = {})
11
- check_executable!
12
-
13
- source = source.read if source.respond_to?(:read)
14
- options = config.to_hash.merge(options)
15
-
16
- # https://github.com/pugjs/pug-cli
17
- cmd = ['pug']
18
-
19
- options[:compileDebug] = options[:compile_debug]
20
- options[:nameAfterFile] = options[:name_after_file]
21
- options[:inlineRuntimeFunctions] = options[:inline_runtime_functions]
22
-
23
- options.respond_to?(:compact) ? options.compact : options.delete_if { |k, v| v.nil? }
24
-
25
- # Command line arguments take precedence over json options
26
- # https://github.com/pugjs/pug-cli/blob/master/index.js
27
- cmd.push('--obj', JSON.generate(options))
28
-
29
- cmd.push('--out', escape(options[:out])) if options[:out]
30
- cmd.push('--path', escape(options[:filename])) if options[:filename]
31
- cmd.push('--basedir', escape(options[:basedir])) if options[:basedir]
32
- cmd.push('--pretty') if options[:pretty]
33
- cmd.push('--client') if options[:client]
34
- cmd.push('--name', escape(options[:name])) if options[:name]
35
- cmd.push('--no-debug') unless options[:compile_debug]
36
- cmd.push('--extension', escape(options[:extension])) if options[:extension]
37
- cmd.push('--silent') if options[:silent]
38
- cmd.push('--name-after-file', escape(options[:name_after_file])) if options[:name_after_file]
39
- cmd.push('--doctype', escape(options[:doctype])) if options[:doctype]
40
-
41
- stdout, stderr, exit_status = Open3.capture3(*cmd, stdin_data: source)
42
-
43
- raise CompileError, stderr unless exit_status.success?
44
-
45
- if options[:client]
46
- if options[:inline_runtime_functions]
47
- %{ (function() { #{stdout}; return #{options[:name]}; }).call(this); }
48
- else
49
- %{ (function(pug) { #{stdout}; return #{options[:name]}; }).call(this, pug); }
50
- end
51
- else
52
- stdout
53
- end
54
- end
55
-
56
- def version
57
- @version ||= begin
58
- output = `pug --version`
59
- if $?.success?
60
- output.split(/\n\r?/)[0].to_s['pug version: '.size..-1]
61
- end
62
- end
63
- end
64
-
65
- def check_executable!
66
- unless @executable_checked
67
- if version
68
- puts "pug version: #{version}"
69
- else
70
- raise ExecutableError, 'No pug executable found in your system. Did you forget to "npm install -g pug-cli"?'
71
- end
72
- @executable_checked = true
73
- end
74
- end
75
-
76
- protected
77
- def escape(string)
78
- string.shellescape
79
- end
80
- end
81
-
82
- class CompileError < StandardError
83
- end
84
-
85
- class ExecutableError < StandardError
86
- end
87
- end
88
-