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

pulibrary / tigerdata-app / 085a83f3-f8ba-4ace-b5ad-5cb6d3d55a35

24 Oct 2025 02:47PM UTC coverage: 65.148% (-26.1%) from 91.202%
085a83f3-f8ba-4ace-b5ad-5cb6d3d55a35

Pull #2057

circleci

hectorcorrea
Make test more forgiving
Pull Request #2057: Dashboard displays projects straights from Mediaflux

11 of 87 new or added lines in 4 files covered. (12.64%)

625 existing lines in 35 files now uncovered.

2088 of 3205 relevant lines covered (65.15%)

181.75 hits per line

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

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

5
  delegate :to_model, :updated_at, to: :project
1✔
6

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

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

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

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

44
  # Removes "about" (as in "about 1 month ago") from time_ago_in_words
45
  def remove_about(time_ago)
1✔
46
    time_ago.gsub("about ", "")
×
47
  end
48
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