• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

curationexperts / mahonia / 1044
98%

Build:
DEFAULT BRANCH: master
Ran 27 Jan 2018 01:05AM UTC
Jobs 1
Files 53
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1044

Pull #282

travis-ci

web-flow
Add basic virus checking with logging and file deletion

Virus handling is added to `AttachFilesToWorkJob` (which unfortunately must be
copied wholesale from Hyrax).

By default Hyrax embeds virus checking in the model validations, which means a
real `Hydra::PCDM::File` must exist in order to check for a virus and handle
errors. This is somewhat challenging in the case that we want to check
asynchonously and handle errors, since a `File` doesn't exist until an
`ImportJob` is running; in the default actor stack, this is several asynchonous
jobs deep.

By adding an early check, we can avoid creating a `FileSet` for files that
contain a virus, and add error handling earlier in the stack. In this case, we
log to `Rails.logger.error`.

We also clean up the file from disk, which Hyrax does not seem to bother
with(?).

Closes #178.
Pull Request #282: Add basic virus checking with logging and file deletion

33 of 33 new or added lines in 2 files covered. (100.0%)

746 of 760 relevant lines covered (98.16%)

73.75 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
app/lib/attach_files_to_work_job.rb
Jobs
ID Job ID Ran Files Coverage
1 1044.1 (2.4.2) 27 Jan 2018 01:05AM UTC 0
98.16
Travis Job 1044.1
Source Files on build 1044
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1044
  • Pull Request #282
  • PR Base - master (#1038)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc