bivouac 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README +8 -1
- data/bin/bivouac +17 -4
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +17 -1
- data/lib/bivouac/template/application/postamble.rb +4 -0
- data/lib/bivouac/template/application_goh.rb +1 -1
- data/lib/bivouac/template/console.rb +1 -1
- data/lib/bivouac/template/environment.rb +9 -0
- data/lib/bivouac/template/generate/create.rb +1 -1
- data/lib/bivouac/template/server.rb +1 -1
- data/lib/bivouac/template/static/create_for_sessions.rb +13 -0
- metadata +9 -3
data/README
CHANGED
@@ -16,10 +16,17 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
|
|
16
16
|
* Roo's Tent
|
17
17
|
* Scaffold's Tent
|
18
18
|
* Tooltip
|
19
|
-
* Will Paginate
|
19
|
+
* Will Paginate
|
20
20
|
|
21
21
|
== FEATURES/PROBLEMS:
|
22
22
|
|
23
|
+
=== 0.2.5:
|
24
|
+
|
25
|
+
* Bugs corrections for DB sessions
|
26
|
+
* New parameter in environment.rb to force the use of a specific server: :server_force
|
27
|
+
* Bug correction when loading create and database schema
|
28
|
+
* Humanize app path
|
29
|
+
|
23
30
|
=== 0.2.4:
|
24
31
|
|
25
32
|
* Add rc file for script/console
|
data/bin/bivouac
CHANGED
@@ -14,6 +14,10 @@ require 'yaml'
|
|
14
14
|
require 'bivouac/template'
|
15
15
|
include Bivouac::Template
|
16
16
|
|
17
|
+
class << Gem; attr_accessor :loaded_specs; end
|
18
|
+
@BIVOUAC_VERSION = Gem.loaded_specs['bivouac'].version
|
19
|
+
@CAMPING_VERSION = Gem.loaded_specs['camping'].version
|
20
|
+
|
17
21
|
# Default configuration
|
18
22
|
database_configuration = {
|
19
23
|
:adapter => "sqlite3"
|
@@ -89,7 +93,8 @@ opts = OptionParser.new do |opts|
|
|
89
93
|
# Another typical switch to print the version.
|
90
94
|
opts.on_tail("-v", "--version", "Show version") do
|
91
95
|
class << Gem; attr_accessor :loaded_specs; end
|
92
|
-
puts
|
96
|
+
puts "Bivouac version #{@BIVOUAC_VERSION}"
|
97
|
+
puts "Camping version #{@CAMPING_VERSION}"
|
93
98
|
exit
|
94
99
|
end
|
95
100
|
end
|
@@ -107,7 +112,8 @@ name = ARGV.dup
|
|
107
112
|
# Add APP name to config
|
108
113
|
@conf.appname = name[0].classify
|
109
114
|
# Add APP path to config
|
110
|
-
@conf.appdir = @conf.appname.underscore
|
115
|
+
@conf.appdir = name[0] # @conf.appname.underscore
|
116
|
+
@conf.appfile = @conf.appname.underscore
|
111
117
|
|
112
118
|
# Add DataBase configuration to config
|
113
119
|
if database_configuration[:adapter] =~ /sqlite/
|
@@ -154,7 +160,7 @@ createFile( "#{@conf.appdir}/config/postamble.rb" ) { |io|
|
|
154
160
|
}
|
155
161
|
|
156
162
|
# Create Application file
|
157
|
-
createFile( "#{@conf.appdir}/app/#{@conf.
|
163
|
+
createFile( "#{@conf.appdir}/app/#{@conf.appfile}.rb" ) { |io|
|
158
164
|
io.puts template( "application_#{@conf.orgtype.downcase}" )
|
159
165
|
}
|
160
166
|
|
@@ -219,4 +225,11 @@ createFile( "#{@conf.appdir}/app/views/not_found.rb" ) { |io|
|
|
219
225
|
# Create default_layout view
|
220
226
|
createFile( "#{@conf.appdir}/app/views/layouts/default_layout.rb" ) { |io|
|
221
227
|
io.puts template( "static/default_layout_view" )
|
222
|
-
}
|
228
|
+
}
|
229
|
+
|
230
|
+
# Create create.rb if we use DB Sessions
|
231
|
+
if @conf.session.to_s == "db"
|
232
|
+
createFile( "#{@conf.appdir}/db/create.rb" ) { |io|
|
233
|
+
io.puts template( "static/create_for_sessions" )
|
234
|
+
}
|
235
|
+
end
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sun, 29 Jun 2008 18:53:32 +0200
|
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 /
|
90
|
+
<div class="path">README / Sun Jun 29 18:52:22 +0200 2008</div>
|
91
91
|
</div>
|
92
92
|
|
93
93
|
<h1>Bivouac</h1>
|
@@ -130,6 +130,22 @@ href="http://code.whytheluckystiff.net/camping">camping</a>.
|
|
130
130
|
</li>
|
131
131
|
</ul>
|
132
132
|
<h2>FEATURES/PROBLEMS:</h2>
|
133
|
+
<h3>0.2.5:</h3>
|
134
|
+
<ul>
|
135
|
+
<li>Bugs corrections for DB sessions
|
136
|
+
|
137
|
+
</li>
|
138
|
+
<li>New parameter in environment.rb to force the use of a specific server:
|
139
|
+
:server_force
|
140
|
+
|
141
|
+
</li>
|
142
|
+
<li>Bug correction when loading create and database schema
|
143
|
+
|
144
|
+
</li>
|
145
|
+
<li>Humanize app path
|
146
|
+
|
147
|
+
</li>
|
148
|
+
</ul>
|
133
149
|
<h3>0.2.4:</h3>
|
134
150
|
<ul>
|
135
151
|
<li>Add rc file for script/console
|
@@ -60,6 +60,10 @@ class <%= @conf.appname %>Daemon < SimpleDaemon::Base
|
|
60
60
|
## Load configuration
|
61
61
|
config = Bivouac::Environment.new( )
|
62
62
|
|
63
|
+
if config.environment.server_force
|
64
|
+
@@force_use = config.environment.server_force
|
65
|
+
end
|
66
|
+
|
63
67
|
## Initialize database connection
|
64
68
|
database_connection = config.environment.db
|
65
69
|
if database_connection[:adapter] =~ /sqlite/
|
@@ -48,7 +48,7 @@ files( 'helpers' ) { |file| require( file ) }
|
|
48
48
|
files( 'models' ) { |file| require( file ) }
|
49
49
|
|
50
50
|
# Load create and database schema from db/migrate
|
51
|
-
files( '../db
|
51
|
+
files( '../db' ) { |file| require( file ) }
|
52
52
|
|
53
53
|
# Load views from app/views
|
54
54
|
files( 'views' ) { |file| require( file ) }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
-
app = File.dirname(__FILE__) + "/../app/<%= @conf.
|
3
|
+
app = File.dirname(__FILE__) + "/../app/<%= @conf.appfile %>.rb"
|
4
4
|
|
5
5
|
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
6
6
|
system "ruby #{app} -c #{ARGV.join(' ')}"
|
@@ -21,7 +21,12 @@ module Bivouac
|
|
21
21
|
# Application port
|
22
22
|
:port => <%= @conf.port %>,
|
23
23
|
|
24
|
+
# To force using a specific server, uncomment the line below
|
25
|
+
# You can use "mongrel", "thin" or "webrick"
|
26
|
+
#:server_force => "mongrel",
|
27
|
+
|
24
28
|
# Database configuration
|
29
|
+
# DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
|
25
30
|
:db => open("#{File.dirname( __FILE__ )}/database.yml") {|f| YAML.load(f)},
|
26
31
|
|
27
32
|
# Name of the application
|
@@ -32,6 +37,10 @@ module Bivouac
|
|
32
37
|
# DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
|
33
38
|
:appdir => "<%= @conf.appdir %>",
|
34
39
|
|
40
|
+
# File of the application
|
41
|
+
# DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
|
42
|
+
:appfile => "<%= @conf.appfile %>",
|
43
|
+
|
35
44
|
# Organisation type of the application
|
36
45
|
# DO NOT CHANGE IT, OR YOU REALLY KNOW WHAT YOU ARE DOING!
|
37
46
|
:orgtype => "<%= @conf.orgtype %>",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
-
app = File.dirname(__FILE__) + "/../app/<%= @conf.
|
3
|
+
app = File.dirname(__FILE__) + "/../app/<%= @conf.appfile %>.rb"
|
4
4
|
|
5
5
|
ENV['BIVOUAC_ROOT'] = File.expand_path( File.dirname(__FILE__) + "/../" )
|
6
6
|
system "ruby #{app} #{ARGV.join(' ')} --"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#
|
2
|
+
# Project <%= @conf.appname %>
|
3
|
+
#
|
4
|
+
# Created using bivouac on <%= Time.now %>.
|
5
|
+
# Copyright (c) <%= Time.now.year %> __My__. All rights reserved.
|
6
|
+
#
|
7
|
+
|
8
|
+
def <%= @conf.appname %>.create
|
9
|
+
<% if @conf.session.to_s == "db" %>
|
10
|
+
Camping::Models::Session.create_schema
|
11
|
+
<% end %>
|
12
|
+
<%= @conf.appname %>::Models.create_schema
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bivouac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Gr\xC3\xA9goire Lejeune"
|
@@ -9,11 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-06-
|
12
|
+
date: 2008-06-29 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: camping
|
17
|
+
type: :runtime
|
17
18
|
version_requirement:
|
18
19
|
version_requirements: !ruby/object:Gem::Requirement
|
19
20
|
requirements:
|
@@ -23,6 +24,7 @@ dependencies:
|
|
23
24
|
version:
|
24
25
|
- !ruby/object:Gem::Dependency
|
25
26
|
name: mime-types
|
27
|
+
type: :runtime
|
26
28
|
version_requirement:
|
27
29
|
version_requirements: !ruby/object:Gem::Requirement
|
28
30
|
requirements:
|
@@ -32,6 +34,7 @@ dependencies:
|
|
32
34
|
version:
|
33
35
|
- !ruby/object:Gem::Dependency
|
34
36
|
name: extra
|
37
|
+
type: :runtime
|
35
38
|
version_requirement:
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
@@ -41,6 +44,7 @@ dependencies:
|
|
41
44
|
version:
|
42
45
|
- !ruby/object:Gem::Dependency
|
43
46
|
name: simple-daemon
|
47
|
+
type: :runtime
|
44
48
|
version_requirement:
|
45
49
|
version_requirements: !ruby/object:Gem::Requirement
|
46
50
|
requirements:
|
@@ -50,6 +54,7 @@ dependencies:
|
|
50
54
|
version:
|
51
55
|
- !ruby/object:Gem::Dependency
|
52
56
|
name: mosquito
|
57
|
+
type: :runtime
|
53
58
|
version_requirement:
|
54
59
|
version_requirements: !ruby/object:Gem::Requirement
|
55
60
|
requirements:
|
@@ -162,6 +167,7 @@ files:
|
|
162
167
|
- lib/bivouac/template/static/camping.png
|
163
168
|
- lib/bivouac/template/static/console_rc.rb
|
164
169
|
- lib/bivouac/template/static/controls.js
|
170
|
+
- lib/bivouac/template/static/create_for_sessions.rb
|
165
171
|
- lib/bivouac/template/static/default_layout_view.rb
|
166
172
|
- lib/bivouac/template/static/dragdrop.js
|
167
173
|
- lib/bivouac/template/static/effects.js
|
@@ -344,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
344
350
|
requirements: []
|
345
351
|
|
346
352
|
rubyforge_project: bivouac
|
347
|
-
rubygems_version: 1.
|
353
|
+
rubygems_version: 1.2.0
|
348
354
|
signing_key:
|
349
355
|
specification_version: 2
|
350
356
|
summary: Developpe with Camping like you do with Rails
|