bivouac 0.1.1 → 0.1.2
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 +4 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +10 -1
- data/lib/bivouac/template/application/postamble.rb +36 -13
- data/lib/bivouac/template/server.rb +1 -1
- metadata +1 -1
data/README
CHANGED
@@ -12,6 +12,10 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
|
|
12
12
|
|
13
13
|
== FEATURES/PROBLEMS:
|
14
14
|
|
15
|
+
=== 0.1.2:
|
16
|
+
* You can now use
|
17
|
+
$ ruby script/server webrick [options]
|
18
|
+
|
15
19
|
=== 0.1.1:
|
16
20
|
* Mineur bug correction in postamble to be really ready for Rails 2.0 !!!!!
|
17
21
|
* the index class is no longer Root (but Index)
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Wed, 09 Jan 2008
|
1
|
+
Wed, 09 Jan 2008 18:24:26 +0100
|
data/doc/rdoc/files/README.html
CHANGED
@@ -87,7 +87,7 @@ end</strong>
|
|
87
87
|
<div id="README" class="page_shade">
|
88
88
|
<div class="page">
|
89
89
|
<div class="header">
|
90
|
-
<div class="path">README / Wed Jan 09
|
90
|
+
<div class="path">README / Wed Jan 09 18:23:37 +0100 2008</div>
|
91
91
|
</div>
|
92
92
|
|
93
93
|
<h1>Bivouac</h1>
|
@@ -112,6 +112,15 @@ Bivouac is a simple generator for <a
|
|
112
112
|
href="http://code.whytheluckystiff.net/camping">camping</a>.
|
113
113
|
</p>
|
114
114
|
<h2>FEATURES/PROBLEMS:</h2>
|
115
|
+
<h3>0.1.2:</h3>
|
116
|
+
<ul>
|
117
|
+
<li>You can now use
|
118
|
+
|
119
|
+
<pre>
|
120
|
+
$ ruby script/server webrick [options]
|
121
|
+
</pre>
|
122
|
+
</li>
|
123
|
+
</ul>
|
115
124
|
<h3>0.1.1:</h3>
|
116
125
|
<ul>
|
117
126
|
<li>Mineur bug correction in postamble to be really ready for Rails 2.0 !!!!!
|
@@ -12,6 +12,11 @@ SimpleDaemon::WORKING_DIRECTORY = DIRNAME + "/../log/"
|
|
12
12
|
|
13
13
|
class <%= @appname %>Daemon < SimpleDaemon::Base
|
14
14
|
@@server = nil
|
15
|
+
@@use = nil
|
16
|
+
|
17
|
+
def self.use=(x)
|
18
|
+
@@use=x
|
19
|
+
end
|
15
20
|
|
16
21
|
def self.start
|
17
22
|
config = Bivouac::Environment.new( )
|
@@ -30,11 +35,15 @@ class <%= @appname %>Daemon < SimpleDaemon::Base
|
|
30
35
|
end
|
31
36
|
|
32
37
|
begin
|
33
|
-
|
38
|
+
if @@use.nil?
|
39
|
+
require 'mongrel/camping'
|
34
40
|
|
35
|
-
|
36
|
-
|
37
|
-
|
41
|
+
@@server = Mongrel::Camping.start( config.environment.address, config.environment.port, "/", <%= @appname %>)
|
42
|
+
puts "** <%= @appname %> is running at http://#{config.environment.address}:#{config.environment.port}"
|
43
|
+
@@server.run.join
|
44
|
+
else
|
45
|
+
raise LoadError, "I want to use WEBrick please!"
|
46
|
+
end
|
38
47
|
rescue LoadError => e
|
39
48
|
require 'webrick/httpserver'
|
40
49
|
require 'camping/webrick'
|
@@ -56,13 +65,27 @@ class <%= @appname %>Daemon < SimpleDaemon::Base
|
|
56
65
|
end
|
57
66
|
end
|
58
67
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
+
while ARGV.size > 0
|
69
|
+
deamonize = ARGV.shift
|
70
|
+
case deamonize
|
71
|
+
when 'webrick'
|
72
|
+
<%= @appname %>Daemon.use='webrick'
|
73
|
+
when '-d'
|
74
|
+
<%= @appname %>Daemon.daemonize
|
75
|
+
break
|
76
|
+
when '-h'
|
77
|
+
begin
|
78
|
+
require 'mongrel/camping'
|
79
|
+
puts "=> Booting Mongrel (use 'script/server webrick [options]' to force WEBrick)"
|
80
|
+
rescue LoadError => e
|
81
|
+
puts "=> Booting WEBrick"
|
82
|
+
end
|
83
|
+
puts "script/server [-d start|stop|restart] [-h]"
|
84
|
+
exit
|
85
|
+
when '--'
|
86
|
+
<%= @appname %>Daemon.start
|
87
|
+
break
|
88
|
+
else
|
89
|
+
puts "Ignore unknown option '#{deamonize}' !"
|
90
|
+
end
|
68
91
|
end
|