<commit_before># Advocate Defence Payments
##To test jenkins

[![Build Status](https://travis-ci.org/ministryofjustice/advocate-defence-payments.svg)](https://travis-ci.org/ministryofjustice/advocate-defence-payments)
[![Code Climate](https://codeclimate.com/github/ministryofjustice/crime-billing-online/badges/gpa.svg)](https://codeclimate.com/github/ministryofjustice/crime-billing-online)
[![Test Coverage](https://codeclimate.com/github/ministryofjustice/crime-billing-online/badges/coverage.svg)](https://codeclimate.com/github/ministryofjustice/crime-billing-online)

## Staging
[staging-adp.dsd.io](https://staging-adp.dsd.io)

## Demo
[demo-adp.dsd.io](https://demo-adp.dsd.io)

## Dev
[dev-adp.dsd.io](http://dev-adp.dsd.io)

## S3 for document storage

AWS S3 the **default** docuemnt storage mechanism. It is stubbed out
using webmock for all tests, but active in development mode.

```
adp_aws_access_key    = <AWS access key>  # Required
adp_secret_access_key = <AWS secret key>  # Required
adp_bucket_name       = <AWS bucket name> # Optional
```

The bucket name will default to `moj_cbo_documents_#{Rails.env}` if
`adp_bucket_name` is not set.

## Setting up development enviroment

Install gems

```
bundle install
```
Setup dummy users and data:

```
CASE_WORKER_PASSWORD='<PASSWORD>' ADMIN_PASSWORD='<PASSWORD>' ADVOCATE_PASSWORD='<PASSWORD>' rake db:drop db:create db:migrate db:seed claims:demo_data[1,1]
```
Run the application:

```
rails server
```
<commit_msg>add instructions for using claim import locally<commit_after># Advocate Defence Payments
##To test jenkins

[![Build Status](https://travis-ci.org/ministryofjustice/advocate-defence-payments.svg)](https://travis-ci.org/ministryofjustice/advocate-defence-payments)
[![Code Climate](https://codeclimate.com/github/ministryofjustice/crime-billing-online/badges/gpa.svg)](https://codeclimate.com/github/ministryofjustice/crime-billing-online)
[![Test Coverage](https://codeclimate.com/github/ministryofjustice/crime-billing-online/badges/coverage.svg)](https://codeclimate.com/github/ministryofjustice/crime-billing-online)

## Staging
[staging-adp.dsd.io](https://staging-adp.dsd.io)

## Demo
[demo-adp.dsd.io](https://demo-adp.dsd.io)

## Dev
[dev-adp.dsd.io](http://dev-adp.dsd.io)

## S3 for document storage

AWS S3 the **default** docuemnt storage mechanism. It is stubbed out
using webmock for all tests, but active in development mode.

```
adp_aws_access_key    = <AWS access key>  # Required
adp_secret_access_key = <AWS secret key>  # Required
adp_bucket_name       = <AWS bucket name> # Optional
```

The bucket name will default to `moj_cbo_documents_#{Rails.env}` if
`adp_bucket_name` is not set.

## Setting up development enviroment

Install gems

```
bundle install
```
Setup dummy users and data:

```
CASE_WORKER_PASSWORD='<PASSWORD>' ADMIN_PASSWORD='<PASSWORD>' ADVOCATE_PASSWORD='<PASSWORD>' rake db:drop db:create db:migrate db:seed claims:demo_data[1,1]
```
Run the application (claim import feature will not work in the default environment):

```
rails server
```

To use the Claim Import feature locally, the devunicorn environment must be used:

```
RAILS_ENV=devunicorn rails server
```


{'fraction_non_alphanumeric': 0.1410697528933375, 'fraction_numerical': 0.0025023459493274947, 'mean_word_length': 5.580246913580247, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 16, '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': '32436', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1137, 'n_words': 228}