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

pulibrary / tigerdata-app / a25a9344-105b-44fa-8cbb-8294c0216121

30 Oct 2025 08:44PM UTC coverage: 64.982% (-22.7%) from 87.65%
a25a9344-105b-44fa-8cbb-8294c0216121

Pull #2128

circleci

hectorcorrea
Started updating the project show page to display metadata from Mediaflux
Pull Request #2128: Project Show page now displays metadata straight from Mediaflux

0 of 37 new or added lines in 3 files covered. (0.0%)

757 existing lines in 36 files now uncovered.

2134 of 3284 relevant lines covered (64.98%)

168.86 hits per line

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

0.0
/app/presenters/project_dashboard_presenter.rb
1
# frozen_string_literal: true
UNCOV
2
class ProjectDashboardPresenter < ProjectShowPresenter
×
UNCOV
3
  include ActionView::Helpers::DateHelper
×
4

UNCOV
5
  delegate :to_model, :updated_at, to: :project
×
6

UNCOV
7
  def type
×
UNCOV
8
    if storage_performance_expectations["approved"].nil?
×
UNCOV
9
      "Requested #{storage_performance_expectations['requested']}"
×
UNCOV
10
    else
×
UNCOV
11
      storage_performance_expectations["approved"]
×
UNCOV
12
    end
×
UNCOV
13
  end
×
14

UNCOV
15
  def latest_file_list_time
×
UNCOV
16
    requests = FileInventoryRequest.where(project_id: project.id).order(completion_time: :desc)
×
UNCOV
17
    if requests.empty?
×
UNCOV
18
      "No Downloads"
×
UNCOV
19
    elsif requests.first.completion_time
×
UNCOV
20
      "Prepared #{time_ago_in_words(requests.first.completion_time)} ago"
×
UNCOV
21
    else
×
UNCOV
22
      "Preparing now"
×
UNCOV
23
    end
×
UNCOV
24
  end
×
25

UNCOV
26
  def last_activity
×
UNCOV
27
    if project_metadata.updated_on.nil?
×
28
      "Not yet active"
×
UNCOV
29
    else
×
UNCOV
30
      "#{remove_about time_ago_in_words(project_metadata.updated_on)} ago"
×
UNCOV
31
    end
×
UNCOV
32
  end
×
33

UNCOV
34
  def role(user)
×
UNCOV
35
    if data_sponsor == user.uid
×
UNCOV
36
      "Sponsor"
×
UNCOV
37
    elsif data_manager == user.uid
×
UNCOV
38
      "Data Manager"
×
UNCOV
39
    else
×
UNCOV
40
      "Data User"
×
UNCOV
41
    end
×
UNCOV
42
  end
×
43

UNCOV
44
  def path
×
45
    "/#{project_metadata.project_directory}"
×
UNCOV
46
  end
×
47

48
  # Removes "about" (as in "about 1 month ago") from time_ago_in_words
UNCOV
49
  def remove_about(time_ago)
×
UNCOV
50
    time_ago.gsub("about ", "")
×
UNCOV
51
  end
×
UNCOV
52
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