site_generator 0.5 → 0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/USAGE +9 -15
- data/templates/apache.conf +7 -4
- metadata +2 -2
data/USAGE
CHANGED
@@ -1,24 +1,18 @@
|
|
1
1
|
NAME
|
2
|
-
|
2
|
+
site - creates a new site for a rails_product Rails application (see the rails_product gem)
|
3
3
|
|
4
4
|
SYNOPSIS
|
5
|
-
|
5
|
+
site [New Site Name]
|
6
6
|
|
7
|
-
|
7
|
+
You may want to create a site for a particular client that uses your shopping cart, for
|
8
|
+
example 'lauras_online_shoe_store_inc'
|
8
9
|
|
9
10
|
DESCRIPTION
|
10
|
-
This generator creates a
|
11
|
-
|
12
|
-
Included:
|
13
|
-
- a User model which uses sha1 encryption for passwords
|
14
|
-
- a Controller with signup, login, welcome and logoff actions
|
15
|
-
- a mixin which lets you easily add advanced authentication
|
16
|
-
features to your abstract base controller
|
17
|
-
- a user_model.sql with the minimal sql required to get the model to work.
|
18
|
-
- extensive unit and functional test cases to make sure nothing breaks.
|
11
|
+
This generator creates a new site directory in the sites/ folder of your rails_product
|
12
|
+
Rails application. It should be the same name as the database you will use for the site.
|
19
13
|
|
20
14
|
EXAMPLE
|
21
|
-
|
15
|
+
ruby script/generate site lauras_online_shoe_store_inc
|
22
16
|
|
23
|
-
This will generate
|
24
|
-
|
17
|
+
This will generate a new directory called 'lauras_online_shoe_store_inc' within the sites/
|
18
|
+
folder, with all of the necessary files and subdirectories for that site.
|
data/templates/apache.conf
CHANGED
@@ -20,14 +20,17 @@ Options +FollowSymLinks +ExecCGI
|
|
20
20
|
RewriteEngine On
|
21
21
|
RewriteRule ^$ index.html [QSA]
|
22
22
|
|
23
|
+
# Hack to fix mod_rewrite bug: we catch the incoming uri as an environment variable 'DOC'
|
24
|
+
RewriteRule "(.*)" "$1" [env=DOC:$1]
|
25
|
+
|
23
26
|
# If the requested file does not exist in SITE_ROOT/public...
|
24
|
-
RewriteCond %{
|
27
|
+
RewriteCond %{DOCUMENT_ROOT}%{ENV:DOC} !-f
|
25
28
|
# ... then split its full path up in to manageable pieces ...
|
26
|
-
RewriteCond %{REQUEST_FILENAME} ^(.*)/sites
|
29
|
+
RewriteCond %{REQUEST_FILENAME} ^(.*)/sites/.+$
|
27
30
|
# ... and check to see if the file exists in the RAILS_ROOT/public folder...
|
28
|
-
RewriteCond %1/public/%
|
31
|
+
RewriteCond %1/public/%{ENV:DOC} -f
|
29
32
|
# ... if so, rewrite our requested file to be the RAILS_ROOT one
|
30
|
-
RewriteRule ^(.*)$ /generic
|
33
|
+
RewriteRule ^(.*)$ /generic/%{ENV:DOC} [NS,L]
|
31
34
|
|
32
35
|
RewriteRule ^([^.]+)$ $1.html [QSA]
|
33
36
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.10
|
|
3
3
|
specification_version: 1
|
4
4
|
name: site_generator
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0.
|
7
|
-
date: 2005-
|
6
|
+
version: "0.6"
|
7
|
+
date: 2005-09-24
|
8
8
|
summary: Generates a Rails site in conjunction with the rails_product gem.
|
9
9
|
require_paths:
|
10
10
|
- lib
|