From ccd10c27d343a1a96400b914827cb0fe3f0d1b65 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 10 Jul 2012 17:43:26 -0400
Subject: [PATCH] CSS tweaks

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

diff --git a/docs/01_setup.mkd b/docs/01_setup.mkd
index 68c1025..07f4b00 100644
--- a/docs/01_setup.mkd
+++ b/docs/01_setup.mkd
@@ -398,6 +398,37 @@
 
 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 [Ivy](http://ant.apache.org/ivy) 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 allows custom repository string fields to be defined in `gitblit.properties` or `web.xml`.  Entry textfields are automatically created for these fields in the Edit Repository page of Gitblit and the Edit Repository dialog of the Gitblit Manager.  These fields are accessible from your Groovy hook scripts as
+
+    repository.customFields.myField
+
+This feature allows you to customize the behavior of your hook scripts without hard-coding values in the hook scripts themselves.
+
 ### Pre-Receive
 
 Pre-Receive scripts execute after the pushed objects have all been written to the Git repository but before the refs have been updated to point to these new objects.

--
Gitblit v1.9.1