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

pulibrary / tigerdata-app / 6b20c09e-9eaa-41d9-80ef-e6ce0d0036a9

07 Nov 2025 06:12PM UTC coverage: 87.615% (-3.7%) from 91.357%
6b20c09e-9eaa-41d9-80ef-e6ce0d0036a9

Pull #2163

circleci

web-flow
Merge branch 'main' into 2157-project-list-error
Pull Request #2163: Logs Mediaflux errors when fetching the project list

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

523 existing lines in 31 files now uncovered.

2752 of 3141 relevant lines covered (87.62%)

345.77 hits per line

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

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

UNCOV
5
  delegate :to_model, :updated_at, to: :project
2✔
6

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

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

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

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

UNCOV
44
  def path
2✔
45
    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)
2✔
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