Capcode 0.3.0 → 0.4.0
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/README +58 -2
- data/doc/rdoc/classes/Capcode.html +224 -223
- data/doc/rdoc/classes/Capcode/HTTPError.html +2 -0
- data/doc/rdoc/classes/Capcode/Helpers.html +55 -35
- data/doc/rdoc/classes/Capcode/{RouteError.html → Views.html} +7 -26
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/AUTHORS.html +1 -0
- data/doc/rdoc/files/COPYING.html +1 -0
- data/doc/rdoc/files/README.html +65 -3
- data/doc/rdoc/files/lib/capcode_rb.html +2 -1
- data/examples/sample.rb +11 -3
- data/lib/capcode.rb +12 -8
- data/lib/capcode/version.rb +1 -1
- metadata +3 -4
- data/doc/rdoc/classes/Capcode/ParameterError.html +0 -126
data/lib/capcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Capcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Gr\xC3\xA9goire Lejeune"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-30 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -40,8 +40,7 @@ files:
|
|
40
40
|
- setup.rb
|
41
41
|
- doc/rdoc/classes/Capcode/Helpers.html
|
42
42
|
- doc/rdoc/classes/Capcode/HTTPError.html
|
43
|
-
- doc/rdoc/classes/Capcode/
|
44
|
-
- doc/rdoc/classes/Capcode/RouteError.html
|
43
|
+
- doc/rdoc/classes/Capcode/Views.html
|
45
44
|
- doc/rdoc/classes/Capcode.html
|
46
45
|
- doc/rdoc/created.rid
|
47
46
|
- doc/rdoc/files/AUTHORS.html
|
@@ -1,126 +0,0 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>
|
6
|
-
Capcode, the Documentation » Class: Capcode::ParameterError
|
7
|
-
</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
<script language="JavaScript" type="text/javascript">
|
11
|
-
// <![CDATA[
|
12
|
-
|
13
|
-
function toggleSource( id )
|
14
|
-
{
|
15
|
-
var elem
|
16
|
-
var link
|
17
|
-
|
18
|
-
if( document.getElementById )
|
19
|
-
{
|
20
|
-
elem = document.getElementById( id )
|
21
|
-
link = document.getElementById( "l_" + id )
|
22
|
-
}
|
23
|
-
else if ( document.all )
|
24
|
-
{
|
25
|
-
elem = eval( "document.all." + id )
|
26
|
-
link = eval( "document.all.l_" + id )
|
27
|
-
}
|
28
|
-
else
|
29
|
-
return false;
|
30
|
-
|
31
|
-
if( elem.style.display == "block" )
|
32
|
-
{
|
33
|
-
elem.style.display = "none"
|
34
|
-
link.innerHTML = "show source"
|
35
|
-
}
|
36
|
-
else
|
37
|
-
{
|
38
|
-
elem.style.display = "block"
|
39
|
-
link.innerHTML = "hide source"
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
function openCode( url )
|
44
|
-
{
|
45
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
46
|
-
}
|
47
|
-
// ]]>
|
48
|
-
</script>
|
49
|
-
</head>
|
50
|
-
<body>
|
51
|
-
<!--
|
52
|
-
<div id="menu">
|
53
|
-
<h3 class="title">Class: Capcode::ParameterError</h3>
|
54
|
-
</div>
|
55
|
-
-->
|
56
|
-
<div id="fullpage">
|
57
|
-
<div id="pager">
|
58
|
-
<table>
|
59
|
-
<tr><td><img src="../../rubyfr.png" /></td>
|
60
|
-
<td id="pagertd">
|
61
|
-
<strong># Class: Capcode::ParameterError<br />
|
62
|
-
[
|
63
|
-
"<a href="../../files/README.html" value="File: README">README</a>",
|
64
|
-
"<a href="../../files/AUTHORS.html" value="File: AUTHORS">AUTHORS</a>",
|
65
|
-
"<a href="../../files/COPYING.html" value="File: COPYING">COPYING</a>",
|
66
|
-
"<a href="../../files/lib/capcode_rb.html" value="File: capcode.rb">lib/capcode.rb</a>",
|
67
|
-
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
68
|
-
<a href="../../classes/Capcode.html" title="Module: Capcode">Capcode</a>.view_html<br />
|
69
|
-
<a href="../../classes/Capcode/Helpers.html" title="Module: Capcode::Helpers">Capcode::Helpers</a>.view_html<br />
|
70
|
-
<a href="../../classes/Capcode/HTTPError.html" title="Class: Capcode::HTTPError">Capcode::HTTPError</a>.view_html<br />
|
71
|
-
<a href="../../classes/Capcode/RouteError.html" title="Class: Capcode::RouteError">Capcode::RouteError</a>.view_html<br />
|
72
|
-
<a href="../../classes/Capcode/ParameterError.html" title="Class: Capcode::ParameterError">Capcode::ParameterError</a>.view_html<br />
|
73
|
-
end</strong>
|
74
|
-
</td></tr>
|
75
|
-
</table>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
|
80
|
-
<div id="Capcode::ParameterError" class="page_shade">
|
81
|
-
<div class="page">
|
82
|
-
<h3>Class Capcode::ParameterError < ArgumentError</h3>
|
83
|
-
|
84
|
-
(in files
|
85
|
-
<a href="../../files/lib/capcode_rb.html">lib/capcode.rb</a>
|
86
|
-
)
|
87
|
-
|
88
|
-
<p>
|
89
|
-
<a href="HTTPError.html">HTTPError</a> help you to create your own 404, 500
|
90
|
-
and/or 501 response
|
91
|
-
</p>
|
92
|
-
<p>
|
93
|
-
To create a custom 404 reponse, create a fonction HTTPError.r404 in your
|
94
|
-
application :
|
95
|
-
</p>
|
96
|
-
<pre>
|
97
|
-
module Capcode
|
98
|
-
class HTTPError
|
99
|
-
def r404(f)
|
100
|
-
"#{f} not found :("
|
101
|
-
end
|
102
|
-
end
|
103
|
-
end
|
104
|
-
</pre>
|
105
|
-
<p>
|
106
|
-
Do the same (r500 and r501) to customize 500 and 501 errors
|
107
|
-
</p>
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<h4>Includes</h4>
|
113
|
-
<ul>
|
114
|
-
<li>Rack</li>
|
115
|
-
<li><a href="Capcode/Helpers.html">Capcode::Helpers</a></li>
|
116
|
-
</ul>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
</div>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
|
124
|
-
</div>
|
125
|
-
</body>
|
126
|
-
</html>
|