Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/tmp/*
/coverage/*
/artifacts/*
.cache/*

/*.xml
*.zip
Expand Down
15 changes: 10 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@ Style/Lambda:
Style/SingleLineBlockParams:
Enabled: false

# For now allowing my obsesive use of OpenStructs
Style/OpenStructUse:
Enabled: false

# Rubocop hates it, but Docker is forcing the issue...
Style/HashSyntax:
Enabled: false
Enabled: false

# Let's relax on some of the spec cops...they're setup heavy
Metrics/MethodLength:
Exclude:
- 'spec/**/*'

Metrics/AbcSize:
Exclude:
- 'spec/**/*'
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,27 @@ docker build -t alma-user-load .
> rspec
```

### Run the test suite via Docker:
```sh
# Run rspec:
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec

# Run a single spec file:
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec spec/lib/ucpath_spec.rb

# Run a specific test (by line number)
> docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec spec/lib/helpers_spec.rb:34
```

### For convenience, setup an alias:
```sh
# Add alias:
> alias drspec='docker compose -f docker-compose.local.yml run --rm shell bundle exec rspec'

# Run via alias:
drspec spec/lib/ucpath_spec.rb:327
```

Note - to run the test suite you need to change the LDAP setting in your `.env` file
> \# For testing:
> LDAP_HOST=ldap.fake.edu
Expand All @@ -134,7 +155,6 @@ Note - to run the test suite you need to change the LDAP setting in your `.env`


## Future Improvements:
- Replace fixtures w/some sort of factory (VCR)
- DRY things up (UCPath vs. SIS --> phone, email, address, names, etc...)
- SIS - add run by user id (similar to how I setup ucpath)...if possible
- Move 'create_user_record' from user.rb to a separate class
Expand Down
2 changes: 1 addition & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ settings:
upload_host: "upload.lib.berkeley.edu"
upload_user: "ssullivan"
last_alma_purge: "2023-06-30"
application_version: "1.6.6"
application_version: "1.6.8"

# TODO - flesh this out
# http://docopt.org/
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
shell:
build:
context: .
target: development
init: true
working_dir: /opt/app
volumes:
- ./:/opt/app
entrypoint: []
269 changes: 0 additions & 269 deletions spec/data/ucpath/10000003_jobs.json

This file was deleted.

Loading
Loading