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

pulibrary / pdc_describe / 4e4e59fc-9df4-4838-9fd4-6c7ea33cdb7c

07 Apr 2025 06:36PM UTC coverage: 1.283% (-94.6%) from 95.862%
4e4e59fc-9df4-4838-9fd4-6c7ea33cdb7c

Pull #1994

circleci

hectorcorrea
Switched to use the autocomplete that we aleady use for ROR. Integrated it with the existing logic for creators
Pull Request #1994: Started adding auto complete to contributors

0 of 46 new or added lines in 2 files covered. (0.0%)

4806 existing lines in 74 files now uncovered.

65 of 5065 relevant lines covered (1.28%)

0.01 hits per line

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

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

UNCOV
21
  private
×
22

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