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

pulibrary / pdc_describe / cace366a-ffad-45f1-9b60-678e607fa527

14 May 2024 02:21PM UTC coverage: 60.862% (-35.0%) from 95.908%
cace366a-ffad-45f1-9b60-678e607fa527

push

circleci

jrgriffiniii
wip

1 of 3 new or added lines in 2 files covered. (33.33%)

1194 existing lines in 57 files now uncovered.

2076 of 3411 relevant lines covered (60.86%)

22.71 hits per line

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

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