<commit_before>[![Build Status](https://travis-ci.org/sul-dlss/dor-workflow-service.svg?branch=master)](https://travis-ci.org/sul-dlss/dor-workflow-service)
[![Dependency Status](https://gemnasium.com/sul-dlss/dor-workflow-service.svg)](https://gemnasium.com/sul-dlss/dor-workflow-service)

# dor-workflow-service gem

Provides Ruby convenience methods to work with the DOR Workflow REST Service. The REST API is defined here:
https://consul.stanford.edu/display/DOR/DOR+services#DORservices-initializeworkflow

## Usage

To initialize usage of the service, you need to call `Dor::WorkflowService.configure`, like in a bootup or startup method,
e.g.:

```ruby
Dor::WorkflowService.configure('https://test-server.edu/workflow/')
```

If you plan to archive workflows, then you need to set the URL to the Dor REST service:

```ruby
Dor::WorkflowService.configure('https://test-server.edu/workflow/', :dor_services_url => 'https://sul-lyberservices-dev.stanford.edu/dor')
```

There's no need to call `Dor::WorkflowService.configure` if using the `dor-services` gem and using the `Dor::Config`
 object.  The latest versions of `dor-services` will configure the workflow service for you.
<commit_msg>Refer to this gem as a ruby client<commit_after>[![Build Status](https://travis-ci.org/sul-dlss/dor-workflow-service.svg?branch=master)](https://travis-ci.org/sul-dlss/dor-workflow-service)
[![Dependency Status](https://gemnasium.com/sul-dlss/dor-workflow-service.svg)](https://gemnasium.com/sul-dlss/dor-workflow-service)

# dor-workflow-service gem

A Ruby client to work with the DOR Workflow REST Service. The REST API is defined here:
https://consul.stanford.edu/display/DOR/DOR+services#DORservices-initializeworkflow

## Usage

To initialize usage of the service, you need to call `Dor::WorkflowService.configure`, like in a bootup or startup method,
e.g.:

```ruby
Dor::WorkflowService.configure('https://test-server.edu/workflow/')
```

If you plan to archive workflows, then you need to set the URL to the Dor REST service:

```ruby
Dor::WorkflowService.configure('https://test-server.edu/workflow/', :dor_services_url => 'https://sul-lyberservices-dev.stanford.edu/dor')
```

There's no need to call `Dor::WorkflowService.configure` if using the `dor-services` gem and using the `Dor::Config`
 object.  The latest versions of `dor-services` will configure the workflow service for you.

{'fraction_non_alphanumeric': 0.13873798579189303, 'fraction_numerical': 0.0, 'mean_word_length': 5.250652741514361, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3536806', 'n_tokens_mistral': 816, 'n_tokens_neox': 766, 'n_words': 200}