From f22a0633d08e38ac4bf92b5165a708e11b4d6598 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 03 Oct 2012 17:31:37 -0400
Subject: [PATCH] Implemented support for toggling User.canFork in Manager

---
 docs/01_setup.mkd |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/docs/01_setup.mkd b/docs/01_setup.mkd
index c8cd09d..fa1bcd9 100644
--- a/docs/01_setup.mkd
+++ b/docs/01_setup.mkd
@@ -8,7 +8,11 @@
 Open `web.xml` in your favorite text editor and make sure to review and set:
     - &lt;context-parameter&gt; *git.repositoryFolder* (set the full path to your repositories folder)
     - &lt;context-parameter&gt; *groovy.scriptsFolder* (set the full path to your Groovy hook scripts folder)
+    - &lt;context-parameter&gt; *groovy.grapeFolder* (set the full path to your Groovy Grape artifact cache)
+    - &lt;context-parameter&gt; *web.projectsFile* (set the full path to your projects metadata file)
     - &lt;context-parameter&gt; *realm.userService* (set the full path to `users.conf`)
+    - &lt;context-parameter&gt; *git.packedGitLimit* (set larger than the size of your largest repository)
+    - &lt;context-parameter&gt; *git.streamFileThreshold* (set larger than the size of your largest committed file)
 5. You may have to restart your servlet container. 
 6. Open your browser to <http://localhost/gitblit> or whatever the url should be.
 7. Enter the default administrator credentials: **admin / admin** and click the *Login* button  
@@ -22,10 +26,13 @@
 Open `gitblit.properties` in your favorite text editor and make sure to review and set:
     - *git.repositoryFolder* (path may be relative or absolute)
     - *groovy.scriptsFolder* (path may be relative or absolute)
+    - *groovy.grapeFolder* (path may be relative or absolute)
     - *server.tempFolder* (path may be relative or absolute)
     - *server.httpPort* and *server.httpsPort*
     - *server.httpBindInterface* and *server.httpsBindInterface*  
     **https** is strongly recommended because passwords are insecurely transmitted form your browser/git client using Basic authentication!
+    - *git.packedGitLimit* (set larger than the size of your largest repository)
+    - *git.streamFileThreshold* (set larger than the size of your largest committed file)
 3. Execute `gitblit.cmd` or `java -jar gitblit.jar` from a command-line
 4. Wait a minute or two while all dependencies are downloaded and your self-signed *localhost* certificate is generated.  
     Please see the section titled **Creating your own Self-Signed Certificate** to generate a certificate for *your hostname*.
@@ -149,6 +156,15 @@
 
 # If your httpd frontend is https but you are proxying http Gitblit WAR or GO
 #Header edit Location &#94;http://([&#94;&#8260;]+)/gitblit/ https://&#36;1/gitblit/
+
+# Additionally you will want to tell Gitblit the original scheme and port
+#RequestHeader set X-Forwarded-Proto https
+#RequestHeader set X-Forwarded-Port 443
+
+# If you are using subdomain proxying then you will want to tell Gitblit the appropriate
+# context path for your repository url.
+# If you are not using subdomain proxying, then ignore this setting.
+#RequestHeader set X-Forwarded-Context /
 
 #ProxyPass /gitblit ajp://localhost:8009/gitblit
 %ENDCODE%  
@@ -398,6 +414,27 @@
 
 Hook contributions and improvements are welcome.
 
+### Grapes
+
+*SINCE 1.0.0*
+
+[Grape](http://groovy.codehaus.org/Grape) lets you quickly add maven repository dependencies to your Groovy hook script.  
+
+<blockquote>Grape (The Groovy Adaptable Packaging Engine or Groovy Advanced Packaging Engine) is the infrastructure enabling the grab() calls in Groovy, a set of classes leveraging <a href="http://ant.apache.org/ivy">Ivy</a> to allow for a repository driven module system for Groovy. This allows a developer to write a script with an essentially arbitrary library requirement, and ship just the script. Grape will, at runtime, download as needed and link the named libraries and all dependencies forming a transitive closure when the script is run from existing repositories such as Ibiblio, Codehaus, and java.net.</blockquote>
+
+%BEGINCODE%
+// create and use a primitive array
+import org.apache.commons.collections.primitives.ArrayIntList
+
+@Grab(group='commons-primitives', module='commons-primitives', version='1.0')
+def createEmptyInts() { new ArrayIntList() }
+
+def ints = createEmptyInts()
+ints.add(0, 42)
+assert ints.size() == 1
+assert ints.get(0) == 42
+%ENDCODE%
+
 ### Custom Fields
 
 *SINCE 1.0.0*

--
Gitblit v1.9.1