Sha256: a8984525877267828085ae586d8abb4d86498459ed6a2c2961fadf879e7ea536

Contents?: true

Size: 1.84 KB

Versions: 42

Compression:

Stored size: 1.84 KB

Contents

# ddr-batch

A Rails engine providing batch processing functionality for the Duke Digital Repository.

## Installation

Add to your application's Gemfile:

    gem 'ddr-batch'

and

    bundle install

## Configuration

### User model

Include `Ddr::Batch::BatchUser` in `app/models/user.rb`.

```ruby
class User < ActiveRecord::Base

  # DO NOT REMOVE:
  # Blacklight::User
  # Ddr::Auth::User
  #
  include Ddr::Batch::BatchUser

end
```

### Ability class

Add `Ddr::Batch::BatchAbilityDefinitions` to the list of `ability_definitions`.

```ruby
class Ability < Ddr::Auth::Ability

  self.ability_definitions += [ Ddr::Batch::BatchAbilityDefinitions ]

end
```

### Log4r

#### Application.rb

Add the following lines to `config\application.rb` if they are not already there:

```ruby
require 'log4r'
require 'log4r/yamlconfigurator'
require 'log4r/outputter/datefileoutputter'
include Log4r
```

#### Configuration

`Ddr::Batch::BatchProcessor` expects a Log4r configuration file at `config\log4r_batch_processor.yml`.

##### Example

```yaml
log4r_config:
    loggers:
        - name      : batch_processor
          level     : DEBUG
          trace     : 'false'
          outputters:
            - logfile
    outputters:
        - type      : StdoutOutputter
          name      : stdout
          level     : DEBUG
          formatter :
            date_pattern: '%F %T.%L'
            pattern     : '%d %l: %m'
            type        : PatternFormatter
        - type        : FileOutputter
          name        : logfile
          trunc       : 'false'
          filename    : "#{LOG_FILE}"
          formatter   :
            date_pattern: '%F %T.%L'
            pattern     : '%d %l: %m'
            type        : PatternFormatter
```

### Migrations

Install the ddr-batch migrations:

`rake ddr_batch:install:migrations`

then

`rake db:migrate`

`rake db:test:prepare`

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
ddr-batch-1.6.1 README.md
ddr-batch-1.6.0 README.md
ddr-batch-1.6.0.rc1 README.md
ddr-batch-1.5.1 README.md
ddr-batch-1.5.0 README.md
ddr-batch-1.5.0.rc1 README.md
ddr-batch-1.4.1 README.md
ddr-batch-1.4.0 README.md
ddr-batch-1.4.0.rc1 README.md
ddr-batch-1.3.0 README.md
ddr-batch-1.3.0.rc1 README.md
ddr-batch-1.2.0 README.md
ddr-batch-1.2.0.rc6 README.md
ddr-batch-1.2.0.rc5 README.md
ddr-batch-1.2.0.rc4 README.md
ddr-batch-1.2.0.rc3 README.md
ddr-batch-1.2.0.rc2 README.md
ddr-batch-1.2.0.rc1 README.md
ddr-batch-1.1.0 README.md
ddr-batch-1.1.0.rc2 README.md