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 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 17:49:05 +0100
1
+ Wed, 09 Jan 2008 18:24:26 +0100
@@ -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 17:48:08 +0100 2008</div>
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
- require 'mongrel/camping'
38
+ if @@use.nil?
39
+ require 'mongrel/camping'
34
40
 
35
- @@server = Mongrel::Camping.start( config.environment.address, config.environment.port, "/", <%= @appname %>)
36
- puts "** <%= @appname %> is running at http://#{config.environment.address}:#{config.environment.port}"
37
- @@server.run.join
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
- deamonize = ARGV.shift
60
- case deamonize
61
- when '-d'
62
- <%= @appname %>Daemon.daemonize
63
- when '-h'
64
- puts "script/server [-d start|stop|restart] [-h]"
65
- exit
66
- else
67
- <%= @appname %>Daemon.start
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
@@ -3,4 +3,4 @@ require 'rubygems'
3
3
  app = File.dirname(__FILE__) + "/../app/<%= @conf.appdir %>.rb"
4
4
 
5
5
  ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
6
- system "ruby #{app} #{ARGV.join(' ')}"
6
+ system "ruby #{app} #{ARGV.join(' ')} --"
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: bivouac
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
6
+ version: 0.1.2
7
7
  date: 2008-01-09 00:00:00 +01:00
8
8
  summary: Developpe with Camping like you do with Rails
9
9
  require_paths: