Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
The Mongo instructions did work, but the instructions were
a little bit unclear.  I also noticed that the db directory
has all the scripts needed to re-create the site.  Hopefully
this helps.
  • Loading branch information
dsyer committed Jan 22, 2013
1 parent 6793669 commit bfc32ce
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ Questions and discussions at the [Nabble Forum](http://forum.gvmtool.net).

Open your favourite terminal and enter the following:

curl -s get.gvmtool.net | bash
$ curl -s get.gvmtool.net | bash

If the environment needs tweaking for GVM to be installed, the installer will prompt you accordingly and ask you to restart.

## Running the Cucumber Features

All GVM's tests are written in Cucumber and can be found under `src/test/cucumber/gvm`. These can be run with Gradle by running the following command:

./gradlew
$ ./gradlew

or to see the output

./gradlew -i
$ ./gradlew -i

__Please enusre that the JAVA_HOME environment variable set to JDK 1.7 on you system!__

Expand All @@ -36,10 +36,11 @@ Mac users can add the following line to their `~/.bash_profile` file to set this

It is useful to run the server locally for development purposes. Working installations of MongoDB and vert.x are required to get going. GVM can be used to install vert.x, otherwise install it manually as described on the [install page](http://vertx.io/install.html).

gvm install vert.x
$ gvm install vert.x

Next, install MongoDB as described [here](http://www.mongodb.org/downloads). After installing, the database needs to be primed with some data. The following lines may be run with `mongod` running as a separate process.

$ cd /path/to/gvm
$ mongo gvm
> db.candidates.insert({candidate:"groovy", default:"2.0.6"})
> db.versions.insert({candidate:"groovy", version:"2.0.5", url:"http://dist.groovy.codehaus.org/distributions/groovy-binary-2.0.5.zip"})
Expand All @@ -48,11 +49,19 @@ Next, install MongoDB as described [here](http://www.mongodb.org/downloads). Aft
This will:

* create a new `gvm` database
* the Groovy candidate in the `candidates` collection defaulting to version 2.0.6
* new versions in the `versions` collection.
* add some candidate and version data to the database

Add any other candidates that you might require.

Next, prepare the local GVM environment by building and starting the server.

$ ./gradlew
$ ./run.sh

This will start the server on localhost:8080

### Customizing the Database Location

The database may be configured in the `mongo.json` file in the root folder of the project. If no file is found, it will assume sensible defaults for a local mongodb installation. The file should be structured as follows:

{
Expand All @@ -64,17 +73,11 @@ The database may be configured in the `mongo.json` file in the root folder of th
"db_name":"dbname"
}

Next, prepare the local GVM environment by stepping into the cloned `gvm` folder, then building and starting the server.

cd /path/to/gvm
./gradlew
./run.sh

This will start the server on localhost:8080
### Making the Local Installation the Default

To make your local GVM installation work with your local server, run the following commands:

./gradlew install
source ~/.gvm/bin/gvm-init.sh
$ ./gradlew install
$ source ~/.gvm/bin/gvm-init.sh


0 comments on commit bfc32ce

Please sign in to comment.