<commit_before># AOZ Voluntary Platform

[master](https://github.com/panter/aoz-003/tree/master): [![Build Status](https://travis-ci.org/panter/aoz-003.svg?branch=master)](https://travis-ci.org/panter/aoz-003) |
[develop](https://github.com/panter/aoz-003): [![Build Status](https://travis-ci.org/panter/aoz-003.svg?branch=develop)](https://travis-ci.org/panter/aoz-003)

Ruby version: 2.4.2

## Table of content

1. [Dependencies](#dependencies)
1. [Developer Dependencies](#developer-dependencies)
1. [User seeds for development](#user-seeds-for-development)
1. [Create initial superadmin account](#create-initial-superadmin-account)
1. [Sort locale yaml files](#sort-locale-yaml-files)
1. [Importing from access db with rake task](#importing-from-access-db-with-rake-task)
1. [LICENSE](#license)

### Dependencies

- Postgresql
- [ImageMagick](http://www.imagemagick.org/) (for [paperclip](https://github.com/thoughtbot/paperclip))

### Developer Dependencies

- [overcommit](https://github.com/brigade/overcommit)
- [rubocop](https://github.com/bbatsov/rubocop)

### User seeds for development

Use `rails db:seed` to get these users:

- superadmin
  - email: <EMAIL>
  - password: <PASSWORD>
- social_worker
  - email: <EMAIL>
  - password: <PASSWORD>
- department_manager
  - email: <EMAIL>
  - password: <PASSWORD>
- volunteer
  - email: <EMAIL>
  - password: <PASSWORD>

### Create initial superadmin account

Sends an invitation email to the email address, so that the account can be activated:

```bash
$  rails setup:superadmin email=<EMAIL>
```

Ready to use with standard Password `<PASSWORD>` (No activation needed):

**Only use this on testing servers that are unable to send emails (_security risk_)**

```bash
$  rails setup:superadmin_initialized email=<EMAIL>
```

### Sort locale yaml files

Run this task, in order to sort the locale files alphabetically.

```bash
$  rails i18n:sort
```

### Importing from access db with rake task

Run in the command line:

```bash
$  rails access:import file=path/to/access_file.accdb
```

### LICENSE

All the sources created are made available under the terms
of the GNU Affero General Public License (GNU AGPLv3).
See the GNU-AGPL-3.0.txt file for more details.<commit_msg>add description on how to run tests in README.md<commit_after># AOZ Voluntary Platform

[master](https://github.com/panter/aoz-003/tree/master): [![Build Status](https://travis-ci.org/panter/aoz-003.svg?branch=master)](https://travis-ci.org/panter/aoz-003) |
[develop](https://github.com/panter/aoz-003): [![Build Status](https://travis-ci.org/panter/aoz-003.svg?branch=develop)](https://travis-ci.org/panter/aoz-003)

Ruby version: 2.4.2

## Table of content

1. [Dependencies](#dependencies)
1. [Developer Dependencies](#developer-dependencies)
1. [User seeds for development](#user-seeds-for-development)
1. [Create initial superadmin account](#create-initial-superadmin-account)
1. [Sort locale yaml files](#sort-locale-yaml-files)
1. [Importing from access db with rake task](#importing-from-access-db-with-rake-task)
1. [Run model, integration and controller tests](#run-model-integration-and-controller-tests)
1. [Run system (acceptance) tests](#run-system-acceptance-tests)
1. [LICENSE](#license)

### Dependencies

- Postgresql
- [ImageMagick](http://www.imagemagick.org/) (for [paperclip](https://github.com/thoughtbot/paperclip))

### Developer Dependencies

- [overcommit](https://github.com/brigade/overcommit)
- [rubocop](https://github.com/bbatsov/rubocop)

### User seeds for development

Use `rails db:seed` to get these users:

- superadmin
  - email: <EMAIL>
  - password: <PASSWORD>
- social_worker
  - email: <EMAIL>
  - password: <PASSWORD>
- department_manager
  - email: <EMAIL>
  - password: <PASSWORD>
- volunteer
  - email: <EMAIL>
  - password: <PASSWORD>

### Create initial superadmin account

Sends an invitation email to the email address, so that the account can be activated:

```bash
$  rails setup:superadmin email=<EMAIL>
```

Ready to use with standard Password `<PASSWORD>` (No activation needed):

**Only use this on testing servers that are unable to send emails (_security risk_)**

```bash
$  rails setup:superadmin_initialized email=<EMAIL>
```

### Sort locale yaml files

Run this task, in order to sort the locale files alphabetically.

```bash
$  rails i18n:sort
```

### Importing from access db with rake task

Run in the command line:

```bash
$  rails access:import file=path/to/access_file.accdb
```

### Run model, integration and controller tests

```bash
$ rails test
```

### Run system (acceptance) tests

For system (acceptance) tests run:

```bash
$ rails test:system
```

For having chrome open and visible when running system tests locally:

```bash
$ rails test:system driver=visible
```

### LICENSE

All the sources created are made available under the terms
of the GNU Affero General Public License (GNU AGPLv3).
See the GNU-AGPL-3.0.txt file for more details.
{'fraction_non_alphanumeric': 0.14334677419354838, 'fraction_numerical': 0.013709677419354839, 'mean_word_length': 4.748551564310545, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 18, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807287', 'n_tokens_mistral': 1718, 'n_tokens_neox': 1591, 'n_words': 451}