<commit_before>[![Code Climate](https://codeclimate.com/repos/537fae616956806e630030c0/badges/44ece20df58646f706f7/gpa.png)](https://codeclimate.com/repos/537fae616956806e630030c0/feed)
[![Code Climate](https://codeclimate.com/repos/537fae616956806e630030c0/badges/44ece20df58646f706f7/coverage.png)](https://codeclimate.com/repos/537fae616956806e630030c0/feed)
[![Circle CI](https://circleci.com/gh/MobilityLabs/pdr-server/tree/master.png?circle-token=14a66f787d47b7a42850cbaf6e4fc873b31e4715)](https://circleci.com/gh/MobilityLabs/pdr-server)


#PDR Server
`pdr_server` is the API for the PD Redesign server. It also
consumes the `pdc_client` gem.  Which is an Angular client.

##Deploy
- run `bundle install` to ensure the latest `pdr_client` is being refrenced
- run `RAILS_ENV=production S3_KEY=i S3_SECRET=i bundle exec rake assets:precompile ROLLBAR_ENV=production ROLLBAR_TOKEN=xxxxx` to precompile assets
- Commit newly created assets to the repo and push to heroku
- push to heroku `git push heroku`.

##Specs
Specs are implemented with RSpec(3.x) and the `expect` syntax.
Specs can be run via `spring rspec` to run the test 
suite.
  - run `rake db:drop RAILS_ENV=test` to remove any test db
  - run `rake db:create RAILS_ENV=test` to remove any test db
  - Import an existing database run `psql "pdr_test" < db/data/pdr_dev.sql`
  - run `rake db:migrate RAILS_ENV=test`

This should be a one time database setup for the testing env<commit_msg>Better instructions for testing<commit_after>[![Code Climate](https://codeclimate.com/repos/537fae616956806e630030c0/badges/44ece20df58646f706f7/gpa.png)](https://codeclimate.com/repos/537fae616956806e630030c0/feed)
[![Code Climate](https://codeclimate.com/repos/537fae616956806e630030c0/badges/44ece20df58646f706f7/coverage.png)](https://codeclimate.com/repos/537fae616956806e630030c0/feed)
[![Circle CI](https://circleci.com/gh/MobilityLabs/pdr-server/tree/master.png?circle-token=14a66f787d47b7a42850cbaf6e4fc873b31e4715)](https://circleci.com/gh/MobilityLabs/pdr-server)


#PDR Server
`pdr_server` is the API for the PD Redesign server. It also
consumes the `pdc_client` gem.  Which is an Angular client.

##Deploy
- run `bundle install` to ensure the latest `pdr_client` is being refrenced
- run `RAILS_ENV=production S3_KEY=i S3_SECRET=i bundle exec rake assets:precompile ROLLBAR_ENV=production ROLLBAR_TOKEN=xxxxx` to precompile assets
- Commit newly created assets to the repo and push to heroku
- push to heroku `git push heroku`.

##Specs
Specs are implemented with RSpec(3.x) and the `expect` syntax.
Specs can be run via `spring rspec` to run the test 
suite.
  - run `rake db:drop RAILS_ENV=test` to remove any test db
  - run `rake db:create RAILS_ENV=test` to remove any test db
  - run `rake db:schema:load RAILS_ENV=test`
  - run `bundle exec rspec`

This should be a one time database setup for the testing env
{'fraction_non_alphanumeric': 0.1022884882108183, 'fraction_numerical': 0.09084604715672677, 'mean_word_length': 5.527149321266968, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3413481', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1052, 'n_words': 266}