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

pulibrary / pdc_describe / 1aaf6302-d8cf-4943-bb96-5e86951c32a3

pending completion
1aaf6302-d8cf-4943-bb96-5e86951c32a3

Pull #1079

circleci

Bess Sadler
Nil safe doi gsub
Pull Request #1079: Nil safe collection title

2 of 2 new or added lines in 1 file covered. (100.0%)

1777 of 2063 relevant lines covered (86.14%)

100.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/app/controllers/work_downloader_controller.rb
1
# frozen_string_literal: true
2
class WorkDownloaderController < ApplicationController
1✔
3
  def download
1✔
4
    work = Work.find(params[:id])
×
5
    if current_user && work.editable_by?(current_user)
×
6
      file_name = params[:filename]
×
7
      pre_curation = !work.approved?
×
8
      service = S3QueryService.new(work, pre_curation)
×
9
      redirect_to service.file_url(file_name)
×
10
    else
11
      Honeybadger.notify("Can not download work: #{work.id} is not editable by #{current_user}")
×
12
      redirect_to root_path, notice: I18n.t("works.download.privs")
×
13
    end
14
  end
15
end
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

© 2025 Coveralls, Inc