Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
solipet committed Jan 20, 2017
1 parent ebd44a2 commit 71b6df6
Showing 1 changed file with 44 additions and 17 deletions.
61 changes: 44 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ This application houses the new and improved HUBZone Map for the Small Business
Requirements:
* rvm
- http://rvm.io/
* ruby 2.3.1
- `rvm install 2.3.1`
* ruby 2.3.3
- `rvm install 2.3.3`
* bundler 1.13.6
- `rvm @global do gem install -v 1.13.6 bundler`
* JavaScript interpreter (node)
* nvm
* `curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash`
* Install node
* `nvm install 5`
* bundler 1.12.5
- `gem install -v 1.12.5 bundler`
* PhantomJS 1.8.1, or newer (required for Capybara tests with Poltergeist)
* Mac
* `brew install phantomjs`
* Linux
* [download this tarball](https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2)
* Extract the tarball and copy `bin/phantomjs` into your `PATH`
* postgresql 9.5
* Mac
- I use [Postgres.app](http://postgresapp.com/)
Expand All @@ -30,31 +36,52 @@ Requirements:
* `echo 'export PGSQL_HOME=/usr/pgsql-9.5' >> ~/.bashrc`
* `echo 'export PATH=${PATH}:${PGSQL_HOME}/bin' >> ~/.bashrc`

After cloning the repo, run the following:
After cloning the repo, checkout out the `develop` branch and set up your environment:
```
git checkout develop
cp example.env .env
# edit .env to provide your postgresql user/password and, if necessary, override any defaults
```

Then run the following:
``` bash
cd hubzone_map
bundle install
bundle exec rake db:create
rails server
bundle exec rake db:create db:migrate
```

If the `bundle install` fails due to the pg gem, make sure you have the ENV vars above set in your shell.

To run the test suite, simply run:
* `rspec`
* or with verbose output: `rspec -f d`

To launch the map:
``` bash
cd hubzone_map
git checkout develop
git pull
rails server
```
Then point your browser to http://localhost:3000/

Note: for the map to "work", you will need to have the API and GeoServer running as well. See the README in the hubzone-api repository for details.

# Running Tests #

## Rspec Tests

To run the test suite, simply run:
```
rspec
```

or with verbose output:
```
rspec -f d
```

To view the coverage report, open
```
coverage/index.html
```

## Rubocop ##
```
rubocop -D
```

## Javascript Tests ##
### Teaspoon / Jasmine / Istanbul Unit and Coverage tests ###
Expand All @@ -67,12 +94,12 @@ npm install -g istanbul

To run Teaspoon for unit tests, run:
```
RAILS_ENV=test bundle exec teaspoon
bundle exec teaspoon
```

To include Istanbul coverage tests, run:
```
RAILS_ENV=test bundle exec teaspoon --coverage=default
bundle exec teaspoon --coverage=default
```

To view interactive report of test coverage, open:
Expand Down

0 comments on commit 71b6df6

Please sign in to comment.