bivouac 0.0.3 → 0.0.4
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 +50 -1
- data/bin/bivouac +10 -3
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/AUTHORS.html +95 -0
- data/doc/rdoc/files/COPYING.html +519 -0
- data/doc/rdoc/files/README.html +262 -0
- data/doc/rdoc/index.html +10 -0
- data/doc/rdoc/permalink.gif +0 -0
- data/doc/rdoc/rdoc-style.css +106 -0
- data/doc/rdoc/rubyfr.png +0 -0
- data/examples/blog_erb/app/{controllers/blog.rb → blog.rb} +11 -11
- data/examples/blog_erb/config/environment.rb +2 -2
- data/examples/blog_erb/db/Blog.db +0 -0
- data/examples/blog_erb/db/create.rb +1 -1
- data/examples/blog_erb/log/Blog.log +51 -106
- data/examples/blog_erb/script/server +1 -1
- data/examples/blog_goh/app/{controllers/blog.rb → blog.rb} +10 -14
- data/examples/blog_goh/config/environment.rb +1 -1
- data/examples/blog_goh/db/Blog.db +0 -0
- data/examples/blog_goh/db/create.rb +5 -1
- data/examples/blog_goh/log/Blog.log +75 -0
- data/examples/blog_goh/script/server +1 -1
- data/lib/bivouac/template/application/postamble_cgi.rb +2 -2
- data/lib/bivouac/template/application/postamble_fastcgi.rb +2 -2
- data/lib/bivouac/template/application/postamble_mongrel.rb +16 -1
- data/lib/bivouac/template/application/postamble_webrick.rb +4 -3
- data/lib/bivouac/template/application_erb.rb +11 -8
- data/lib/bivouac/template/application_goh.rb +10 -7
- data/lib/bivouac/template/server.rb +1 -1
- metadata +20 -5
- data/examples/blog_goh/log/camping.log +0 -19
data/README
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= Bivouac
|
1
|
+
= Bivouac
|
2
2
|
|
3
3
|
Copyright (C) 2007 Gregoire Lejeune
|
4
4
|
|
@@ -12,6 +12,11 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
|
|
12
12
|
|
13
13
|
== FEATURES/PROBLEMS:
|
14
14
|
|
15
|
+
=== 0.0.4:
|
16
|
+
* the application file is now in app and not in app/controller
|
17
|
+
* Mongrel postamble is no more in the TODO list
|
18
|
+
* You can specify which address (<tt>-a</tt>) and port (<tt>-P</tt>) to bind to.
|
19
|
+
|
15
20
|
=== 0.0.3:
|
16
21
|
* Model generation is now ok (i hope)
|
17
22
|
* It's now possible to create "Get Out of Hand" and "Eruby/Erb" projects
|
@@ -30,13 +35,57 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
|
|
30
35
|
=== Extra:
|
31
36
|
* With camping 1.5 there is a bug in /usr/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/webrick.rb line 59, change <tt>do_GET(req, res)</tt> to <tt>do_GET(req, resp)</tt>
|
32
37
|
|
38
|
+
== TODO:
|
39
|
+
|
40
|
+
* add test with mosquito[http://code.whytheluckystiff.net/camping/wiki/MosquitoForBugFreeCamping]
|
41
|
+
* test with Apache and Lighttpd
|
42
|
+
* add scaffold generator -- who want it ?
|
43
|
+
* rewrite script/server and remove postamble
|
44
|
+
* add mysql, postgresql, oracle, ... support
|
45
|
+
|
33
46
|
== SYNOPSIS:
|
34
47
|
|
48
|
+
% bivouac -h
|
49
|
+
Usage: bivouac [options] app
|
50
|
+
bivouac, the generator for the microframework ON-button
|
51
|
+
for ruby 1.8.6 (2007-06-07) [universal-darwin9.0]
|
52
|
+
|
53
|
+
Specific options:
|
54
|
+
-P, --port PORT Which port to bind to (3301)
|
55
|
+
-a, --address ADDR Address to bind to (0.0.0.0)
|
56
|
+
-o, --organize TYPE Type or organisation
|
57
|
+
(options: JOF:Just On File
|
58
|
+
GOH:Get Out of Hand
|
59
|
+
ERB:use Eruby or Erb)
|
60
|
+
-p, --postamble TYPE Add a postamble
|
61
|
+
(options: CGI/FastCGI/Mongrel/WEBrick/none)
|
62
|
+
|
63
|
+
Common options:
|
64
|
+
-?, --help Show this message
|
65
|
+
-v, --version Show version
|
66
|
+
|
35
67
|
% bivouac your_app_name
|
36
68
|
...
|
37
69
|
% cd your_app_name
|
70
|
+
% ruby script/generate -h
|
71
|
+
Usage: script/generate generator [options] [args]
|
72
|
+
|
73
|
+
Generators
|
74
|
+
Builtin: controller, model, migrate, view
|
75
|
+
|
76
|
+
controller generator options:
|
77
|
+
-v, --no-view Do not generate any view for the controller
|
78
|
+
-d, --no-route Do not add the default route to the controller
|
79
|
+
(/controller_name)
|
80
|
+
-r, --route ROUTE,ROUTE,... Add ROUTES to the controller
|
81
|
+
|
82
|
+
Common options:
|
83
|
+
-h, --help Show this message
|
84
|
+
|
38
85
|
% ruby script/generate controller your_controller
|
39
86
|
...
|
87
|
+
% ruby script/server
|
88
|
+
...
|
40
89
|
|
41
90
|
== REQUIREMENTS:
|
42
91
|
|
data/bin/bivouac
CHANGED
@@ -14,7 +14,7 @@ require 'fileutils'
|
|
14
14
|
require 'bivouac/template'
|
15
15
|
include Bivouac::Template
|
16
16
|
|
17
|
-
@conf = OpenStruct.new( :db => "sqlite3", :orgtype => "GOH", :postamble => "webrick" )
|
17
|
+
@conf = OpenStruct.new( :db => "sqlite3", :orgtype => "GOH", :postamble => "webrick", :port => 3301, :address => "0.0.0.0" )
|
18
18
|
|
19
19
|
opts = OptionParser.new do |opts|
|
20
20
|
opts.banner = "Usage: bivouac [options] app"
|
@@ -24,7 +24,9 @@ opts = OptionParser.new do |opts|
|
|
24
24
|
|
25
25
|
|
26
26
|
#opts.on("-d", "--database NAME", "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).") { |@conf.db| }
|
27
|
-
opts.on("-
|
27
|
+
opts.on("-P", "--port PORT", "Which port to bind to (3301)") { |@conf.port| }
|
28
|
+
opts.on("-a", "--address ADDR", "Address to bind to (0.0.0.0)") { |@conf.address| }
|
29
|
+
opts.on("-o", "--organize TYPE", "Type or organisation (options: JOF:Just On File/GOH:Get Out of Hand/ERB:use Eruby or Erb)") { |@conf.orgtype|
|
28
30
|
unless %w{jof goh erb}.include?( @conf.orgtype.downcase )
|
29
31
|
puts opts
|
30
32
|
exit
|
@@ -67,6 +69,8 @@ name = ARGV.dup
|
|
67
69
|
@conf.appdir = @conf.appname.underscore
|
68
70
|
|
69
71
|
@appname = @conf.appname
|
72
|
+
@server_address = @conf.address
|
73
|
+
@server_port = @conf.port
|
70
74
|
|
71
75
|
createDir( @conf.appdir )
|
72
76
|
createDir( "#{@conf.appdir}/config" )
|
@@ -83,12 +87,15 @@ createDir( "#{@conf.appdir}/public/javascripts" )
|
|
83
87
|
createDir( "#{@conf.appdir}/public/stylesheets" )
|
84
88
|
createDir( "#{@conf.appdir}/log" )
|
85
89
|
createDir( "#{@conf.appdir}/script" )
|
90
|
+
createDir( "#{@conf.appdir}/test" )
|
91
|
+
createDir( "#{@conf.appdir}/lib" )
|
86
92
|
|
87
93
|
createFile( "#{@conf.appdir}/config/environment.rb" ) { |io|
|
88
94
|
io.puts template( "environment" )
|
89
95
|
}
|
90
96
|
|
91
|
-
createFile( "#{@conf.appdir}/app/controllers/#{@conf.appdir}.rb" ) { |io|
|
97
|
+
# createFile( "#{@conf.appdir}/app/controllers/#{@conf.appdir}.rb" ) { |io|
|
98
|
+
createFile( "#{@conf.appdir}/app/#{@conf.appdir}.rb" ) { |io|
|
92
99
|
io.puts template( "application_#{@conf.orgtype.downcase}" )
|
93
100
|
|
94
101
|
begin
|
@@ -0,0 +1 @@
|
|
1
|
+
Sat, 04 Aug 2007 02:26:46 +0200
|
@@ -0,0 +1,95 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<title>
|
6
|
+
Bivouac, the Documentation » File: AUTHORS
|
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: AUTHORS</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: AUTHORS<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="http://greg.rubyfr.net">nil</a>].each do<br />
|
67
|
+
end</strong>
|
68
|
+
</td></tr>
|
69
|
+
</table>
|
70
|
+
</ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div id="AUTHORS" class="page_shade">
|
74
|
+
<div class="page">
|
75
|
+
<div class="header">
|
76
|
+
<div class="path">AUTHORS / Fri May 11 09:13:59 +0200 2007</div>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<p>
|
80
|
+
Gregoire Lejeune <glejeune.lejeune@free.fr>
|
81
|
+
</p>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
</div>
|
94
|
+
</body>
|
95
|
+
</html>
|