Skip to content

Commit 8e5c897

Browse files
committed
rename hammer_builder to htmless
rename updating surrounding tools updating doc remove dependency on ActiveSupport
1 parent 6794880 commit 8e5c897

File tree

146 files changed

+948
-3272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+948
-3272
lines changed

.gitignore

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
nbproject
2-
.rake_tasks~
3-
pkg
41
.yardoc
52
yardoc
63
.idea
74
.project
8-
bin
5+
.bin
6+
.bundle
7+
.ruby-version
8+
*.gem
99
coverage
10+
playground
11+
presentation

.yardopts

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
--protected
22
--private
33
--verbose
4-
--main=README.md
4+
--main=README_FULL.md
55
--output-dir=./yardoc/
6-
--title=HammerBuilder
7-
./lib/**/*.rb -
8-
LICENSE
6+
--markup markdown
7+
--title=Htmless
8+
--template-path ./../yard-template
9+
--template default
10+
11+
./lib/htmless/*.rb
12+
./lib/htmless/dara/*.rb
13+
./lib/htmless.rb
14+
-
15+
MIT-LICENSE
916
README.md
10-
CHANGELOG.md

Gemfile

+2-21
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
source 'http://rubygems.org'
1+
source 'https://rubygems.org'
22

3-
gem 'activesupport', '~> 3.1'
4-
gem 'i18n'
5-
6-
group :development do
7-
gem "rspec"
8-
gem "yard"
9-
gem "bluecloth"
10-
gem "jeweler"
11-
gem "ruby-prof"
12-
gem "perftools.rb"
13-
gem "nokogiri"
14-
gem "erubis"
15-
gem "tenjin"
16-
gem "erector"
17-
gem "markaby"
18-
gem "tagz"
19-
gem "simplecov", :require => false
20-
gem "simplecov-rcov", :require => false
21-
gem "therubyracer"
22-
end
3+
gemspec

Gemfile.lock

+38-32
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
1+
PATH
2+
remote: .
3+
specs:
4+
htmless (0.4)
5+
16
GEM
2-
remote: http://rubygems.org/
7+
remote: https://rubygems.org/
38
specs:
4-
activesupport (3.1.3)
5-
multi_json (~> 1.0)
6-
bluecloth (2.2.0)
7-
builder (3.0.0)
9+
builder (3.0.4)
10+
coderay (1.0.9)
811
diff-lcs (1.1.3)
912
erector (0.8.3)
1013
rake
1114
rake
1215
treetop
1316
treetop (>= 1.2.3)
1417
erubis (2.7.0)
15-
git (1.2.5)
16-
i18n (0.6.0)
17-
jeweler (1.6.4)
18-
bundler (~> 1.0)
19-
git (>= 1.2.5)
20-
rake
21-
libv8 (3.3.10.4)
18+
ffi (1.8.1-java)
19+
kramdown (1.0.1)
2220
markaby (0.7.2)
2321
builder (>= 2.0.0)
24-
multi_json (1.0.4)
25-
nokogiri (1.5.0)
26-
perftools.rb (0.5.6)
22+
method_source (0.8.1)
23+
multi_json (1.7.2)
24+
nokogiri (1.5.9)
25+
nokogiri (1.5.9-java)
2726
polyglot (0.3.3)
28-
rake (0.9.2.2)
27+
pry (0.9.12)
28+
coderay (~> 1.0.5)
29+
method_source (~> 0.8)
30+
slop (~> 3.4)
31+
pry (0.9.12-java)
32+
coderay (~> 1.0.5)
33+
method_source (~> 0.8)
34+
slop (~> 3.4)
35+
spoon (~> 0.0)
36+
rake (10.0.4)
2937
rspec (2.8.0)
3038
rspec-core (~> 2.8.0)
3139
rspec-expectations (~> 2.8.0)
@@ -34,40 +42,38 @@ GEM
3442
rspec-expectations (2.8.0)
3543
diff-lcs (~> 1.1.2)
3644
rspec-mocks (2.8.0)
37-
ruby-prof (0.10.8)
38-
simplecov (0.5.4)
39-
multi_json (~> 1.0.3)
40-
simplecov-html (~> 0.5.3)
41-
simplecov-html (0.5.3)
45+
simplecov (0.7.1)
46+
multi_json (~> 1.0)
47+
simplecov-html (~> 0.7.1)
48+
simplecov-html (0.7.1)
4249
simplecov-rcov (0.2.3)
4350
simplecov (>= 0.4.1)
51+
slop (3.4.4)
52+
spoon (0.0.4)
53+
ffi
4454
tagz (9.1.0)
4555
tenjin (0.7.1)
46-
therubyracer (0.10.1)
47-
libv8 (~> 3.3.10)
48-
treetop (1.4.10)
56+
treetop (1.4.12)
4957
polyglot
5058
polyglot (>= 0.3.1)
51-
yard (0.7.4)
59+
yard (0.8.6.1)
5260

5361
PLATFORMS
62+
java
5463
ruby
5564

5665
DEPENDENCIES
57-
activesupport (~> 3.1)
58-
bluecloth
5966
erector
6067
erubis
61-
i18n
62-
jeweler
68+
htmless!
69+
kramdown
6370
markaby
71+
multi_json
6472
nokogiri
65-
perftools.rb
73+
pry
6674
rspec
67-
ruby-prof
6875
simplecov
6976
simplecov-rcov
7077
tagz
7178
tenjin
72-
therubyracer
7379
yard

LICENSE renamed to MIT-LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011 Petr Chalupa
1+
Copyright (c) 2013 Petr Chalupa <[email protected]>
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
19+
THE SOFTWARE.

README.md

+5-112
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,7 @@
1-
# HammerBuilder
1+
## Htmless
22

3-
Fast Ruby xhtml5 renderer
3+
Fast extensible html5 builder in pure Ruby
44

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
5+
- Documentation: <http://blog.pitr.ch/htmless>
6+
- Source: <https://github.com/pitr-ch/htmless>
7+
- Blog: <http://blog.pitr.ch/blog/categories/htmless/>

0 commit comments

Comments
 (0)