hammer_builder 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +1 -112
  2. data/lib/hammer_builder.rb +7 -0
  3. metadata +161 -54
data/README.md CHANGED
@@ -1,114 +1,3 @@
1
1
  # HammerBuilder
2
2
 
3
- Fast Ruby xhtml5 renderer
4
-
5
- ## Links
6
-
7
- * **Presentation**: <http://hammer.pitr.ch/hammer_builder/presentation/presentation.html>
8
- * Github: <https://github.com/ruby-hammer/hammer-builder>
9
- * Yardoc: <http://rubydoc.info/gems/hammer_builder/frames>
10
- * Issues: <https://github.com/ruby-hammer/hammer-builder/issues>
11
- * Blog: <http://hammer.pitr.ch/>
12
-
13
- ## Syntax
14
-
15
- HammerBuilder::Formated.new.go_in do
16
- xhtml5!
17
- html do
18
- head { title 'a title' }
19
- body do
20
- div.menu!.left do
21
- ul do
22
- li 'home'
23
- li 'contacts', :class => 'active'
24
- end
25
- end
26
- div.content! do
27
- article.id 'article1' do
28
- h1 'header'
29
- p('some text').class('centered')
30
- div(:class => 'like').class('hide').with do
31
- text 'like on '
32
- strong 'Facebook'
33
- end
34
- end
35
- end
36
- end
37
- end
38
- end.to_xhtml!
39
-
40
- #=>
41
- #<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html>
42
- #<html xmlns="http://www.w3.org/1999/xhtml">
43
- # <head>
44
- # <title>a title</title>
45
- # </head>
46
- # <body>
47
- # <div id="menu" class="left">
48
- # <ul>
49
- # <li>home</li>
50
- # <li class="active">contacts</li>
51
- # </ul>
52
- # </div>
53
- # <div id="content">
54
- # <article id="article1">
55
- # <h1>header</h1>
56
- # <p class="centered">some text</p>
57
- # <div class="like hide">like on
58
- # <strong>Facebook</strong>
59
- # </div>
60
- # </article>
61
- # </div>
62
- # </body>
63
- #</html>
64
-
65
-
66
- ## Benchmark
67
-
68
- ### Synthetic
69
-
70
- user system total real
71
- tenjin-reuse 2.040000 0.000000 2.040000 ( 2.055140)
72
- HammerBuilder::Standard 2.520000 0.000000 2.520000 ( 2.519284)
73
- fasterubis-reuse 2.580000 0.000000 2.580000 ( 2.581407)
74
- erubis-reuse 2.680000 0.000000 2.680000 ( 2.690176)
75
- HammerBuilder::Formatted 2.780000 0.000000 2.780000 ( 2.794307)
76
- erubis 5.180000 0.000000 5.180000 ( 5.183333)
77
- fasterubis 5.210000 0.000000 5.210000 ( 5.219176)
78
- tenjin 7.650000 0.160000 7.810000 ( 7.820490)
79
- erector 9.450000 0.010000 9.460000 ( 9.471654)
80
- markaby 14.300000 0.000000 14.300000 ( 14.318844)
81
- tagz 33.430000 0.000000 33.430000 ( 33.483693)
82
-
83
- ### In Rails 3
84
-
85
- BenchTest#test_erubis_partials (3.34 sec warmup)
86
- wall_time: 3.56 sec
87
- memory: 0.00 KB
88
- objects: 0
89
- gc_runs: 15
90
- gc_time: 0.53 ms
91
- BenchTest#test_erubis_single (552 ms warmup)
92
- wall_time: 544 ms
93
- memory: 0.00 KB
94
- objects: 0
95
- gc_runs: 4
96
- gc_time: 0.12 ms
97
- BenchTest#test_hammer_builder (2.33 sec warmup)
98
- wall_time: 847 ms
99
- memory: 0.00 KB
100
- objects: 0
101
- gc_runs: 5
102
- gc_time: 0.17 ms
103
- BenchTest#test_tenjin_partial (942 ms warmup)
104
- wall_time: 1.21 sec
105
- memory: 0.00 KB
106
- objects: 0
107
- gc_runs: 7
108
- gc_time: 0.25 ms
109
- BenchTest#test_tenjin_single (531 ms warmup)
110
- wall_time: 532 ms
111
- memory: 0.00 KB
112
- objects: 0
113
- gc_runs: 6
114
- gc_time: 0.20 ms
3
+ This gem was renamed to **htmless** please visit <http://blog.pitr.ch/htmless/>
@@ -1,6 +1,13 @@
1
1
  path = File.expand_path(File.dirname(__FILE__))
2
2
  $: << path unless $:.include? path
3
3
 
