gerbil 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>to_html (String)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/gerbil/html.rb, line 34</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_html</span>
15
+ <span class="ruby-identifier">text</span> = <span class="ruby-identifier">dup</span>
16
+ <span class="ruby-identifier">protect_tags!</span> <span class="ruby-identifier">text</span>, <span class="ruby-constant">VERBATIM_TAGS</span>, <span class="ruby-identifier">verbatimStore</span> = {}, <span class="ruby-keyword kw">true</span>
17
+ <span class="ruby-identifier">protect_tags!</span> <span class="ruby-identifier">text</span>, <span class="ruby-constant">PROTECTED_TAGS</span>, <span class="ruby-identifier">protectedStore</span> = {}, <span class="ruby-keyword kw">false</span>
18
+
19
+ <span class="ruby-identifier">html</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">thru_redcloth</span>
20
+ <span class="ruby-identifier">restore_tags!</span> <span class="ruby-identifier">html</span>, <span class="ruby-identifier">protectedStore</span>
21
+
22
+ <span class="ruby-comment cmt"># collapse redundant &lt;pre&gt; elements -- a side effect of RedCloth</span>
23
+ <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(&lt;pre&gt;)\s*&lt;pre&gt;(.*?)&lt;/pre&gt;\s*(&lt;/pre&gt;)}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'\1\2\3'</span>
24
+
25
+ <span class="ruby-identifier">html</span> = <span class="ruby-identifier">html</span>.<span class="ruby-identifier">thru_coderay</span>
26
+ <span class="ruby-identifier">restore_tags!</span> <span class="ruby-identifier">html</span>, <span class="ruby-identifier">verbatimStore</span>
27
+
28
+ <span class="ruby-comment cmt"># ensure tables have a border (this GREATLY improves</span>
29
+ <span class="ruby-comment cmt"># readability in text-mode web browsers like Lynx and w3m)</span>
30
+ <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r/&lt;table/</span>, <span class="ruby-value str">'\&amp; border=&quot;1&quot;'</span>
31
+
32
+ <span class="ruby-identifier">html</span>
33
+ <span class="ruby-keyword kw">end</span></pre>
34
+ </body>
35
+ </html>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>thru_redcloth (String)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/gerbil/html.rb, line 56</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">thru_redcloth</span>
15
+ <span class="ruby-identifier">text</span> = <span class="ruby-identifier">dup</span>
16
+
17
+ <span class="ruby-comment cmt"># redcloth does not correctly convert -- into &amp;mdash;</span>
18
+ <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{\b--\b}</span>, <span class="ruby-value str">'&amp;mdash;'</span>
19
+
20
+ <span class="ruby-identifier">html</span> = <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">text</span>).<span class="ruby-identifier">to_html</span>
21
+
22
+ <span class="ruby-comment cmt"># redcloth adds &lt;span&gt; tags around acronyms</span>
23
+ <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{&lt;span class=&quot;caps&quot;&gt;([[:upper:][:digit:]]+)&lt;/span&gt;}</span>, <span class="ruby-value str">'\1'</span>
24
+
25
+ <span class="ruby-comment cmt"># redcloth wraps indented text within &lt;pre&gt;&lt;code&gt; tags</span>
26
+ <span class="ruby-identifier">html</span>.<span class="ruby-identifier">gsub!</span> <span class="ruby-regexp re">%r{(&lt;pre&gt;)\s*&lt;code&gt;(.*?)\s*&lt;/code&gt;\s*(&lt;/pre&gt;)}</span><span class="ruby-identifier">m</span>, <span class="ruby-value str">'\1\2\3'</span>
27
+
28
+ <span class="ruby-comment cmt"># redcloth wraps a single item within paragraph tags, which</span>
29
+ <span class="ruby-comment cmt"># prevents the item's HTML from being validly injected within</span>
30
+ <span class="ruby-comment cmt"># other block-level elements, such as headings (h1, h2, etc.)</span>
31
+ <span class="ruby-identifier">html</span>.<span class="ruby-identifier">sub!</span> <span class="ruby-regexp re">%r{^&lt;p&gt;(.*)&lt;/p&gt;$}</span><span class="ruby-identifier">m</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
32
+ <span class="ruby-identifier">payload</span> = <span class="ruby-identifier">$1</span>
33
+
34
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">payload</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/&lt;p&gt;/</span>
35
+ <span class="ruby-identifier">match</span>
36
+ <span class="ruby-keyword kw">else</span>
37
+ <span class="ruby-identifier">payload</span>
38
+ <span class="ruby-keyword kw">end</span>
39
+ <span class="ruby-keyword kw">end</span>
40
+
41
+ <span class="ruby-identifier">html</span>
42
+ <span class="ruby-keyword kw">end</span></pre>
43
+ </body>
44
+ </html>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>thru_coderay (String)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/gerbil/html.rb, line 90</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">thru_coderay</span>
15
+ <span class="ruby-identifier">gsub</span> <span class="ruby-regexp re">%r{&lt;(code)(.*?)&gt;(.*?)&lt;/\1&gt;}</span><span class="ruby-identifier">m</span> <span class="ruby-keyword kw">do</span>
16
+ <span class="ruby-identifier">atts</span>, <span class="ruby-identifier">code</span> = <span class="ruby-identifier">$2</span>, <span class="ruby-constant">CGI</span>.<span class="ruby-identifier">unescapeHTML</span>(<span class="ruby-identifier">$3</span>)
17
+
18
+ <span class="ruby-identifier">lang</span> =
19
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$2</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/lang=('|&quot;)(.*?)\1/i</span>
20
+ <span class="ruby-identifier">$2</span>
21
+ <span class="ruby-keyword kw">else</span>
22
+ <span class="ruby-identifier">:ruby</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+
25
+ <span class="ruby-identifier">tag</span> =
26
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">code</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\n/</span>
27
+ <span class="ruby-identifier">:pre</span>
28
+ <span class="ruby-keyword kw">else</span>
29
+ <span class="ruby-identifier">:code</span>
30
+ <span class="ruby-keyword kw">end</span>
31
+
32
+ <span class="ruby-identifier">html</span> = <span class="ruby-constant">CodeRay</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">lang</span>).<span class="ruby-identifier">html</span>(<span class="ruby-identifier">:css</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:style</span>)
33
+
34
+ <span class="ruby-node">%{&lt;#{tag} class=&quot;code&quot;#{atts}&gt;#{html}&lt;/#{tag}&gt;}</span>
35
+ <span class="ruby-keyword kw">end</span>
36
+ <span class="ruby-keyword kw">end</span></pre>
37
+ </body>
38
+ </html>
@@ -0,0 +1 @@
1
+ Tue, 22 Jan 2008 21:35:07 -0800
@@ -0,0 +1,124 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: html.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>html.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/gerbil/html.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sat Jan 12 15:44:17 -0800 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ This file defines the <a
74
+ href="../../../classes/String.html#M000001">String#to_html</a> method,
75
+ which is invoked to transform the content of a blog entry into HTML.
76
+ </p>
77
+ <p>
78
+ It features the Textile formatting system (RedCloth), syntax coloring
79
+ (CodeRay), and smart source code sizing (block versus inline display).
80
+ </p>
81
+
82
+ </div>
83
+
84
+ <div id="requires-list">
85
+ <h3 class="section-bar">Required files</h3>
86
+
87
+ <div class="name-list">
88
+ cgi&nbsp;&nbsp;
89
+ digest/sha1&nbsp;&nbsp;
90
+ rubygems&nbsp;&nbsp;
91
+ coderay&nbsp;&nbsp;
92
+ redcloth&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+
115
+
116
+ </div>
117
+
118
+
119
+ <div id="validator-badges">
120
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
121
+ </div>
122
+
123
+ </body>
124
+ </html>
@@ -0,0 +1,116 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: rdoc.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>rdoc.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/gerbil/rdoc.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sat Jan 12 18:36:06 -0800 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ Workaround for: `rdoc &#8212;fmt xml` does not dump information about
74
+ methods.
75
+ </p>
76
+
77
+ </div>
78
+
79
+ <div id="requires-list">
80
+ <h3 class="section-bar">Required files</h3>
81
+
82
+ <div class="name-list">
83
+ rdoc/rdoc&nbsp;&nbsp;
84
+ rdoc/generators/html_generator&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ </div>
92
+
93
+
94
+ <!-- if includes -->
95
+
96
+ <div id="section">
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <!-- if method_list -->
106
+
107
+
108
+ </div>
109
+
110
+
111
+ <div id="validator-badges">
112
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
113
+ </div>
114
+
115
+ </body>
116
+ </html>
@@ -0,0 +1,125 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: gerbil.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>gerbil.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/gerbil.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Tue Jan 22 15:00:46 -0800 2008</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ project information
74
+ </p>
75
+
76
+ </div>
77
+
78
+
79
+ </div>
80
+
81
+
82
+ </div>
83
+
84
+
85
+ <!-- if includes -->
86
+
87
+ <div id="section">
88
+
89
+
90
+ <div id="constants-list">
91
+ <h3 class="section-bar">Constants</h3>
92
+
93
+ <div class="name-list">
94
+ <table summary="Constants">
95
+ <tr class="top-aligned-row context-row">
96
+ <td class="context-item-name">Gerbil</td>
97
+ <td>=</td>
98
+ <td class="context-item-value">{ :name =&gt; 'Gerbil', :version =&gt; '1.1.0', :release =&gt; '2008-01-22', :website =&gt; 'http://gerbil.rubyforge.org', :home =&gt; File.expand_path(File.join(File.dirname(__FILE__), '..'))</td>
99
+ <td width="3em">&nbsp;</td>
100
+ <td class="context-item-desc">
101
+ project information
102
+
103
+ </td>
104
+ </tr>
105
+ </table>
106
+ </div>
107
+ </div>
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <!-- if method_list -->
115
+
116
+
117
+ </div>
118
+
119
+
120
+ <div id="validator-badges">
121
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
122
+ </div>
123
+
124
+ </body>
125
+ </html>