bivouac 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README +9 -0
- data/bin/bivouac +15 -19
- data/doc/rdoc/classes/BivouacHelpers.html +117 -0
- data/doc/rdoc/classes/BivouacHelpers/BaseView.html +140 -0
- data/doc/rdoc/classes/BivouacHelpers/FormView.html +398 -0
- data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +274 -0
- data/doc/rdoc/classes/BivouacHelpers/JavaScriptView.html +573 -0
- data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +258 -0
- data/doc/rdoc/classes/BivouacHelpers/TooltipView.html +158 -0
- data/doc/rdoc/classes/JavaScriptGenerator.html +564 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/AUTHORS.html +14 -0
- data/doc/rdoc/files/COPYING.html +14 -0
- data/doc/rdoc/files/README.html +40 -1
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/base_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/form_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +109 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +113 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +113 -0
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/tooltip_rb.html +109 -0
- data/examples/bivouac_sample/app/bivouac_sample.rb +61 -0
- data/examples/bivouac_sample/app/controllers/autocomplete.rb +24 -0
- data/examples/bivouac_sample/app/controllers/drag_and_drop.rb +11 -0
- data/examples/bivouac_sample/app/controllers/index.rb +7 -0
- data/examples/bivouac_sample/app/controllers/observe.rb +14 -0
- data/examples/bivouac_sample/app/controllers/periodically_call.rb +12 -0
- data/examples/bivouac_sample/app/controllers/remote_form.rb +10 -0
- data/examples/bivouac_sample/app/controllers/remote_link.rb +11 -0
- data/examples/bivouac_sample/app/controllers/submit_remote.rb +17 -0
- data/examples/bivouac_sample/app/controllers/toggle.rb +10 -0
- data/examples/bivouac_sample/app/controllers/toggle_sortable.rb +11 -0
- data/examples/bivouac_sample/app/helpers/_helpers.rb +25 -0
- data/examples/bivouac_sample/app/helpers/source.rb +25 -0
- data/examples/bivouac_sample/app/views/_autocomplete_result.rb +9 -0
- data/examples/bivouac_sample/app/views/_drag_and_drop_result.rb +5 -0
- data/examples/bivouac_sample/app/views/_observe_result.rb +17 -0
- data/examples/bivouac_sample/app/views/_periodically_call_result.rb +5 -0
- data/examples/bivouac_sample/app/views/_remote_link_result.rb +5 -0
- data/examples/bivouac_sample/app/views/_sortable_result.rb +5 -0
- data/examples/bivouac_sample/app/views/_submit_remote_result.rb +5 -0
- data/examples/bivouac_sample/app/views/autocomplete.rb +28 -0
- data/examples/bivouac_sample/app/views/drag_and_drop.rb +35 -0
- data/examples/bivouac_sample/app/views/index.rb +19 -0
- data/examples/bivouac_sample/app/views/observe.rb +19 -0
- data/examples/bivouac_sample/app/views/periodically_call.rb +17 -0
- data/examples/bivouac_sample/app/views/remote_form.rb +19 -0
- data/examples/bivouac_sample/app/views/remote_link.rb +20 -0
- data/examples/bivouac_sample/app/views/submit_remote.rb +21 -0
- data/examples/bivouac_sample/app/views/toggle.rb +44 -0
- data/examples/bivouac_sample/app/views/toggle_sortable.rb +52 -0
- data/examples/bivouac_sample/config/environment.rb +37 -0
- data/examples/bivouac_sample/config/postamble.rb +62 -0
- data/examples/bivouac_sample/log/BivouacSample.log +77 -0
- data/examples/bivouac_sample/public/images/camping.png +0 -0
- data/examples/bivouac_sample/public/index.html +242 -0
- data/examples/bivouac_sample/public/javascripts/builder.js +131 -0
- data/examples/bivouac_sample/public/javascripts/controls.js +835 -0
- data/examples/bivouac_sample/public/javascripts/dragdrop.js +944 -0
- data/examples/bivouac_sample/public/javascripts/effects.js +1090 -0
- data/examples/bivouac_sample/public/javascripts/prototype.js +2515 -0
- data/examples/bivouac_sample/public/javascripts/scriptaculous.js +51 -0
- data/examples/bivouac_sample/public/javascripts/slider.js +278 -0
- data/examples/bivouac_sample/public/javascripts/tooltip.js +208 -0
- data/examples/bivouac_sample/public/javascripts/unittest.js +564 -0
- data/examples/bivouac_sample/public/stylesheets/autocomplete.css +22 -0
- data/examples/bivouac_sample/public/stylesheets/coderay.css +104 -0
- data/examples/bivouac_sample/script/generate +3 -0
- data/examples/bivouac_sample/script/server +5 -0
- data/lib/bivouac/helpers/view/goh/base.rb +16 -0
- data/lib/bivouac/helpers/view/goh/form.rb +170 -0
- data/lib/bivouac/helpers/view/goh/html.rb +138 -0
- data/lib/bivouac/helpers/view/goh/javascript.rb +532 -0
- data/lib/bivouac/helpers/view/goh/scriptaculous.rb +133 -0
- data/lib/bivouac/helpers/view/goh/tooltip.rb +33 -0
- data/lib/bivouac/template.rb +3 -3
- data/lib/bivouac/template/application/helpers_erb.rb +11 -0
- data/lib/bivouac/template/application/helpers_goh.rb +25 -0
- data/lib/bivouac/template/application/postamble.rb +62 -0
- data/lib/bivouac/template/application_erb.rb +4 -0
- data/lib/bivouac/template/application_goh.rb +4 -0
- data/lib/bivouac/template/environment.rb +19 -5
- data/lib/bivouac/template/server.rb +1 -1
- data/lib/bivouac/template/static/autocomplete.css +22 -0
- data/lib/bivouac/template/static/builder.js +131 -0
- data/lib/bivouac/template/static/controls.js +835 -0
- data/lib/bivouac/template/static/dragdrop.js +944 -0
- data/lib/bivouac/template/static/effects.js +1090 -0
- data/lib/bivouac/template/static/prototype.js +2515 -0
- data/lib/bivouac/template/static/scriptaculous.js +51 -0
- data/lib/bivouac/template/static/slider.js +278 -0
- data/lib/bivouac/template/static/tooltip.js +208 -0
- data/lib/bivouac/template/static/unittest.js +564 -0
- metadata +124 -7
- data/lib/bivouac/template/application/postamble_cgi.rb +0 -8
- data/lib/bivouac/template/application/postamble_fastcgi.rb +0 -8
- data/lib/bivouac/template/application/postamble_mongrel.rb +0 -19
- data/lib/bivouac/template/application/postamble_none.rb +0 -1
- data/lib/bivouac/template/application/postamble_webrick.rb +0 -19
@@ -0,0 +1,113 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » File: scriptaculous.rb
|
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">File: scriptaculous.rb</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># File: scriptaculous.rb<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/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
|
67
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
|
68
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
|
69
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
|
70
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
|
71
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
|
72
|
+
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
73
|
+
<a href="../../../../../../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
|
74
|
+
<a href="../../../../../../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
|
75
|
+
<a href="../../../../../../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
|
76
|
+
<a href="../../../../../../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
|
77
|
+
<a href="../../../../../../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
|
78
|
+
<a href="../../../../../../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
|
79
|
+
<a href="../../../../../../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
|
80
|
+
<a href="../../../../../../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
|
81
|
+
end</strong>
|
82
|
+
</td></tr>
|
83
|
+
</table>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="lib/bivouac/helpers/view/goh/scriptaculous.rb" class="page_shade">
|
88
|
+
<div class="page">
|
89
|
+
<div class="header">
|
90
|
+
<div class="path">lib/bivouac/helpers/view/goh/scriptaculous.rb / Wed Sep 12 12:20:38 +0200 2007</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<p>
|
94
|
+
bivouac/helpers/view/scriptaculous
|
95
|
+
</p>
|
96
|
+
|
97
|
+
|
98
|
+
<h4>Requires:</h4>
|
99
|
+
<ul>
|
100
|
+
<li>active_support</li>
|
101
|
+
</ul>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</body>
|
113
|
+
</html>
|
@@ -0,0 +1,109 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » File: tooltip.rb
|
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">File: tooltip.rb</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># File: tooltip.rb<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/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
|
67
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
|
68
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
|
69
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
|
70
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
|
71
|
+
"<a href="../../../../../../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
|
72
|
+
<a href="http://greg.rubyfr.net">nil</a>].each do<br />
|
73
|
+
<a href="../../../../../../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
|
74
|
+
<a href="../../../../../../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
|
75
|
+
<a href="../../../../../../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
|
76
|
+
<a href="../../../../../../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
|
77
|
+
<a href="../../../../../../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
|
78
|
+
<a href="../../../../../../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
|
79
|
+
<a href="../../../../../../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
|
80
|
+
<a href="../../../../../../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
|
81
|
+
end</strong>
|
82
|
+
</td></tr>
|
83
|
+
</table>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="lib/bivouac/helpers/view/goh/tooltip.rb" class="page_shade">
|
88
|
+
<div class="page">
|
89
|
+
<div class="header">
|
90
|
+
<div class="path">lib/bivouac/helpers/view/goh/tooltip.rb / Mon Sep 03 14:33:26 +0200 2007</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<p>
|
94
|
+
bivouac/helpers/view/html
|
95
|
+
</p>
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
</div>
|
108
|
+
</body>
|
109
|
+
</html>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#
|
4
|
+
# Project BivouacSample
|
5
|
+
#
|
6
|
+
# Created using bivouac on Mon Sep 10 21:47:54 +0200 2007.
|
7
|
+
# Copyright (c) 2007 __My__. All rights reserved.
|
8
|
+
#
|
9
|
+
|
10
|
+
LIB = File.join File.expand_path(File.dirname(__FILE__)), '..', 'lib'
|
11
|
+
$:.unshift( LIB )
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'camping'
|
15
|
+
require 'camping/session'
|
16
|
+
require 'mime/types'
|
17
|
+
require 'bivouac'
|
18
|
+
|
19
|
+
include Bivouac
|
20
|
+
|
21
|
+
Camping.goes :BivouacSample
|
22
|
+
|
23
|
+
# Load helpers from app/helpers
|
24
|
+
files( 'helpers' ) { |file| require( file ) }
|
25
|
+
|
26
|
+
# Load models from app/models
|
27
|
+
files( 'models' ) { |file| require( file ) }
|
28
|
+
|
29
|
+
# Load database schema from db/migrate
|
30
|
+
files( '../db/migrate' ) { |file| require( file ) }
|
31
|
+
|
32
|
+
# Load views from app/views
|
33
|
+
files( 'views' ) { |file| require( file ) }
|
34
|
+
|
35
|
+
# Load controllers from app/controllers
|
36
|
+
files( 'controllers', :except => [File.basename(__FILE__)] ) { |file| require( file ) }
|
37
|
+
|
38
|
+
module BivouacSample::Controllers
|
39
|
+
class Public < R '/public/(.+)'
|
40
|
+
PATH = File.expand_path(File.dirname(__FILE__))
|
41
|
+
|
42
|
+
def get file
|
43
|
+
if file.include? '..'
|
44
|
+
@status = '403'
|
45
|
+
return '403 - Invalid path'
|
46
|
+
else
|
47
|
+
type = (MIME::Types.type_for(file)[0] || '/text/plain').to_s
|
48
|
+
@headers['Content-Type'] = type
|
49
|
+
@headers['X-Sendfile'] = File.join PATH, '..', 'public', file
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
# Load create
|
56
|
+
files( '../db' ) { |file| require( file ) }
|
57
|
+
|
58
|
+
# Load postamble and configuration
|
59
|
+
if __FILE__ == $0
|
60
|
+
files( '../config' ) { |file| require( file ) }
|
61
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module BivouacSample::Controllers
|
2
|
+
class Autocomplete < R '/autocomplete'
|
3
|
+
def get
|
4
|
+
render :autocomplete
|
5
|
+
end
|
6
|
+
def post
|
7
|
+
search_data = input.test_autocomplete
|
8
|
+
data = [
|
9
|
+
'Gregoire Lejeune',
|
10
|
+
'Arthur Lejeune',
|
11
|
+
'Colyne Lejeune',
|
12
|
+
'Benedict Lejeune',
|
13
|
+
'John Doe'
|
14
|
+
]
|
15
|
+
|
16
|
+
@results = [ ]
|
17
|
+
data.each do |name|
|
18
|
+
@results << name if name.downcase.include?( search_data.downcase )
|
19
|
+
end
|
20
|
+
|
21
|
+
render :_autocomplete_result
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module BivouacSample::Controllers
|
2
|
+
class Observe < R '/observe'
|
3
|
+
WORDLIST = %w{Bivouac is a full stack, open-source web framework in Ruby for writing real world applications with joy and less code than most frameworks spend doing XML sit-ups }
|
4
|
+
def get
|
5
|
+
render :observe
|
6
|
+
end
|
7
|
+
def post
|
8
|
+
@search = input.request
|
9
|
+
matcher = Regexp.new( @search )
|
10
|
+
@results = WORDLIST.find_all{ |w| w =~ matcher }
|
11
|
+
render :_observe_result
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module BivouacSample::Controllers
|
2
|
+
class SubmitRemote < R '/submit_remote'
|
3
|
+
def get
|
4
|
+
render :submit_remote
|
5
|
+
end
|
6
|
+
def post
|
7
|
+
answer = input.response
|
8
|
+
@isay = "Hum... Essayer autre chose mon brave!"
|
9
|
+
if answer.upcase == "BIVOUAC"
|
10
|
+
@isay = "Alors là je dis BRAVO!"
|
11
|
+
elsif answer.upcase == "CAMPING"
|
12
|
+
@isay = "Essayez le camping sauvage, c'est pas mal aussi ;)"
|
13
|
+
end
|
14
|
+
render :_submit_remote_result
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Project BivouacSample
|
3
|
+
#
|
4
|
+
# Created using bivouac on Mon Sep 10 21:47:54 +0200 2007.
|
5
|
+
# Copyright (c) 2007 __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
# DO NOT EDIT THIS FILE OR YOU REALLY KNOW WHAT YOU ARE DOING
|
8
|
+
# USE script/generate helper my_helper
|
9
|
+
#
|
10
|
+
require 'bivouac/helpers/view/goh/base'
|
11
|
+
require 'bivouac/helpers/view/goh/html'
|
12
|
+
require 'bivouac/helpers/view/goh/form'
|
13
|
+
require 'bivouac/helpers/view/goh/scriptaculous'
|
14
|
+
require 'bivouac/helpers/view/goh/javascript'
|
15
|
+
require 'bivouac/helpers/view/goh/tooltip'
|
16
|
+
|
17
|
+
helpers = [
|
18
|
+
BivouacHelpers::BaseView,
|
19
|
+
BivouacHelpers::HtmlView,
|
20
|
+
BivouacHelpers::FormView,
|
21
|
+
BivouacHelpers::ScriptAculoUsView,
|
22
|
+
BivouacHelpers::JavaScriptView,
|
23
|
+
BivouacHelpers::TooltipView
|
24
|
+
]
|
25
|
+
BivouacSample.module_eval "class Mab < Markaby::Builder; include #{helpers.join(', ')}; end"
|