<commit_before># PUL Requests Engine

[![Build Status](https://travis-ci.org/pulibrary/requests.svg?branch=master)](https://travis-ci.org/pulibrary/requests)

## Dependencies

The engine requires a working copy of marc_liberation aka bibdata to be running. Defaults to https://bibdata.princeton.edu. If you wish to override that value while doing development work and point a local working copy you can set your local environment variable of ```BIBDATA_BASE``` to the root of the marc_liberation application you want to work with. 

The gem also is dependent on Orangelight to service requests for non-voyager IDs. By default it utilizes the production Orangelight system at https://pulsearch.princeton.edu/.

## To Install for Development

After you've cloned the repo:

```
$ bundle install
$ rake engine_cart:regenerate
$ rake spec
```

## Working within Orangelight locally
This engine is mouting within Orangelight. To test your local engine code interactively update the OL gemfile reference to the gemfile:

Change:
```
gem 'locations', git: '<EMAIL>:pulibrary/locations.git', branch: 'development'
```

to:
```
gem 'locations', path: '<EMAIL>:pulibrary/locations.git'
```

and run ```bundle install``` to point OL at your local gem.


## Install in Production
<commit_msg>Copy editing local setup instructions.<commit_after># PUL Requests Engine

[![Build Status](https://travis-ci.org/pulibrary/requests.svg?branch=master)](https://travis-ci.org/pulibrary/requests)

## Dependencies

The engine requires a working copy of marc_liberation aka bibdata to be running. Defaults to https://bibdata.princeton.edu. If you wish to override that value while doing development work and point a local working copy you can set your local environment variable of ```BIBDATA_BASE``` to the root of the marc_liberation application you want to work with. 

The gem also is dependent on Orangelight to service requests for non-voyager IDs. By default it utilizes the production Orangelight system at https://pulsearch.princeton.edu/.

## To Install for Development

After you've cloned the repo:

```
$ bundle install
$ rake engine_cart:regenerate
$ rake spec
```

## Working within Orangelight locally
This engine is mouting within Orangelight. To test your local engine code interactively update the OL gemfile reference to the gemfile:

Change:
```
gem 'requests', git: '<EMAIL>:pulibrary/requests.git', branch: 'development'
```

to:
```
gem 'requests', path: '<EMAIL>:pulibrary/requests.git'
```

and run ```bundle install``` to point OL at your local gem.


## Install in Production

{'fraction_non_alphanumeric': 0.09492444788841534, 'fraction_numerical': 0.0, 'mean_word_length': 5.0327102803738315, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1580832', 'n_tokens_mistral': 749, 'n_tokens_neox': 712, 'n_words': 304}