Skip to content

Commit

Permalink
updated README to reference the version of PostgreSQL we are using
Browse files Browse the repository at this point in the history
  • Loading branch information
solipet committed Dec 27, 2016
1 parent d46dacd commit ebd44a2
Showing 1 changed file with 43 additions and 10 deletions.
53 changes: 43 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HUBZone Map

This application will eventually house the new and improved HUBZone Map for the Small Business Administration.
This application houses the new and improved HUBZone Map for the Small Business Administration. All development is currently being done off of the `develop` branch.

Requirements:
* rvm
Expand All @@ -14,20 +14,20 @@ Requirements:
* `nvm install 5`
* bundler 1.12.5
- `gem install -v 1.12.5 bundler`
* postgresql 9.6
* postgresql 9.5
* Mac
- I use [Postgres.app](http://postgresapp.com/)
- could also use `brew install postgresql`
- set `PGSQL_HOME` to your installation dir
- e.g. `export PGSQL_HOME=/Applications/Postgres.app/Contents/Versions/9.6`
- e.g. `export PGSQL_HOME=/Applications/Postgres.app/Contents/Versions/9.5`
- ensure that the bin directory is in your path
- e.g. `export PATH=${PATH}:${PGSQL_HOME}/bin`
* Linux (rhel)
* Install:
* `yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-redhat96-9.6-3.noarch.rpm`
* `yum install postgresql96-server postgresql96-devel`
* `yum install https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-redhat95-9.5-3.noarch.rpm`
* `yum install postgresql95-server postgresql95-devel`
* Configure:
* `echo 'export PGSQL_HOME=/usr/pgsql-9.6' >> ~/.bashrc`
* `echo 'export PGSQL_HOME=/usr/pgsql-9.5' >> ~/.bashrc`
* `echo 'export PATH=${PATH}:${PGSQL_HOME}/bin' >> ~/.bashrc`

After cloning the repo, run the following:
Expand All @@ -44,12 +44,45 @@ To run the test suite, simply run:
* `rspec`
* or with verbose output: `rspec -f d`

To look at the map from the google-maps-api-playground repo, run the following:
To launch the map:
``` bash
cd hubzone_map
git checkout map-playground
git checkout develop
git pull
rails server
```
Then point your browser to http://localhost:3000/map/fake
Then point your browser to http://localhost:3000/

!
# Running Tests #


## Javascript Tests ##
### Teaspoon / Jasmine / Istanbul Unit and Coverage tests ###
Teaspoon is used for Javascript testing and coverage. It runs Jasmine for unit and integration tests and Istanbul for test coverage.

First install Istanbul:
```
npm install -g istanbul
```

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

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

To view interactive report of test coverage, open:
```
coverage/default/index.html
```

### JSHint Lint Tests ###
Tring to use this JSHint gem [JSHint](https://github.com/damian/jshint), per its docs:

Add `gem 'jshint'` to the Gemfile under `group :development, :test`

Run `bundle` to install, then run `bundle exec rake jshint` to run test. Currently this is running the linter then causing a rake error, which appears to be an ongoing issue with this gem.

0 comments on commit ebd44a2

Please sign in to comment.