4
+ warn <<-MESSAGE
5
+ Gem hammer_builder was renamed to htmless.
6
+
7
+ This version is here just for transition. This gem won't
8
+ be developed further. Please see https://github.com/pitr-ch/htmless.
9
+ MESSAGE
10
+
4
11
  require "hammer_builder/formatted"
5
12
 
6
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2013-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70325295710140 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70325295710140
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: i18n
27
- requirement: &70325295709600 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70325295709600
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70325295725120 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70325295725120
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: yard
49
- requirement: &70325295724600 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70325295724600
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: bluecloth
60
- requirement: &70325295723920 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70325295723920
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: jeweler
71
- requirement: &70325295722980 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: '0'
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *70325295722980
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: ruby-prof
82
- requirement: &70325295721820 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: '0'
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *70325295721820
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: perftools.rb
93
- requirement: &70325295721320 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,10 +133,15 @@ dependencies:
98
133
  version: '0'
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *70325295721320
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
102
142
  - !ruby/object:Gem::Dependency
103
143
  name: nokogiri
104
- requirement: &70325295720720 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
105
145
  none: false
106
146
  requirements:
107
147
  - - ! '>='
@@ -109,10 +149,15 @@ dependencies:
109
149
  version: '0'
110
150
  type: :development
111
151
  prerelease: false
112
- version_requirements: *70325295720720
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
113
158
  - !ruby/object:Gem::Dependency
114
159
  name: erubis
115
- requirement: &70325295719940 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
116
161
  none: false
117
162
  requirements:
118
163
  - - ! '>='
@@ -120,10 +165,15 @@ dependencies:
120
165
  version: '0'
121
166
  type: :development
122
167
  prerelease: false
123
- version_requirements: *70325295719940
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
124
174
  - !ruby/object:Gem::Dependency
125
175
  name: tenjin
126
- requirement: &70325295719160 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
127
177
  none: false
128
178
  requirements:
129
179
  - - ! '>='
@@ -131,10 +181,15 @@ dependencies:
131
181
  version: '0'
132
182
  type: :development
133
183
  prerelease: false
134
- version_requirements: *70325295719160
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
135
190
  - !ruby/object:Gem::Dependency
136
191
  name: erector
137
- requirement: &70325295718540 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
138
193
  none: false
139
194
  requirements:
140
195
  - - ! '>='
@@ -142,10 +197,15 @@ dependencies:
142
197
  version: '0'
143
198
  type: :development
144
199
  prerelease: false
145
- version_requirements: *70325295718540
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
146
206
  - !ruby/object:Gem::Dependency
147
207
  name: markaby
148
- requirement: &70325295717760 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
149
209
  none: false
150
210
  requirements:
151
211
  - - ! '>='
@@ -153,10 +213,15 @@ dependencies:
153
213
  version: '0'
154
214
  type: :development
155
215
  prerelease: false
156
- version_requirements: *70325295717760
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
157
222
  - !ruby/object:Gem::Dependency
158
223
  name: tagz
159
- requirement: &70325295733400 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
160
225
  none: false
161
226
  requirements:
162
227
  - - ! '>='
@@ -164,10 +229,15 @@ dependencies:
164
229
  version: '0'
165
230
  type: :development
166
231
  prerelease: false
167
- version_requirements: *70325295733400
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
168
238
  - !ruby/object:Gem::Dependency
169
239
  name: simplecov
170
- requirement: &70325295732520 !ruby/object:Gem::Requirement
240
+ requirement: !ruby/object:Gem::Requirement
171
241
  none: false
172
242
  requirements:
173
243
  - - ! '>='
@@ -175,10 +245,15 @@ dependencies:
175
245
  version: '0'
176
246
  type: :development
177
247
  prerelease: false
178
- version_requirements: *70325295732520
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
179
254
  - !ruby/object:Gem::Dependency
180
255
  name: simplecov-rcov
181
- requirement: &70325295731220 !ruby/object:Gem::Requirement
256
+ requirement: !ruby/object:Gem::Requirement
182
257
  none: false
183
258
  requirements:
184
259
  - - ! '>='
@@ -186,21 +261,15 @@ dependencies:
186
261
  version: '0'
187
262
  type: :development
188
263
  prerelease: false
189
- version_requirements: *70325295731220
190
- - !ruby/object:Gem::Dependency
191
- name: therubyracer
192
- requirement: &70325295730320 !ruby/object:Gem::Requirement
264
+ version_requirements: !ruby/object:Gem::Requirement
193
265
  none: false
194
266
  requirements:
195
267
  - - ! '>='
196
268
  - !ruby/object:Gem::Version
197
269
  version: '0'
198
- type: :development
199
- prerelease: false
200
- version_requirements: *70325295730320
201
270
  - !ruby/object:Gem::Dependency
