bivouac 0.0.9 → 0.1.0
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 +5 -1
- data/bin/bivouac +1 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +11 -2
- data/lib/bivouac.rb +14 -0
- data/lib/bivouac/template/application/helpers_goh.rb +2 -1
- data/lib/bivouac/template/application/postamble.rb +0 -1
- data/lib/bivouac/template/application_erb.rb +9 -5
- data/lib/bivouac/template/application_goh.rb +10 -6
- data/lib/bivouac/template/generate/scaffold_controller_list.rb +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -12,8 +12,12 @@ Bivouac is a simple generator for camping[http://code.whytheluckystiff.net/campi
|
|
12
12
|
|
13
13
|
== FEATURES/PROBLEMS:
|
14
14
|
|
15
|
+
=== 0.1.0:
|
16
|
+
* Add plugins support. See will_paginate plugin for Bivouac.
|
17
|
+
* Ready for Rails 2.0 !!!!
|
18
|
+
|
15
19
|
=== 0.0.9:
|
16
|
-
* Upgrade to simple-daemon >=0.1.2
|
20
|
+
* Upgrade to simple-daemon >= 0.1.2
|
17
21
|
* Better migration support! And migrate is now migration ! That's better no ?
|
18
22
|
* Add MySQL, PostgreSQL, ... support. See
|
19
23
|
$ bivouac -h
|
data/bin/bivouac
CHANGED
@@ -115,6 +115,7 @@ createDir( "#{@conf.appdir}/log" )
|
|
115
115
|
createDir( "#{@conf.appdir}/script" )
|
116
116
|
createDir( "#{@conf.appdir}/test" )
|
117
117
|
createDir( "#{@conf.appdir}/lib" )
|
118
|
+
createDir( "#{@conf.appdir}/plugins" )
|
118
119
|
|
119
120
|
createFile( "#{@conf.appdir}/config/environment.rb" ) { |io|
|
120
121
|
io.puts template( "environment" )
|
data/doc/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue, 23 Oct 2007 16:11:26 +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 / Tue Oct 23 15:31:10 +0200 2007</div>
|
91
91
|
</div>
|
92
92
|
|
93
93
|
<h1>Bivouac</h1>
|
@@ -112,9 +112,18 @@ 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.0:</h3>
|
116
|
+
<ul>
|
117
|
+
<li>Add plugins support. See will_paginate plugin for Bivouac.
|
118
|
+
|
119
|
+
</li>
|
120
|
+
<li>Ready for Rails 2.0 !!!!
|
121
|
+
|
122
|
+
</li>
|
123
|
+
</ul>
|
115
124
|
<h3>0.0.9:</h3>
|
116
125
|
<ul>
|
117
|
-
<li>Upgrade to simple-daemon >=0.1.2
|
126
|
+
<li>Upgrade to simple-daemon >= 0.1.2
|
118
127
|
|
119
128
|
</li>
|
120
129
|
<li>Better migration support! And migrate is now migration ! That‘s
|
data/lib/bivouac.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
module Bivouac
|
2
|
+
@@_plugins_view_helpers = []
|
3
|
+
|
2
4
|
def files( xPath, *options, &block )
|
3
5
|
path = File.dirname($0) + "/" + xPath.to_s + "/*.rb"
|
4
6
|
if ENV['BIVOUAC_ROOT']
|
@@ -17,4 +19,16 @@ module Bivouac
|
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
22
|
+
|
23
|
+
def addViewHelperModule( m )
|
24
|
+
@@_plugins_view_helpers << m
|
25
|
+
end
|
26
|
+
|
27
|
+
def viewHelperModule
|
28
|
+
@@_plugins_view_helpers
|
29
|
+
end
|
30
|
+
|
31
|
+
def filePath( from, *data )
|
32
|
+
File.join File.expand_path(File.dirname(from)), data
|
33
|
+
end
|
20
34
|
end
|
@@ -21,7 +21,6 @@ class <%= @appname %>Daemon < SimpleDaemon::Base
|
|
21
21
|
database_connection[:database] = DIRNAME + "/../" + database_connection[:database]
|
22
22
|
end
|
23
23
|
<%= @appname %>::Models::Base.establish_connection database_connection
|
24
|
-
# :adapter => 'sqlite3', :database => DIRNAME + "/../db/<%= @appname %>.db"
|
25
24
|
<%= @appname %>::Models::Base.logger = Logger.new(DIRNAME + "/../log/<%= @appname %>.log")
|
26
25
|
<%= @appname %>::Models::Base.threaded_connections = false
|
27
26
|
<%= @appname %>.create if <%= @appname %>.respond_to? :create
|
@@ -7,9 +7,6 @@
|
|
7
7
|
# Copyright (c) <%= Time.now.year %> __My__. All rights reserved.
|
8
8
|
#
|
9
9
|
|
10
|
-
LIB = File.join File.expand_path(File.dirname(__FILE__)), '..', 'lib'
|
11
|
-
$:.unshift( LIB )
|
12
|
-
|
13
10
|
require 'rubygems'
|
14
11
|
require 'camping'
|
15
12
|
require 'camping/session'
|
@@ -18,6 +15,13 @@ require 'bivouac'
|
|
18
15
|
|
19
16
|
include Bivouac
|
20
17
|
|
18
|
+
# Load libs
|
19
|
+
LIB = filePath( __FILE__, '..', 'lib' )
|
20
|
+
$:.unshift( LIB )
|
21
|
+
|
22
|
+
# Load plugins
|
23
|
+
Dir.glob( filePath( __FILE__, '../plugins/**/init.rb' ) ).each { |p| require p }
|
24
|
+
|
21
25
|
begin
|
22
26
|
require 'erubis'
|
23
27
|
ERB = Erubis::Eruby
|
@@ -49,8 +53,8 @@ files( 'controllers', :except => [File.basename(__FILE__)] ) { |file| require( f
|
|
49
53
|
|
50
54
|
module <%= @appname %>::Controllers
|
51
55
|
class Public < R '/public/(.+)'
|
52
|
-
PATH =
|
53
|
-
|
56
|
+
PATH = filePath( __FILE__ )
|
57
|
+
|
54
58
|
def get file
|
55
59
|
if file.include? '..'
|
56
60
|
@status = '403'
|
@@ -7,20 +7,24 @@
|
|
7
7
|
# Copyright (c) <%= Time.now.year %> __My__. All rights reserved.
|
8
8
|
#
|
9
9
|
|
10
|
-
LIB = File.join File.expand_path(File.dirname(__FILE__)), '..', 'lib'
|
11
|
-
$:.unshift( LIB )
|
12
|
-
|
13
10
|
require 'rubygems'
|
14
11
|
require 'camping'
|
15
12
|
require 'camping/session'
|
16
13
|
require 'mime/types'
|
17
14
|
require 'bivouac'
|
18
15
|
|
16
|
+
include Bivouac
|
17
|
+
|
18
|
+
# Load libs
|
19
|
+
LIB = filePath( __FILE__, '..', 'lib' )
|
20
|
+
$:.unshift( LIB )
|
21
|
+
|
22
|
+
# Load plugins
|
23
|
+
Dir.glob( filePath( __FILE__, '../plugins/**/init.rb' ) ).each { |p| require p }
|
24
|
+
|
19
25
|
# Indent the code -- See http://code.whytheluckystiff.net/markaby/wiki/TipsAndTrickery
|
20
26
|
Markaby::Builder.set(:indent, 2)
|
21
27
|
|
22
|
-
include Bivouac
|
23
|
-
|
24
28
|
Camping.goes :<%= @appname %>
|
25
29
|
|
26
30
|
# Load helpers from app/helpers
|
@@ -40,7 +44,7 @@ files( 'controllers', :except => [File.basename(__FILE__)] ) { |file| require( f
|
|
40
44
|
|
41
45
|
module <%= @appname %>::Controllers
|
42
46
|
class Public < R '/public/(.+)'
|
43
|
-
PATH =
|
47
|
+
PATH = filePath( __FILE__ )
|
44
48
|
|
45
49
|
def get file
|
46
50
|
if file.include? '..'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module <%= @generation_app_name %>::Controllers
|
2
2
|
class List<%= @generation_class_name %> < R '/<%= @generation_view_name %>'
|
3
3
|
def get
|
4
|
-
@<%= @generation_view_name.pluralize %> = Models::<%= @generation_class_name %>.
|
4
|
+
@<%= @generation_view_name.pluralize %> = Models::<%= @generation_class_name %>.find( :all )
|
5
5
|
render :list_<%= @generation_view_name %>
|
6
6
|
end
|
7
7
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: bivouac
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0
|
7
|
-
date: 2007-10-
|
6
|
+
version: 0.1.0
|
7
|
+
date: 2007-10-23 00:00:00 +02:00
|
8
8
|
summary: Developpe with Camping like you do with Rails
|
9
9
|
require_paths:
|
10
10
|
- lib
|