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

pulibrary / pdc_describe / 9091a1ae-29be-458c-984a-339d213919c4

12 Dec 2024 07:41PM UTC coverage: 26.434% (-69.7%) from 96.113%
9091a1ae-29be-458c-984a-339d213919c4

Pull #2000

circleci

jrgriffiniii
Removing integration with ActiveStorage
Pull Request #2000: Bump actionpack from 7.2.1.1 to 7.2.2.1

945 of 3575 relevant lines covered (26.43%)

0.35 hits per line

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

6.25
/app/controllers/work_migration_controller.rb
1
# frozen_string_literal: true
2
class WorkMigrationController < ApplicationController
1✔
3
  # @note No testing coverage for RuntimeError but depends on Dspaces
4
  def migrate
×
5
    work = Work.find(params[:id])
×
6
    if work.ark.present? && current_user.can_admin?(work.group)
×
7
      begin
8
        run_migration(work)
×
9
      rescue RuntimeError => e
10
        flash[:notice] = e.message
×
11
      end
12
    elsif !current_user.can_admin?(work.group)
×
13
      flash[:notice] = "Unauthorized migration"
×
14
      Honeybadger.notify("Unauthorized to migration work #{work.id} (current user: #{current_user.id})")
×
15
    else
16
      flash[:notice] = "The ark is blank, no migration from Dataspace is possible"
×
17
    end
18
    redirect_to work_path(work)
×
19
  end
20

21
  private
×
22

23
    def run_migration(work)
×
24
      dspace = PULDspaceMigrate.new(work, current_user)
×
25
      dspace.migrate
×
26
      flash[:notice] = dspace.migration_message
×
27
    end
28
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