202
271
  name: activesupport
203
- requirement: &70325295729080 !ruby/object:Gem::Requirement
272
+ requirement: !ruby/object:Gem::Requirement
204
273
  none: false
205
274
  requirements:
206
275
  - - ~>
@@ -208,10 +277,15 @@ dependencies:
208
277
  version: '3.1'
209
278
  type: :runtime
210
279
  prerelease: false
211
- version_requirements: *70325295729080
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ~>
284
+ - !ruby/object:Gem::Version
285
+ version: '3.1'
212
286
  - !ruby/object:Gem::Dependency
213
287
  name: i18n
214
- requirement: &70325295728300 !ruby/object:Gem::Requirement
288
+ requirement: !ruby/object:Gem::Requirement
215
289
  none: false
216
290
  requirements:
217
291
  - - ~>
@@ -219,10 +293,15 @@ dependencies:
219
293
  version: '0.6'
220
294
  type: :runtime
221
295
  prerelease: false
222
- version_requirements: *70325295728300
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ~>
300
+ - !ruby/object:Gem::Version
301
+ version: '0.6'
223
302
  - !ruby/object:Gem::Dependency
224
303
  name: rspec
225
- requirement: &70325295727420 !ruby/object:Gem::Requirement
304
+ requirement: !ruby/object:Gem::Requirement
226
305
  none: false
227
306
  requirements:
228
307
  - - ~>
@@ -230,10 +309,15 @@ dependencies:
230
309
  version: 2.5.0
231
310
  type: :development
232
311
  prerelease: false
233
- version_requirements: *70325295727420
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ~>
316
+ - !ruby/object:Gem::Version
317
+ version: 2.5.0
234
318
  - !ruby/object:Gem::Dependency
235
319
  name: yard
236
- requirement: &70325295726820 !ruby/object:Gem::Requirement
320
+ requirement: !ruby/object:Gem::Requirement
237
321
  none: false
238
322
  requirements:
239
323
  - - ~>
@@ -241,10 +325,15 @@ dependencies:
241
325
  version: '0.6'
242
326
  type: :development
243
327
  prerelease: false
244
- version_requirements: *70325295726820
328
+ version_requirements: !ruby/object:Gem::Requirement
329
+ none: false
330
+ requirements:
331
+ - - ~>
332
+ - !ruby/object:Gem::Version
333
+ version: '0.6'
245
334
  - !ruby/object:Gem::Dependency
246
335
  name: bluecloth
247
- requirement: &70325295726020 !ruby/object:Gem::Requirement
336
+ requirement: !ruby/object:Gem::Requirement
248
337
  none: false
249
338
  requirements:
250
339
  - - ~>
@@ -252,10 +341,15 @@ dependencies:
252
341
  version: '2.0'
253
342
  type: :development
254
343
  prerelease: false
255
- version_requirements: *70325295726020
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ none: false
346
+ requirements:
347
+ - - ~>
348
+ - !ruby/object:Gem::Version
349
+ version: '2.0'
256
350
  - !ruby/object:Gem::Dependency
257
351
  name: jeweler
258
- requirement: &70325295741740 !ruby/object:Gem::Requirement
352
+ requirement: !ruby/object:Gem::Requirement
259
353
  none: false
260
354
  requirements:
261
355
  - - ~>
@@ -263,7 +357,12 @@ dependencies:
263
357
  version: '1.6'
264
358
  type: :development
265
359
  prerelease: false
266
- version_requirements: *70325295741740
360
+ version_requirements: !ruby/object:Gem::Requirement
361
+ none: false
362
+ requirements:
363
+ - - ~>
364
+ - !ruby/object:Gem::Version
365
+ version: '1.6'
267
366
  description: Fast extensible ruby html5 builder
268
367
  email: email@pitr.ch
269
368
  executables: []
@@ -294,7 +393,15 @@ files:
294
393
  homepage: https://github.com/ruby-hammer/hammer-builder
295
394
  licenses:
296
395
  - MIT
297
- post_install_message:
396
+ post_install_message: ! 'Gem Hammerwas renamed to htmless.
397
+
398
+
399
+ This version is here just for transition. It''s identical to 0.3.1 and this gem
400
+ won''t
401
+
402
+ be developed further. Please see https://github.com/pitr-ch/htmless.
403
+
404
+ '
298
405
  rdoc_options: []
299
406
  require_paths:
300
407
  - lib
@@ -313,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
420
  requirements:
314
421
  - Ruby 1.9
315
422
  rubyforge_project:
316
- rubygems_version: 1.8.10
423
+ rubygems_version: 1.8.23
317
424
  signing_key:
318
425
  specification_version: 3
319
426
  summary: Fast extensible ruby html5 builder