# Sufia
## Creating an application
### Generate base Rails install
```rails new my_app```
### Add gems to Gemfile
```
gem 'blacklight'
gem 'hydra-head'
gem 'sufia'
gem 'jettywrapper'
```
Then `bundle install`

### Run the blacklight, hydra and sufia generators
```
rails g blacklight --devise
rails g hydra:head -f
rails g sufia -f
```

### Run the migrations

```
rake db:migrate
```


### If you want to use the assets that ship with Sufia, add the following to application.css
```
 *= require sufia
```
and add the following to application.js
```
//= require sufia
```

### Start background workers
```
COUNT=4 QUEUE=* rake resque:work
```
See https://github.com/defunkt/resque for more options

## Developers:
This information is for people who want to modify the engine itself, not an application that uses the engine:
### Create fixtures
```
# start jetty
git submodule init && git submodule update
rake jetty:config
rake jetty:start

# load sufia fixtures
rake sufia:fixtures:create sufia:fixtures:generate
rake fixtures

# run the tests
rake clean spec
bundle exec cucumber fixtures
```

# Sufia
## Creating an application
### Generate base Rails install
```rails new my_app```
### Add gems to Gemfile
```
gem 'blacklight'
gem 'hydra-head'
gem 'sufia'
gem 'jettywrapper'
```
Then `bundle install`

### Run the blacklight, hydra and sufia generators
```
rails g blacklight --devise
rails g hydra:head -f
rails g sufia -f
```

### Run the migrations

```
rake db:migrate
```


### If you want to use the assets that ship with Sufia, add the following to application.css
```
 *= require sufia
```
and add the following to application.js
```
//= require sufia
```

### Start background workers
```
COUNT=4 QUEUE=* rake environment resque:work
```
See https://github.com/defunkt/resque for more options

## Developers:
This information is for people who want to modify the engine itself, not an application that uses the engine:
### Create fixtures
```
# start jetty
git submodule init && git submodule update
rake jetty:config
rake jetty:start

# load sufia fixtures
rake sufia:fixtures:create sufia:fixtures:generate
rake fixtures

# run the tests
rake clean spec
bundle exec cucumber fixtures
```

Call environment before running resque
Call environment before running resque
